Lightweight three-dimensional data format generation method suitable for ship model labeling
By generating a lightweight 3D data format suitable for ship model annotation, the problems of low efficiency in converting 3D modeling to 2D output and the inability to simultaneously meet fast rendering and accurate measurement in existing technologies are solved. This enables fast rendering and accurate measurement of models, with small file size, making it suitable for storage and transmission.
Patent Information
- Application Number
- CN202510746223.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-05
- Publication Date
- 2025-09-16
AI Technical Summary
The existing 3D modeling to 2D drawing mode is inefficient and cannot meet the needs of fast rendering and accurate measurement. 2D drawings cannot fully display the details of complex structures, and the existing 3D data format cannot meet the requirements of fast rendering and accurate measurement at the same time.
A lightweight 3D data format suitable for ship model annotation is generated by exporting the model file from the ship design software, extracting the attribute information, rebuilding the design assembly tree, parsing the model attribute values, converting them into a lightweight data exchange format, and performing transcoding and compression to generate a lightweight 3D data format containing faces, vertex coordinates and triangulation indexes.
It achieves fast rendering and surface capture of the model, and contains key parameters and measurement point data, solving the problem that lightweight models cannot be accurately measured. The file size is small and suitable for storage and network transmission.
Smart Images

Figure CN120655826A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method for generating a lightweight three-dimensional data format suitable for ship model annotation in the ship industry, and belongs to the field of management technology in digital ship design and manufacturing technology. Background Art
[0002] With the development of the shipbuilding industry, we can rely on ship design software to complete the entire design phase of a ship, from preliminary design to detailed design to production design. Parametric modeling enables the collaborative design of hull structure, piping, electrical systems, and other disciplines. During ship design, 3D models are virtual representations of the ship created using computer-aided design (CAD) software. These 3D models include not only the hull's external form but also internal structures such as decks, cabins, piping, and cables. By using 3D modeling technology, designers can precisely construct every part of the ship in a virtual environment, improving design accuracy. This also allows potential problems to be identified before construction begins, reducing errors and the resulting cost and resource waste during actual construction.
[0003] Currently, the most widely used model for ship production design is to proceed from 3D modeling to 2D rendering, and then output to 2D drawings. However, after years of development, this 3D model-to-2D rendering model has become inefficient. Without a change to this model, improving work efficiency will become increasingly difficult. Furthermore, 2D drawings are not conducive to direct construction. However, 2D drawings are flat, making it difficult for construction workers to mentally visualize the true 3D spatial form of complex structures. Furthermore, 2D images can only provide limited information, making it difficult to fully display details such as hidden structures and pipeline intersections. Due to the widespread adoption of 3D technology and the increasing power of mobile devices, major industrial software vendors and leading shipbuilders have begun researching 3D modeling and automated 3D rendering. Common 3D data formats either contain only lightweight model data (facilitating fast rendering) or only model parameters and attribute data (facilitating precise measurement). No single 3D data format meets both fast rendering and precise measurement requirements.
[0004] Therefore, there is an urgent need for a three-dimensional data format generation method that can be used for ship model annotation and is lightweight to solve the problems raised in the above background technology. Summary of the Invention
[0005] The content of this application is used to briefly introduce concepts that will be described in detail in the detailed description section below. The content of this application is not intended to identify key features or essential features of the technical solution for which protection is sought, nor is it intended to limit the scope of the technical solution for which protection is sought.
[0006] In response to the problems and shortcomings of the existing technology, the present invention aims to provide a method for generating a lightweight three-dimensional data format suitable for ship model annotation. This method generates a lightweight three-dimensional data format that includes the faces, vertex coordinates, and trisection indices of a ship design model, facilitating rapid model rendering and face capture on the client side. Furthermore, this lightweight three-dimensional data format includes the model type, key parameters, and measurement point data. By capturing measurement point coordinates, it addresses the issue of lightweight models being unable to be used for precise measurement, thus resolving the issues raised in the aforementioned background technology.
[0007] To achieve the above object, the present invention provides the following technical solutions:
[0008] As a first aspect of the present application, the present invention discloses a method for generating a lightweight three-dimensional data format suitable for ship model annotation, comprising the following steps:
[0009] Step 1: Export the 3D model file from the ship design software and extract its model attribute information file using the secondary development program;
[0010] Step 2: Upload the 3D model file and the model attribute information file to the 3D model platform to rebuild the design assembly tree;
[0011] Step 3: parsing the 3D model file and the model attribute information file in the 3D model platform to calculate the attribute value information of the geometric model in the model;
[0012] Step 4: integrating the attribute value information of the geometric model and converting it into a lightweight data exchange format;
[0013] Step 5: Convert the lightweight data exchange format file into a binary format, and then transcode and compress the binary data to obtain a lightweight three-dimensional data format file;
[0014] Step 6: Based on the consistency of the model names, the lightweight three-dimensional data format file is matched with the name based on the model attribute information and stored in the database.
[0015] Preferably, in step 3, the attribute value information of the geometric model includes vertex set values, triangulation index values, precise measurement point coordinate values, model geometry type values, model color coding values and model name values.
[0016] Preferably, in step 4, any model in the three-dimensional model file may be composed of multiple geometric bodies, and the attribute value information of the geometric body model is integrated and represented as an integration of vertex set values, triangulation index values, precise measurement point coordinate values, model geometry type values, model color coding values, and model name values; wherein the triangulation index value needs to be increased accordingly according to the number of points in the merged vertex array value.
[0017] Preferably, the geometric bodies include regular geometric bodies and irregular geometric bodies, and the analysis of the regular geometric bodies and irregular geometric bodies includes:
[0018] For the irregular geometric model, a set of faces and points is extracted, and a triangulation index value is calculated using a triangulation algorithm;
[0019] For the regular geometric model, the center point coordinates, rotation parameters and shape parameters are extracted, the vertex set value and the normal vector of each face are calculated, and the triangulation index value of each face is calculated based on the normal vector.
[0020] Preferably, the geometric body further includes a complex geometric body, and the complex geometric body is embodied as a curved tube-shaped geometric body. The analysis of the curved tube-shaped geometric body model is:
[0021] Extract the center coordinates of the arc of the center line of the elbow, the coordinates of the two ends of the arc, the radius of the elbow and other data;
[0022] Divide the arc evenly according to the precision required for lightweighting, and calculate the cross-section of the arc dividing points including the head and tail points on the elbow;
[0023] Take the inner intersection of the arc and the arc surface as the starting point for all cross sections, and divide each cross section into multiple points along the same direction;
[0024] Divide the outer contour of the elbow into multiple rectangles according to the order of sections and the order of points on the sections;
[0025] The visual direction of triangulation is determined according to the positional relationship between the face where each rectangle is located and the center of the cross section circle, and the set values of all vertices of the outer contour of the elbow and the triangulation index values of the vertices are calculated.
[0026] Preferably, the geometric body further comprises a spherical geometric body, and the analysis of the spherical geometric body model is:
[0027] Extract the center and radius of the spheroid, and perform multiple cuts along any diameter direction of the spheroid according to the display accuracy requirements;
[0028] Average the upper and lower arcs of the cutting surface into multiple points according to the display accuracy requirements;
[0029] Use a method similar to calculating the outer surface of a curved pipe to cut the outer surface of the sphere into multiple cuboids;
[0030] Calculate the vertex set values and triangulation index values of the outer surface of the sphere.
[0031] Preferably, after step 6, the client loads the lightweight three-dimensional data format file of the model according to the storage path of the model, including the following steps:
[0032] First, decompress and transcode the lightweight 3D data format file;
[0033] Extract the vertex set values of the two-dimensional array of model vertices and concatenate the two-dimensional array into a one-dimensional array;
[0034] Pass the concatenated one-dimensional array and triangulation index value to the 3D engine to build a meshed 3D model;
[0035] The name, type, and measurement point coordinates of the gridded 3D model are stored in the corresponding custom attributes.
[0036] As a second aspect of the present application, the present invention discloses a lightweight three-dimensional data format generation system suitable for ship model annotation, comprising:
[0037] The export and extraction module is used to use the secondary development program to extract the RVM format model from the ship design software to obtain the model attribute information file;
[0038] The upload parsing module is used to upload the RVM format model and model attribute information file to the 3D model platform, and then parse it to obtain the attribute value information of the geometric model in the model;
[0039] The conversion format module is used to integrate the attribute value information of the geometric model and convert it into a lightweight data exchange format;
[0040] The transcoding and compression module is used to convert the lightweight data exchange format into a binary format, and obtain a lightweight three-dimensional data format through transcoding and compression;
[0041] The storage module is used to match the lightweight three-dimensional data model attribute information with the name and store it in the database based on the consistency of the model name.
[0042] As a third aspect of the present application, the present invention further discloses an electronic device, comprising:
[0043] at least one processor, and a memory communicatively coupled to the at least one processor;
[0044] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform the steps of the method for generating a lightweight three-dimensional data format for annotating a ship model.
[0045] As a fourth aspect of the present application, the present invention further discloses a computer storage medium storing a computer program thereon, characterized in that when the computer program is executed by a processor, the steps of the method for generating a lightweight three-dimensional data format for annotating a ship model are implemented.
[0046] Compared with the prior art, the present invention has the following beneficial effects:
[0047] The present invention provides a method for generating a lightweight three-dimensional data format suitable for ship model annotation. The method exports an RVM format model file from ship design software and extracts its model attribute information file using a secondary development program. The RVM format model and the model attribute information file are uploaded to a three-dimensional model platform to reconstruct a design assembly tree. The RVM format model and the model attribute information file are parsed within the three-dimensional model platform to calculate the attribute value information of the geometric model in the model. The attribute value information of the geometric model is integrated and converted into a lightweight data exchange format. The lightweight data exchange format file is converted into a binary format, and the binary data is transcoded and compressed to obtain a lightweight three-dimensional data format file. Based on the consistency of the model name, the lightweight three-dimensional data format file is matched with the model attribute information and stored in a database. The lightweight three-dimensional data format file of the present invention contains the faces, vertex coordinates and triangulation indexes of the lightweight model, which is conducive to the client's rapid rendering of the model and the capture of faces. It also contains the model type, key parameters and measurement point data, and solves the problem that the lightweight model cannot be used for accurate measurement by capturing the measurement point coordinates. In addition, the lightweight three-dimensional data format file of the present invention is small in size. According to the characteristics of the ship model, only the key data of the restored model is retained, and the file is converted and compressed into binary code. Therefore, compared with the model file of the general format, the file size is much smaller, which is greatly beneficial for storage and network transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The drawings constituting a part of this application are used to provide a further understanding of this application and make other features, purposes and advantages of this application more apparent. The drawings and descriptions of the exemplary embodiments of this application are used to explain this application and do not constitute an improper limitation on this application.
[0049] In the attached figure:
[0050] Figure 1 This is a flowchart of the steps of a method for generating a lightweight three-dimensional data format according to an embodiment of the present invention;
[0051] Figure 2 A structural diagram of a lightweight three-dimensional data format file in an embodiment of the present invention;
[0052] Figure 3 This is a schematic diagram of a client obtaining model data of a lightweight three-dimensional data format file in an embodiment of the present invention;
[0053] Figure 4 A schematic diagram of saving a lightweight three-dimensional data format file in an embodiment of the present invention;
[0054] Figure 5Schematic diagram of the structure of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION
[0055] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.
[0056] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other.
[0057] Example
[0058] The present invention discloses a method for generating a lightweight three-dimensional data format suitable for ship model annotation. The present invention will be described in detail below with reference to the accompanying drawings and in combination with embodiments. Figure 1 As shown, the present invention mainly includes the following steps:
[0059] Step 1: Export the 3D model file from the ship design software and extract its model attribute information file using the secondary development program;
[0060] Step 2: Upload the 3D model file and the model attribute information file to the 3D model platform and rebuild the design assembly tree;
[0061] Step 3: parsing the 3D model file and the model attribute information file in the 3D model platform to calculate the attribute value information of the geometric model in the model;
[0062] Step 4: Integrate the attribute value information of the geometric model and convert it into a lightweight data exchange format;
[0063] Step 5: Convert the lightweight data exchange format file into a binary format, and then transcode and compress the binary data to obtain a lightweight three-dimensional data format file;
[0064] Step 6: Based on the relationship of model name consistency, the lightweight three-dimensional data format file is matched with the name based on the model attribute information and stored in the database.
[0065] Specifically, the three-dimensional model file is exported from the ship design software. Among them, the ship design software uses AVEVA Marine (AM) software. Ship design software AM is an integrated ship design solution developed specifically for the contract design and detailed design stages. It supports rapid three-dimensional modeling and performance analysis of hull structures, especially in the conceptual design and contract design stages, and can quickly generate mathematical hull models and perform basic calculations such as weight, stability, and tank capacity. AVEVA Marine supports full-process data transfer from conceptual design to production design, reducing the risk of design iterations. It also supports multi-site collaboration for large and complex projects, provides flexible configuration options to adapt to different design processes, and improves overall efficiency through digital tools.
[0066] Export the 3D model file, or RVM model file, from the AM software. Use the secondary development program to extract the attribute information of all models within a specific hierarchy and save it as an attr format file (i.e., a model attribute information file). Upon completion, the secondary development program automatically uploads the model file and attribute information file to the 3D model platform. The attr file is a text file that stores model attribute information, while the RVM model file contains the model's 3D data and the hierarchy and name information of the design tree. Because the attr file contains the model's attribute information, the attribute information can be used to restore the assembly tree already created in the design platform in subsequent steps (generally, the hull profession uses the assembly tree, while other professions use the design tree). The model name in the RVM model file and the model name in the attribute information have a unique correspondence, which allows the model to be mounted on a node in the design tree or assembly tree. Next, the RVM model file and attr format file are parsed within the 3D model application platform to reconstruct the design assembly tree. The design tree or assembly tree is reconstructed based on its hierarchical relationship, and the correspondence between the model and the node in the tree is established through the correspondence between the model names.
[0067] As described in step 3, the RVM model file and the model attribute information attr format file are parsed within the 3D model platform to calculate the attribute value information of the geometric model in the model. The attribute value information of the geometric model includes vertex set values, triangulation index values, precise measurement point coordinate values, model geometry type values, model color code values, and model name values. It also includes the following:
[0068] The data processing of irregular geometric models includes: when parsing from the RVM model file, first extract the set of faces and points. Use the triangulation algorithm to calculate the triangulation index. The triangulation algorithm can be Delaunay, EarClipping, etc. Specifically, when Delaunay triangulation is used, a method of generating a triangular mesh is given a set of points. Its characteristic is that the circumcircle of any triangle does not contain other points. After the triangular mesh is constructed, each triangle consists of three vertices, and the index of these three vertices in the original point set constitutes the triangulation index value. EarClipping triangulation is to continuously find the "ears" of the polygon and cut them off until the polygon is completely triangulated. At this time, the three vertices constitute the last triangle, and its index is added to the index array.
[0069] The data processing of regular geometric models includes: when parsing from the RVM model file, first extract the center point coordinates, rotation parameters and shape parameters, calculate the vertex set and normal vector of each face, and calculate the triangulation index value of each face based on the normal vector. Traverse the vertex list according to each face index, extract the vertex coordinates corresponding to each face, and use these vertex coordinates to form the vertex set of the face. The normal vector of the face is the vertex of the selected face, and the edge vector is calculated and then cross-multiplied to obtain the normal vector, and finally normalized to obtain the normal vector of the face. Use the normal vector of the face as the normal of the projection plane, establish a local two-dimensional coordinate system, and project the three-dimensional vertices onto this plane. Convert the three-dimensional vertex set into a two-dimensional plane coordinate set, retaining the original three-dimensional vertex index. Select a subdivision algorithm to ensure that the triangle vertices are consistent with the normal vector direction, convert the vertex index of the two-dimensional triangle into the original three-dimensional vertex index, and you can get the final triangulation index value.
[0070] Data processing for complex geometric models such as elbows involves: when parsing from the RVM model file, first extract the coordinates of the center of the arc of the centerline of the elbow, the coordinates of the two ends of the arc, the radius of the elbow, and other data. The arc is evenly divided into n segments according to the accuracy required for lightweighting, and the cross-section of the arc segmentation points, including the first and last points, on the elbow is calculated. All cross-sections are divided into m points along the same direction, starting from the intersection of the inner side of the arc with the surface where the arc is located. The outer contour of the elbow is divided into rectangles according to the order of the cross-sections and the order of the points on the cross-sections. Finally, the visual direction of the triangulation is determined based on the positional relationship between the surface where each rectangle is located and the center of the cross-section, and all vertex values and triangulation index values of the vertex are calculated for the outer contour of the elbow.
[0071] The data processing of the spherical geometric model includes: when parsing from the RVM model file, first extracting the center and radius of the sphere, cutting the sphere S times along any diameter direction according to the display accuracy requirements, averaging the upper and lower arcs of the cutting surface into k points according to the display accuracy requirements, using a method similar to calculating the outer surface of a curved pipe to cut the outer surface of the sphere into rectangular blocks (the top and bottom layers are triangles), and finally calculating the vertex set value and triangulation index value of the outer surface of the sphere.
[0072] As described in step 4, the attribute value information of the geometric model is integrated and converted into a lightweight data exchange format. Since a model in the RVM model file may be composed of multiple geometric bodies, the attribute value information of the geometric model is integrated, mainly the merging of attributes such as fp, ides, and dim. Among them, the index value in ides needs to be increased accordingly according to the number of points in the merged fp set. In the RVM model file output by the AM software platform, a complex model may be composed of multiple geometric bodies, which may be irregular-shaped geometric bodies and regular-shaped geometric bodies (such as rectangular blocks, wedges, cylinders, curved pipes, spheres, hemispheres, ellipsoids, etc.). The integrated lightweight data exchange format is expressed in json format.
[0073] As described in step 5, the lightweight data exchange format file (json format) obtained by the above steps is first converted into a binary format, and then the binary data is transcoded and compressed to obtain a lightweight three-dimensional data format file with the suffix .chi. Figure 2 As shown, the .chi format file is represented as a lightweight three-dimensional data format file. The data in the .chi format file is in json format, and the data as a whole is an array collection of the model, such as Figure 2 As shown. The attributes of a single model are as follows: fp is the vertex set value, ides is the triangulation index value, pp is the coordinate set value of the point that can be used for precise measurement, dim is the index set value of the face that can be measured in fp (the plane of the outer surface of geometric shapes such as cuboids and wedges can be precisely measured, but the surface of tubular shapes except the end sections cannot be precisely measured), t is the geometry type value of the model, r is the radius value of a sphere or tube, o is the color code value, and n is the model name value.
[0074] The method for merging different types of geometries is as follows: For irregular geometries (the AM platform outputs lightweight models), the coordinates and normal vectors of the component faces and each face's midpoint are already included in the RVM model file. Therefore, this information can be directly extracted. A triangulation algorithm is then used to calculate the triangulation values of these faces. The face point set is stored in the fp attribute of the .chi format file, and the triangulation index is stored in the ides attribute. For regular geometries, the geometry (e.g., the length, width, height, center point, and rotational attitude of a cuboid) is reconstructed using the shape and positioning parameters in the RVM model file. The coordinates of the center points of the curved tube end face, the cylindrical end face, the sphere center point, the aggregate type code, the sphere radius, and the straight and curved tube radii are stored in the corresponding attributes of the .chi format file. For geometries containing arc-shaped shapes, a lightweight calculation is performed, separating the arc-shaped faces into individual polygonal faces. The coordinates of the face point set and the corresponding triangulation values of the regular type geometries are calculated and stored in the corresponding attributes of the .chi format file. At this point, all geometries within a model have been converted to .chi files. Finally, merge the .chi files containing multiple geometries within a model. Before merging, the triangulation indices in each geometries' .chi file correspond to the index order of the triangles constructed at the midpoint of each face within that geometry during rendering. After merging multiple geometries, the merged set fp needs to be merged. After merging, the position of the original data in the fp array has changed, and the indices of the corresponding ides midpoint data should also change accordingly.
[0075] Because the generated file storage path corresponds to the model name, a single file stores data for multiple models. The model data is stored in the database with the corresponding model file address. The model data to be saved in the same file is first converted to JSON format. This JSON data is then converted to binary encoding using the language's native methods. Finally, the converted binary data is compressed using the language's native file compression methods. Finally, based on the consistency of model names, the lightweight 3D data format files are stored in the database after matching the names based on the model attribute information.
[0076] When using the lightweight three-dimensional data .chi format file of the present invention, the client loads the .chi file of the model according to the storage path of the model, decompresses and transcodes the file, such as Figure 3As shown in the figure, the 2D array fp of the model's vertices is extracted and concatenated into a 1D array. This concatenated 1D array and the triangulation index value are then passed to the BufferGeometry class of the Three.js engine to construct a 3D mesh. Finally, the model's name, type, and measurement point coordinates are stored in the corresponding mesh's custom attribute userData. During measurement, the coordinates of points suitable for precise measurement are determined based on the points p and geometry type in the mesh's userData attribute. These coordinates are then displayed as a sphere for precise measurement selection. Figure 4 A schematic diagram showing a file format for saving lightweight 3D data.
[0077] In order to realize the above-mentioned embodiment, the present application also discloses a lightweight three-dimensional data format generation system suitable for ship model annotation. It includes an export extraction module, which is used to use a secondary development program to extract the RVM format model exported from the ship design software to obtain a model attribute information file. An upload parsing module is used to upload the RVM format model and the model attribute information file to the three-dimensional model platform, and then parse and obtain the attribute value information of the geometric model in the model. A conversion format module is used to integrate the attribute value information of the geometric model and convert it into a lightweight data exchange format. A transcoding and compression module is used to convert the lightweight data exchange format into a binary format, and obtain a lightweight three-dimensional data format after transcoding and compression. A storage module is used to match the lightweight three-dimensional data model attribute information with the name based on the consistency of the model name and store it in the database.
[0078] In order to implement the above embodiment, the present application also discloses an electronic device. Figure 5 As shown, the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. Various programs and data required for the operation of the electronic device 500 are also stored in the RAM 503. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0079] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 5 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead. Figure 5 Each block shown in the figure may represent one device, or may represent multiple devices as needed.
[0080] In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer storage medium, and the computer program includes program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from the network via the communication device 509, or installed from the storage device 508, or installed from the ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of some embodiments of the present disclosure are performed.
[0081] It should be noted that the computer storage medium described above in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0082] In some embodiments of the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In some embodiments of the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer storage medium other than a computer-readable storage medium that can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0083] In some embodiments, the client and server can communicate using any currently known or future developed network protocol, such as HTTP (Hypertext Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0084] The computer storage medium may be included in the electronic device or may exist independently and not incorporated into the electronic device. The computer storage medium carries one or more programs that, when executed by the electronic device, enable the electronic device to implement a method for generating a lightweight three-dimensional data format suitable for annotating ship models.
[0085] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0086] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, program segment or a part of code, and the part of the module, program segment or code includes one or more executable instructions for realizing the logical function of the specification. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings.
[0087] For example, two boxes shown in succession may actually be executed substantially in parallel, or they may sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of boxes in the block diagram and / or flow chart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or may be implemented using a combination of dedicated hardware and computer instructions. The units described in some embodiments of the present disclosure may be implemented in software or in hardware. The units described may also be provided in a processor, and the names of these units do not, in some cases, constitute limitations on the units themselves.
[0088] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0089] The above description is only an illustration of some preferred embodiments of the present disclosure and the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure.
Claims
1. A method for generating a lightweight three-dimensional data format suitable for ship model annotation, characterized in that: The following steps are involved: Step 1: Export the 3D model file from the ship design software and extract its model attribute information file using the secondary development program; Step 2: Upload the 3D model file and the model attribute information file to the 3D model platform to rebuild the design assembly tree; Step 3: parsing the 3D model file and the model attribute information file in the 3D model platform to calculate the attribute value information of the geometric model in the model; Step 4: integrating the attribute value information of the geometric model and converting it into a lightweight data exchange format; Step 5: Convert the lightweight data exchange format file into a binary format, and then transcode and compress the binary data to obtain a lightweight three-dimensional data format file; Step 6: Based on the consistency of the model names, the lightweight three-dimensional data format file is matched with the name based on the model attribute information and stored in the database.
2. The method for generating a lightweight three-dimensional data format suitable for ship model annotation according to claim 1, characterized in that: In step 3, the attribute value information of the geometric model includes vertex set values, triangulation index values, precise measurement point coordinate values, model geometry type values, model color code values, and model name values.
3. The method for generating a lightweight three-dimensional data format suitable for ship model annotation according to claim 2, characterized in that: In step 4, any model in the three-dimensional model file may be composed of multiple geometric bodies, and the attribute value information of the geometric body model is integrated and represented as an integration of vertex set values, triangulation index values, precise measurement point coordinate values, model geometry type values, model color coding values, and model name values; wherein the triangulation index value needs to be increased accordingly according to the number of points in the merged vertex array value.
4. The method for generating a lightweight three-dimensional data format suitable for ship model annotation according to claim 3, characterized in that: The geometric bodies include regular geometric bodies and irregular geometric bodies, and the analysis of the regular geometric bodies and irregular geometric bodies includes: For the irregular geometric model, a set of faces and points is extracted, and the triangulation index value is calculated using a triangulation algorithm; for the regular geometric model, the center point coordinates, rotation parameters and shape parameters are extracted, the vertex set value and the normal vector of each face are calculated, and the triangulation index value of each face is calculated based on the normal vector.
5. The method for generating a lightweight three-dimensional data format suitable for ship model annotation according to claim 4, characterized in that: The geometric body also includes a complex geometric body, which is embodied as a curved tube-shaped geometric body. The analysis of the curved tube-shaped geometric body model is: Extract the center coordinates of the arc of the center line of the elbow, the coordinates of the two ends of the arc, the radius of the elbow and other data; Divide the arc evenly according to the precision required for lightweighting, and calculate the cross-section of the arc dividing points including the head and tail points on the elbow; Take the inner intersection of the arc and the arc surface as the starting point for all cross sections, and divide each cross section into multiple points along the same direction; Divide the outer contour of the elbow into multiple rectangles according to the order of sections and the order of points on the sections; The visual direction of triangulation is determined according to the positional relationship between the face where each rectangle is located and the center of the cross section circle, and the set values of all vertices of the outer contour of the elbow and the triangulation index values of the vertices are calculated.
6. The method for generating a lightweight three-dimensional data format suitable for ship model annotation according to claim 5, characterized in that: The geometric body also includes a spherical geometric body, and the analysis of the spherical geometric body model is: Extract the center and radius of the spheroid, and perform multiple cuts along any diameter direction of the spheroid according to the display accuracy requirements; Average the upper and lower arcs of the cutting surface into multiple points according to the display accuracy requirements; Use a method similar to calculating the outer surface of a curved pipe to cut the outer surface of the sphere into multiple cuboids; Calculate the vertex set values and triangulation index values of the outer surface of the sphere.
7. The method for generating a lightweight three-dimensional data format suitable for ship model annotation according to claim 1, characterized in that: After step 6, the client loads the lightweight 3D data format file of the model according to the storage path of the model, including the following steps: First, decompress and transcode the lightweight 3D data format file; Extract the vertex set values of the two-dimensional array of model vertices and concatenate the two-dimensional array into a one-dimensional array; Pass the concatenated one-dimensional array and triangulation index value to the 3D engine to build a meshed 3D model; The name, type, and measurement point coordinates of the gridded 3D model are stored in the corresponding custom attributes.
8. A lightweight 3D data format generation system suitable for ship model annotation, characterized by: include, The export and extraction module is used to use the secondary development program to extract the RVM format model from the ship design software to obtain the model attribute information file; The upload parsing module is used to upload the RVM format model and model attribute information file to the 3D model platform, and then parse it to obtain the attribute value information of the geometric model in the model; The conversion format module is used to integrate the attribute value information of the geometric model and convert it into a lightweight data exchange format; The transcoding and compression module is used to convert the lightweight data exchange format into a binary format, and obtain a lightweight three-dimensional data format through transcoding and compression; The storage module is used to match the lightweight three-dimensional data model attribute information with the name and store it in the database based on the consistency of the model name.
9. An electronic device, characterized in that: include: at least one processor, and a memory communicatively coupled to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the steps of the method according to any one of claims 1 to 7.
10. A computer storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Method for determining ship berthing water area based on AIS data
CN121120948A
Hull equipment virtual-real linkage installation method and device, electronic equipment and storage medium
CN121573121A
A ship three-dimensional model lightening method based on multi-modal collaborative simplification
CN122695145A