Bridge engineering BIM model lightweight conversion and visualization method and system
By directly parsing the triangular mesh data of 3DXML files, and employing a specialized index type parsing algorithm and buffer sharing mechanism, the problems of mesh distortion and low efficiency that exist in the conversion of CATIA models on other platforms are solved, achieving efficient and stable model conversion and visualization.
Patent Information
- Application Number
- CN202610421034.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-01
- Publication Date
- 2026-05-01
- Estimated Expiration
- 2046-04-01
AI Technical Summary
Existing technologies for converting CATIA models to other platforms suffer from problems such as distortion in circular curve mesh reconstruction, low model conversion efficiency, poor stability, and inflexible handling of structural differences, which are particularly prominent in large-scale highway engineering models.
The triangular mesh data in the 3DXML file is directly parsed using a specialized index type parsing algorithm to maintain the order and topology of the triangular mesh. The topology of the triangular mesh is reconstructed through counterclockwise rules and coordinate system transformation, and a buffer sharing mechanism is used to achieve lightweight model transformation.
It improves the efficiency and stability of model conversion, avoids mesh distortion, reduces computational overhead, and ensures the geometric accuracy and structural consistency of the model, making it particularly suitable for large-scale highway engineering models.
Smart Images

Figure CN121962529A_ABST
Abstract
Description
A lightweight conversion and visualization method and system for bridge engineering BIM models Technical Field
[0001] This application relates to the field of BIM technology, and more specifically, to a lightweight conversion and visualization method and system for bridge engineering BIM models. Background Technology
[0002] With the widespread application of BIM technology in highway engineering, CATIA, as a mainstream 3D modeling software, occupies an important position in highway engineering design. However, most non-Dassault platforms in the engineering industry have limited support for CATIA models, making it impossible to directly import CATIA models for downstream applications. To achieve data exchange between CATIA models on different platforms, format conversion is usually required. Currently, the mainstream conversion method is to export CATIA models as Product, Part, STEP, or other format files, and then import them into third-party software (such as 3ds Max) and convert them to common formats such as FBX and OBJ.
[0003] While existing third-party software conversion methods can handle regular model conversions, they present the following technical problems when dealing with highway engineering models:
[0004] Distortion in Mesh Reconstruction of Complex Linear Shapes such as Circular Curves: Highway engineering includes numerous circular curves with complex and variable parameters such as curve length, radius, and turning angle. During format conversion, third-party software, due to the inconsistency between its triangulation topology reconstruction algorithm and CATIA's native algorithm, may exhibit mesh vertex connection errors in areas with short curve lengths and large radii, leading to model shape distortion.
[0005] Efficiency and stability issues in large-scale model conversion: Highway engineering models are characterized by their massive size, often exceeding tens of kilometers and requiring several gigabytes of memory, far surpassing the scale of models in other industries. Third-party software (such as 3DMAX, Fusion 360, etc.) has limited capacity to handle CATIA models. Their general-purpose mesh analysis and reconstruction algorithms need to consider various user needs, consuming a large amount of computing resources and time during the conversion process, and are highly prone to program crashes.
[0006] The flexibility of model structure differentiation is insufficient: highway engineering models include main structures (such as bridge beams) and auxiliary structures (such as guardrails, streetlights, and sound barriers). In practical applications, the main structure needs to be converted into an independent unit for management, while the auxiliary structures can be merged into a whole. Although existing third-party software can achieve this type of differentiation, operators need to be familiar with the software functions, and the processing is time-consuming.
[0007] Based on the aforementioned technical challenges, a new conversion method is urgently needed that can simultaneously meet the requirements of accurate model shape conversion, stable and efficient conversion process, and flexible customization of conversion strategies. Research has shown that direct conversion based on CATIA's 3DXML format is a feasible technical approach. Summary of the Invention
[0008] To address the low efficiency of existing highway engineering model format conversion, this application provides a lightweight conversion and visualization method and system for bridge engineering BIM models. It directly parses the triangular mesh data already existing in the 3DXML file and completes the format conversion while maintaining the original triangular mesh order and topology through specialized parsing algorithms designed for three different index types, thus avoiding the re-triangulation process and improving conversion efficiency.
[0009] One aspect of this application provides a lightweight conversion and visualization method for bridge engineering BIM models, comprising: S1, parsing a 3DXML source file to obtain a Manifest.xml file containing root information, at least one .3dxml file containing model hierarchical relationship data, and at least one .3Drep file containing geometric topology data; S2, parsing Reference3D nodes, Instance3D nodes, Reference Rep nodes, and Instance Rep nodes in the .3dxml file, and constructing a model structure tree with parent-child hierarchical relationships based on the ID values of each node and the reference relationships between nodes; wherein, the ReferenceRep node is associated with the corresponding .3Drep file; S3, extracting vertex coordinates, normal vectors, and texture coordinates sequentially from the Vertex Buffer node of the .3Drep file as vertex attribute data of the triangular mesh; and extracting vertex index type and color attributes from the Faces node. S4. Using an index parsing algorithm, combined with the extracted vertex coordinates, the triangular mesh topology is reconstructed according to the vertex index type to obtain a set of triangular facets with preset normal directions. S5. The model structure tree is mapped to a Node hierarchy structure in glTF format, and the set of triangular facets, vertex attribute data, and color attributes are mapped to Mesh, Material, Accessor, Buffer View, and Buffer data structures in glTF format, respectively, to obtain a glTF format file.
[0010] The 3DXML source file is a lightweight 3D model exchange format developed by Dassault Systèmes, typically existing as a compressed file with the .3dxml extension. The 3DXML source file is the input file for the conversion, containing all the data of the CATIA highway engineering model to be converted.
[0011] The Manifest.xml file is the manifest file within the 3DXML source file and is located in the root directory of the compressed package. The Manifest.xml file obtains the root information of the 3DXML file package, guiding the parsing order and relationships of subsequent files.
[0012] The .3dxml file is an XML format file within the 3DXML source file, primarily storing the hierarchical structure information and assembly relationships of the model. The .3dxml file constructs the model's tree structure, preserving the original parent-child hierarchical relationships and instantiation references.
[0013] A .3Drep file is a binary format file within a 3DXML source file that stores the model's geometric topology data. The .3Drep file is the primary source of geometric data; parsing this file yields all the geometric information needed to construct the triangular mesh.
[0014] Furthermore, a model structure tree with parent-child hierarchical relationships is constructed based on the ID values of each node and the reference relationships between nodes. This includes: determining the parent-child hierarchical relationship between Reference3D nodes based on the Is Aggregated By attribute of the Reference3D node; establishing an instantiation reference relationship between the Instance3D node and the corresponding Reference3D node based on the Is Instance Of attribute of the Instance3D node; associating the Instance3D node with the corresponding parent Reference3D node or Instance3D node based on the Is Aggregated By attribute of the Instance3D node; associating the Instance Rep node with the corresponding Instance3D node based on the Is Aggregated By and Is Instance Of attributes of the InstanceRep node, and establishing an association relationship with the .3Drep file through the Reference Rep node ID pointed to by the Is Instance Of attribute; and traversing all the reference relationships between nodes to construct a model structure tree with parent-child hierarchical relationships, where each node stores the corresponding ID value, attribute information, and association relationship with the .3Drep file.
[0015] Reference3D is a node type in a 3DXML file that defines a model reference object, representing a logical component or part definition in the model assembly structure. Reference3D nodes define the organizational structure of the model, such as logical groupings like road segments, bridges, and tunnels in highway engineering.
[0016] Is Aggregated By is a node's aggregation relationship attribute, specifying which parent node the current node is contained in. The value of this attribute is the ID of the parent node, establishing hierarchical relationships between nodes through this reference. By resolving this attribute, the hierarchical relationships between Reference3D nodes, between Instance3D nodes and Reference3D nodes, and between Instance Rep nodes and Instance3D nodes can be determined.
[0017] Instance3D is a node type in a 3DXML file that defines a model instance object, representing a specific instance of a Reference3D node at a particular location. It contains transformation information such as position, rotation, and scaling, and the model definition is reused by referencing the Reference3D node. Instance3D nodes represent specific instances of model components, such as repeatedly used guardrail sections or streetlights in highway engineering.
[0018] The `Is Instance Of` property is an instance reference property that specifies the reference node referenced by the current instance node. For an `Instance3D` node, this property value is its corresponding `Reference3D` node ID; for an `Instance Rep` node, this property value is its corresponding `Reference Rep` node ID. The `Is Instance Of` property establishes the association between the instance and the reference, enabling a model data reuse mechanism.
[0019] An Instance Rep is a node type in a 3DXML file that defines a geometric representation instance, representing a use case of actual geometric data. It references a Reference Rep node via the Is Instance Of attribute, which in turn is associated with the geometric data in a specific .3Drep file. The Instance Rep node acts as a bridge connecting the model's logical structure (Instance3D) and the geometric data (.3Drep file). Multiple Instance Rep nodes can reference the same Reference Rep, enabling efficient reuse of geometric data.
[0020] The Is Aggregated By attribute of the Instance Rep node functions the same as other nodes, specifying which Instance3D node contains the Instance Rep node. This attribute associates the geometric representation instance with a specific model instance. This attribute ensures that geometric data is correctly associated with its corresponding position in the model's structure tree, maintaining a complete mapping from logical structure to geometric representation.
[0021] Furthermore, the index type can be triangles, strips, or fans.
[0022] In this context, `triangles` is the most basic vertex index type for triangular meshes in a 3DXML file, representing an independent triangle list pattern. Under this index type, every three consecutive vertex indices form an independent triangle, and each triangle in the index sequence needs to explicitly specify its three vertices. For example, the index sequence [0, 1, 2, 3, 4, 5] defines two triangles: and In this application, the parsing of the triangles type is the most straightforward; the triangle faces can be reconstructed by sequentially reading the data in groups of three indices.
[0023] Strips is a triangle stripe index type that defines multiple triangles consecutively by sharing edges to reduce the amount of index data. In strips mode, starting from the third vertex, each additional vertex forms a new triangle with the previous two vertices, and the vertex order is adjusted alternately according to an even / odd rule to maintain consistent normal directions. For example, the index sequence [0, 1, 2, 3, 4] defines 3 triangles: , , In this application, the strips type requires a specialized parsing algorithm to correctly construct the vertex order of the triangle through parity judgment.
[0024] `fans` is a triangular sector index type, where the first vertex is the center, and the other vertices are arranged in a sector-like triangular sequence around the center vertex. In `fans` mode, the first vertex... As the common vertex of all triangles, each subsequent pair of adjacent vertices forms a triangle with the central vertex. For example, the index sequence [0, 1, 2, 3, 4] defines 3 triangles: , , In this application, the parsing algorithm for the fans type will... A grid structure that expands outwards in a fan shape from a central vertex can be used to represent a circular or fan-shaped area.
[0025] Furthermore, when the vertex index type is triangles, the vertex indices are read sequentially from the index sequence, and every three consecutive vertex indices construct a triangle facet.
[0026] Furthermore, when the vertex index type is strips: identify multiple sets of index data separated by a preset symbol in the strips data, and parse each set of index data separately; where the preset symbol is a comma; for each set of strips data, set the vertex index sequence as follows: Where n≥2, n-2 triangular patches are generated; for the i-th generated triangular patch, where 1≤i≤n-2: if i is odd, the vertex index of the triangle is... If i is even, then the vertex indices of the triangle are... .
[0027] In particular, in highway engineering models, the strips index type is widely used to represent continuous strip-shaped mesh structures such as road surface layers and bridge deck paving. In strips mode, due to the shared edges of adjacent triangles, simply extracting vertices sequentially can result in opposite normal directions for adjacent triangles (one facing outwards and the other inwards), causing rendering errors in shading and highlighting. Traditional methods require recalculating and adjusting the normal direction of each triangle through vector cross products, which represents a huge computational burden for highway models that are often tens of kilometers long.
[0028] This application is approved by the parity rule (odd numbers are...). When the number is even, it is During the parsing phase, it is ensured that all triangles maintain a consistent normal orientation according to the right-hand rule, completely avoiding the recalculation of normals. This design fully utilizes the original topological information of the strips data in the 3DXML format, achieving efficient parsing with a linear time complexity of O(n) while ensuring geometric accuracy.
[0029] Furthermore, when the vertex index type is fans: set the vertex index sequence to... Where n≥2, Using the central vertex as the center, generate n-1 triangular facets; for the i-th generated triangular facet, where 1≤i≤n-1, the vertex index of the triangle is... .
[0030] In particular, in highway engineering models, the fans index type is especially suitable for representing components with radial symmetry features, such as circular manhole covers, pipe ends, and the top and bottom surfaces of circular bridge piers.
[0031] Traditional triangulation methods for processing circular or sector-shaped regions typically require recalculating the center point and performing triangulation. This process is prone to problems such as center point offset or uneven triangle distribution. This is especially true for large-radius circular arc components commonly found in highway engineering (such as large circular tunnel entrances and circular ramp areas), where retriangulation may lead to deformation of the originally regular radial mesh.
[0032] This application identifies V0 as a predefined center vertex, and follows... The fixed pattern for generating triangles fully preserves the carefully designed radial topology of the original CATIA model. This method... The analytical method centered on the axis not only ensures the accuracy of the geometric center of the circular component, but more importantly, it maintains the uniform distribution of triangles around the center, avoiding the loss of accuracy that may be caused by recalculating the center point and re-subdividing.
[0033] Furthermore, the triangular mesh topology is reconstructed according to the vertex index type to obtain a set of triangular patches with preset normal directions, including: obtaining the corresponding coordinates from the vertex coordinates extracted in step S3 based on the parsed vertex index, and constructing triangular patches.
[0034] In this method, the three vertices of the triangle are arranged in a counterclockwise order so that the determined normal direction is perpendicular to the triangle face and outwards, resulting in a set of triangular facets with a consistent normal orientation.
[0035] Counter-clockwise (CCW) refers to the arrangement of the three vertices of a triangle in a counter-clockwise direction when viewed from the positive direction of the triangle's normal (i.e., the front of the triangle). Specifically, for the three vertices of a triangle... ,according to arrive arrive When connected in sequence, a counterclockwise loop is formed when viewed from the positive direction of the normal.
[0036] Highway engineering models contain numerous thin-walled structures (such as bridge railings, tunnel linings, and sound barriers), which are typically only visible from one side. The counter-clockwise vertex order directly determines the face orientation of triangles, thus affecting the rendering optimization of back-face culling. By standardizing the vertex order during the transformation phase, we ensure that the visible face orientation of all triangles is consistent, avoiding display errors such as inward / outward flipping or partial face disappearance in the glTF rendering environment.
[0037] This application needs to handle three different index types: triangles, strips, and fans, each with a different vertex organization in the original data. By strictly following the counter-clockwise rule in the parsing algorithm—strips type using alternating odd and even numbers, and fans type expanding from the center—triangles are ultimately generated in a counter-clockwise order.
[0038] Furthermore, the process includes the following steps after S4 and before S5:
[0039] Coordinate system transformation steps: Identify the coordinate system orientation of the 3DXML source file, where the 3DXML source file uses a coordinate system with the Z-axis pointing upwards; obtain the root node of the glTF format file generated in step S5; set the rotation transformation matrix in the matrix property of the root node to convert the coordinate system with the Z-axis pointing upwards to a coordinate system with the Y-axis pointing upwards; for multiple Instance3D nodes generated from the same Reference3D node, read the RelativeMatrix data stored in each Instance3D node from the model structure tree; assign the RelativeMatrix data to the matrix property of the corresponding glTF format Node object, so that each Instance3D node created based on the same Reference3D node has its own independent position, rotation, and scaling transformation in three-dimensional space.
[0040] Among them, the coordinate system with the Z-axis pointing upward refers to the right-handed coordinate system with the positive Z-axis direction representing the upward direction, where the X-axis and Y-axis form a horizontal plane, and the Z-axis is perpendicular to the horizontal plane and points upward.
[0041] The matrix property is the transformation matrix property of a Node in glTF format, which defines the position, rotation, and scaling transformations of the node in 3D space.
[0042] A rotation transformation matrix is a special type of 4×4 matrix used to perform rotation operations in three-dimensional space. In this application, the matrix is specifically a transformation matrix that rotates the Z-axis by -90 degrees, transforming the coordinate system along the Z-axis into a coordinate system along the Y-axis. The matrix has the form: ([1, 0, 0, 0], [0, 0, 1, 0], [0, -1, 0, 0], [0, 0, 0, 1]). This matrix is applied to the root node to achieve the coordinate system transformation of the entire model.
[0043] A Y-axis-up coordinate system is a right-handed coordinate system where the positive Y-axis represents the upward direction, and the X and Z axes form a horizontal plane, with the Y-axis perpendicular to the horizontal plane and pointing upwards. In this application, the Z-axis-up coordinate system of 3DXML needs to be converted to the Y-axis-up coordinate system required by glTF.
[0044] The Relative Matrix is a 4×4 transformation matrix stored in the Instance3D node of the 3DXML file. It defines the local spatial transformation of the instance relative to its parent node, including relative position, rotation angle, and scaling. In this application, this matrix data is extracted from the model structure tree and directly assigned to the corresponding glTFNode object, ensuring the correct spatial positioning of multiple instances of the same Reference3D (such as repeated guardrail segments).
[0045] A Node object is a data structure in glTF format that represents nodes in a scene graph, organizing the hierarchical structure and spatial transformations of the model. Each Node object can contain a matrix property defining its transformations, a children array defining child nodes, and a mesh property referencing geometric data, etc.
[0046] In particular, highway engineering models involve complex spatial positioning, including the precise coordinates of the road centerline, the spatial assembly relationships of bridge components, and the relative positions of tunnels and terrain. CATIA uses the Z-axis upwards, which conforms to engineering design practices (elevation is the Z value), while the glTF standard uses the Y-axis upwards, which conforms to computer graphics conventions.
[0047] Traditional transformation methods require traversing every vertex for coordinate transformation, which is computationally intensive and prone to error accumulation for highway models containing millions of vertices. This application innovatively applies the rotation transformation matrix only to the root node of glTF, leveraging the matrix cascading characteristics of the graphics rendering pipeline to complete the coordinate system transformation of the entire model in one go, avoiding the computational overhead of vertex-by-vertex transformation.
[0048] More importantly, the solution preserves the original value of the Relative Matrix of the Instance3D node, directly assigning it to the glTF Node object. This means that the relative positional relationships of a large number of repetitive components in highway engineering (such as guardrail sections and streetlights at fixed intervals) can be accurately maintained, achieving both correct coordinate system transformation and avoiding the need to recalculate the transformation matrix for each instance.
[0049] Furthermore, the triangular facet set, vertex attribute data, and color attributes are mapped to glTF format Mesh, Material, Accessor, Buffer View, and Buffer data structures, respectively. This includes: storing the vertex coordinates and normal vectors after coordinate system transformation as a first data array; storing the texture coordinates and color attributes extracted in step S3 as a second and third data array, respectively; storing the vertex indices in the triangular facet set obtained in step S4 as an index array; identifying the same .3Drep file associated with multiple Instance Rep nodes referencing the same Reference Rep node in step S2; creating a Buffer data block for the .3Drep file, storing the corresponding first, second, third, and index arrays; wherein the Buffer data block is shared by multiple Instance Rep nodes referencing the same Reference Rep node; creating an independent Buffer View for each Instance Rep node's generated glTF format Mesh object; and setting the Buffer View's buffer index, byte offset, and byte length parameters to enable multiple Buffers to... The View points to the corresponding data area within the same Buffer; converts the numerical data in the first data array, second data array, third data array, and index array into binary format; stores the binary format data directly as a separate .bin file, setting the path of the corresponding .bin file in the URI property of the Buffer object; or encodes the binary format data using Base64 and embeds it as a data URI into the URI property of the Buffer object.
[0050] In this context, the Buffer data block is the basic container for storing raw binary data in the glTF format, containing binary representations of geometric data such as vertex coordinates, normals, texture coordinates, color values, and indices. In this application, a Buffer data block is created for each .3Drep file, storing all geometric data (first, second, and third data arrays and index arrays) in the same block, thus achieving centralized management and reuse of geometric data.
[0051] A Buffer View is a data view object in the glTF format that defines how to access specific data segments from a Buffer. It does not store the actual data; instead, it achieves logical data segmentation by referencing the Buffer and specifying the access range. In this application, an independent Buffer View is created for each Instance Rep node. Multiple Buffer Views can point to different areas of the same Buffer, achieving data sharing while maintaining access independence.
[0052] The buffer index is an integer attribute in the Buffer View object that specifies the index position of the Buffer referenced by the Buffer View in the buffers array of the glTF file. In this application, multiple Buffer Views reference the same Buffer data block by setting the same buffer index value, thus implementing a mechanism for multiple Instance Rep nodes to share the same geometry data.
[0053] The byte offset is a byte offset attribute of a Buffer View object, representing the starting position of the Buffer View within the referenced Buffer, in bytes. In this application, by precisely setting the byte offset value, different Buffer Views can accurately locate the specific position within the Buffer where vertex coordinates, texture coordinates, color attributes, or index data are stored.
[0054] byte Length is a data length property of the Buffer View object, defining the number of bytes to be accessed starting from the byteOffset position. In this application, byte Length is set according to the actual size of the specific data type (such as vertex arrays, index arrays, etc.) to ensure that the Buffer View accurately covers the required data range and avoids out-of-bounds access.
[0055] The uri attribute contains the relative path or URL of the .bin file, such as model.bin. In this application, the converted binary data is saved as a separate .bin file, and then the file path is set in the uri attribute of the Buffer, which realizes the separate storage of data and structure, and facilitates the chunked loading of large models.
[0056] A data URI is a URI scheme that directly encodes and embeds binary data into text, with the format data:application / octet-stream;base64. In this application, for smaller model data, the binary data can be Base64 encoded and directly embedded into the uri attribute of the buffer in the form of a data URI, generating a self-contained single glTF file, which simplifies file management and transmission.
[0057] In particular, highway engineering models are typically characterized by a large number of repetitive components—kilometers of guardrail are formed by repeating the same guardrail segments, dozens of bridge beams are geometrically identical only in different positions, and the lighting fixtures inside tunnels are completely identical, etc. Traditional conversion methods copy the complete geometric data for each instance, resulting in a dramatic increase in file size.
[0058] This application creates a unique buffer data block for each unique .3Drep file, storing vertex, texture, color, and index data uniformly, thus avoiding duplicate storage of geometric data. For a highway model containing thousands of identical guardrail segments, the geometric data only needs to be stored once.
[0059] Furthermore, by precisely setting the byte Offset and byte Length parameters, multiple Mesh objects' BufferViews can point to the corresponding areas of the same Buffer, enabling flexible data referencing.
[0060] Another aspect of this application provides a lightweight conversion and visualization system for bridge engineering BIM models, used to execute a lightweight conversion and visualization method for bridge engineering BIM models according to this application, including: a file parsing module, which parses 3DXML source files to obtain a Manifest.xml file containing root information, at least one .3dxml file containing model hierarchical relationship data, and at least one .3Drep file containing geometric topology data; a model building module, which parses Reference3D nodes, Instance3D nodes, Reference Rep nodes, and Instance Rep nodes in the .3dxml file, and constructs a model structure tree with parent-child hierarchical relationships based on the ID values of each node and the reference relationships between nodes; and a data extraction module, which extracts data from the Vertex data of the .3Drep file. The Buffer node extracts vertex coordinates, normal vectors, and texture coordinates sequentially as vertex attribute data for the triangular mesh. Vertex index type and color attributes are extracted from the Faces node. The mesh reconstruction module uses an index parsing algorithm, combined with the extracted vertex coordinates, to reconstruct the triangular mesh topology according to the vertex index type, resulting in a set of triangular faces with preset normal directions. Index types include triangles, strips, or fans. The coordinate system transformation module identifies the Z-axis upward coordinate system of the 3DXML source file, sets a rotation transformation matrix in the matrix attribute of the root node of the glTF format file, and converts the Z-axis upward coordinate system to the Y-axis upward coordinate system. It also assigns the Relative Matrix data of the Instance3D node to the matrix attribute of the corresponding glTF format Node object. The format mapping conversion module maps the model structure tree to a glTF format Node hierarchy structure, and maps the triangular face set, vertex attribute data, and color attributes to glTF format Mesh, Material, Accessor, Buffer View, and Buffer data structures, respectively. For multiple Instance Rep nodes referencing the same Reference Rep node, a shared Buffer data block and an independent Buffer View are created.
[0061] Compared to existing technologies, the advantages of this application are:
[0062] (1) This application fundamentally avoids the re-triangulation process by directly parsing the three existing index types of 3DXML: triangles, strips, and fans. For ultra-large-scale BIM models of highway engineering projects, which are often tens of kilometers long and require several gigabytes of memory, traditional conversion methods require reconstruction of triangular meshes, which is not only computationally time-consuming (often taking several hours), but more seriously, it is prone to crashing due to memory overflow. This application adopts a direct parsing algorithm with linear time complexity, combined with parity rules for strips type and fan-shaped expansion algorithm for fans type, to shorten the conversion time to the minute level, while avoiding peak memory usage and ensuring the stability and reliability of the large-scale engineering model conversion process.
[0063] (2) This application establishes a data reuse mechanism based on buffer sharing by identifying multiple instance Rep nodes that reference the same Reference Rep node, while maintaining the original triangulation order and topology completely unchanged. This design not only ensures lossless conversion of model geometric information and avoids accuracy errors that may be introduced by retriangulation, but more importantly, it enables one-time storage and multiple references for a large number of repetitive components in highway engineering (such as guardrails, street lights, bridge piers, etc.), thereby greatly improving the efficiency of model transmission and rendering loading. Attached Figure Description
[0064] Figure 1 is an exemplary flowchart of a lightweight conversion and visualization method for bridge engineering BIM models according to this application;
[0065] Figure 2 is a schematic diagram of the 3DXML file structure of this application;
[0066] Figure 3 is a schematic diagram of the hierarchical relationship transformation of the structure tree in this application;
[0067] Figure 4 is a schematic diagram of the hierarchical structure parsing process of this application;
[0068] Figure 5 is a schematic diagram of the geometric analysis process of this application;
[0069] Figure 6 is a schematic diagram of the vertex index representation method of this application;
[0070] Figure 7 is a schematic diagram of the glTF format structure of this application;
[0071] Figure 8 shows an engineering application effect of this application. Detailed Implementation
[0072] The present application will now be described in detail with reference to the accompanying drawings and specific embodiments.
[0073] As shown in Figure 1, this application includes: parsing a 3DXML source file to obtain a Manifest.xml file containing root information, at least one .3dxml file containing model hierarchical relationship data, and at least one .3Drep file containing geometric topology data; parsing Reference3D nodes, Instance3D nodes, Reference Rep nodes, and Instance Rep nodes in the .3dxml file, and constructing a model structure tree with parent-child hierarchical relationships based on the ID values of each node and the reference relationships between nodes; wherein, the Reference Rep node is associated with the corresponding .3Drep file; extracting vertex coordinates, normal vectors, and texture coordinates sequentially from the VertexBuffer node of the .3Drep file as vertex attribute data of the triangular mesh; extracting vertex index type and color attributes from the Faces node; using an index parsing algorithm, combined with the extracted vertex coordinates, reconstructing the triangular mesh topology according to the vertex index type to obtain a set of triangular facets with preset normal directions; mapping the model structure tree to a Node hierarchy structure in glTF format, and mapping the triangular facet set, vertex attribute data, and color attributes to Mesh, Material, Accessor, and Buffer in glTF format, respectively. Using the View and Buffer data structures, a glTF format file is obtained.
[0074] 3DXML, developed by Dassault Systèmes, is a model format that encapsulates geometric, structural, and product information using the XML language. As the standard export format for CAITA software, it contains all the information about the model within the software.
[0075] To decompress a 3dxml file, you can use your development program to call the built-in Windows zip decompression method. However, in certain situations, for easier calculation and viewing, a convenient method is to change the file extension to *.rar and decompress it directly using Windows decompression software. The names and functions of the decompressed files are shown in Figure 2.
[0076] The root node of a file with the .xml extension records the root information of the model. Files with the .3dxml extension contain... <reference3d> 、 <instance3d>,<Reference Rep> and<Instance Rep> Four nodes, each with a unique ID value, are used to reconstruct the hierarchical relationship of the model's structure tree through the references between the four nodes. A file with the .3Drep extension contains the model's... <faces> 、 <edges>,as well as<Vertex Buffer> . <edges>The information contained here is edge line information, which is not very meaningful for model reconstruction based on triangular faces, and will not be analyzed in this study. <faces>The index in the node can be used to obtain the order of the triangulation and the color of the face. The order of the triangles can be represented in three ways: triangles, strips, and fans, corresponding to different parsing orders. The color of the face is represented by Color.<Vertex Buffer> It contains the vertex coordinates parsed in sequence, as well as the normal information of the faces. If there is a texture, it also contains the corresponding UV coordinate information.
[0077] The 3dxml file is parsed by reading, extracting, simplifying, classifying and storing the information in these files, and the subsequent model reconstruction is achieved based on the parsed and stored information.
[0078] 3DXML files are 3D documents that further integrate model information based on XML files. To improve the efficiency of model conversion, only necessary information is parsed; the remaining information is read and saved, and only used when necessary. The parsing and decompression of the file begins, obtaining the associated 3DXML and 3DRep files through Mianfest.xml. The focus is on parsing the hierarchical relationships and geometry of the model; the reading of other information follows the methods used for obtaining text information.
[0079] Before parsing *.3dxml files, it's essential to understand the concepts of Reference and Instance in CATIA assemblies. In the assembly document, a Reference cannot be displayed independently; it is displayed by generating Instances. All Instances are generated from Reference instantiations. One Reference can generate multiple Instances, and the positional relationships between multiple Instances are represented by a Relative Matrix. In the structure tree, each level of data contains both Reference and Instance information.
[0080] Similarly, the most important thing in parsing the hierarchy of a tree is understanding <reference3d> 、 <instance3d>,<Reference Rep> and<Instance Rep> The relationship between the four levels. In the 3dxml file, this is achieved through...<Is AggregatedBy> This indicates that the current instances are clustered under the Instance generated by the Reference; in simpler terms, it's its parent instance. Through...<Is Instance Of> This indicates which Reference instantiated the current Instance; in simpler terms, it's the generated child instance. They are associated with each other through a unique ID, and the hierarchical relationship and transformations are shown in Figure 3.
[0081] Starting with the Instance3D collection in the file, it links upwards to the parent's ID and downwards to the child's ID. Following this thread of IDs, the complete tree structure can be parsed. To do this, a data class is first created to receive the Instance3D data collection. Based on the ID associations, a new data class (represented by TreeNode) is created to receive hierarchical data. The class searches downwards level by level for associated References, then checks if any Instances generated from the References have children. If children exist, a new data class is received through the Children (also of type TreeNode) within the TreeNode data class. The associations are then searched again using the child's ID. After multiple nesting steps, a hierarchical data structure is output. The search process is shown in Figure 4.
[0082] The corresponding 3DRep file is obtained by reading the Reference Rep nodes of the hierarchical structure, parsing the geometric information stored in the file, and receiving it through a data class. The 3DRep file includes... <edges> 、 <faces>and<Vertex Buffers> There are three levels, the most important of which are geometric information such as vertex order, vertex coordinates, normal coordinates, UV coordinates, RGB values, and edge values. The parsing process is shown in Figure 5.
[0083] Vertex indices are a crucial control factor in determining the rendering and display of a triangular mesh. In CATIA software, the vertex indices of a triangular mesh are counter-clockwise, with the normal direction perpendicular to the plane and outwards. This ensures that every triangle can be rendered and displayed. In the 3DRep file, the vertex indices are stored in... <faces>The nodes are represented in three ways: triangles, strips, and fans, as shown in Figure 6.
[0084] The vertex indices of triangles are added in order. The strip, as shown in Figure 6, is represented in the file as follows. First, determine the index of the first triangle. The next triangle only needs one more vertex to form a new triangle with the previous two vertices. For example, adding one more vertex to the second triangle... Vertex, and , Create a new index Add vertices to the third triangle To form a new index Summarize the pattern, and let i represent the number of triangles. This represents the index of the i-th vertex. When i is odd, the triangle index is represented as... When i is even, the index of the triangle is represented as... When parsing a strip, it's important to note that data separated by commas, such as... He stated that the two sets of data needed to be converted into sets, with each set processed separately. The fan representation in the file is shown in Figure 6. Each time a triangle is added, only two vertices need to be added. Summarize the pattern in the file, using 'i' to represent the number of triangles. This represents the index value of the i-th vertex. It is the central vertex, and the index of each triangle can be represented as... The remaining Position, Normal, and other information can be read sequentially and added to the database.
[0085] glTF is a universal 3D format that allows engines and applications to efficiently transfer and load 3D scenes and models. The model information was obtained through file parsing. Because it was necessary to maintain the original hierarchical structure of the model and to export it as a universal format, glTF was ultimately chosen as the conversion target after comparison. The structure of the glTF format is shown in Figure 7.
[0086] Scene represents a scene. Generally, there is only one scene for the same model. During the conversion process, the default value of 0 is used to indicate that there is only one scene. The nodes under the scenes property reference the default node as the root node.
[0087] A Node represents a node, corresponding to the parsed hierarchical data. Each node contains a `children` array. If a `children` array does not exist, it indicates the final level, and the `mesh` index is used to indicate the final display effect. Cross-referencing forms the hierarchical structure of the model. During transformation, only the hierarchical data needs to be dereferenced and sequentially filled into the `children` array. It's important to note the `matrix`, which represents the transformation operation on the node object using a matrix. In CATIA software, it reads along the Z-axis upwards, but in glTF format, it reads along the Y-axis upwards. A rotation transformation needs to be performed on the root node using a rotation matrix. Furthermore, for objects generating different instances from the same reference (such as guardrails and streetlights), different positional relationships are defined using the `matrix`.
[0088] Mesh and Accessor together describe the index of geometry, including position information index, index information index, normal information index, material information, buffer view index, and the byte length occupied by vertices, etc. All of this information can be extracted from the parsed data.
[0089] Material represents the model's material, which corresponds to Mesh. By associating the parsed RGB values, UV coordinates, Images, and other values with the created Material object, material information is assigned to each mesh surface.
[0090] The Buffer View and buffer define the specific geometric information data. The Buffer View provides descriptive information, corresponding to the Accessor mentioned above, and determines the model's geometry by linking to the specific data information in the buffer. In the buffer node, the geometric information is converted into Base64 numerical encoding. To avoid excessive memory usage for component information and to facilitate indexing in the Buffer View, vertex data, vertex indices, and normal data are separated according to different meshes, generating multiple data sets.
[0091] By parsing and converting 3DXML files, the rendering order of the model's triangular mesh is preserved according to the initial creation order. Whether it's circular curves or other complex structures, the triangular meshes are created accurately according to the original correct order, resolving the issue of errors in model conversion by third-party software. Furthermore, the 3DXML file format conversion is a targeted process, converting only necessary information and simplifying other model details to the maximum extent. It does not involve other software and is only related to the algorithm itself. The final exported format is stable and standardized, eliminating the risk of software crashes. Finally, during the parsing process, a single buffer data can be referenced multiple times, similar to references and instances in CATIA. One reference can instantiate multiple instances, transforming the model into manipulable data that can be freely combined to form different integrated or discrete models. This provides a solution to the aforementioned problem of insufficient degrees of freedom.
[0092] The format conversion method studied in this paper was applied to the Chongqi Bridge Digital Maintenance Management Platform project. This method uses a developed format conversion tool to convert 3D XML files exported from CATIA, significantly reducing model export time while maintaining good information expansion capabilities. The converted model based on this research has been fully utilized in the Chongqi Bridge Digital Maintenance Management Platform, achieving excellent application results. The demonstrated effect is shown in Figure 8.
[0093] By developing a format conversion tool, we successfully achieved efficient conversion of 3D XML files exported from CATIA, significantly improving model export efficiency and enhancing information scalability. This achievement has been fully applied in the Chongqi Bridge Digital Maintenance Management Platform project, demonstrating the practicality and reliability of the method presented in this paper. This conversion method not only shortens the export time for detailed and complex models but also improves the compatibility and flexibility of the information data contained in the models, thus providing solid technical support for model and data exchange in similar projects.
[0094] The foregoing illustrative description of the present application and its embodiments is not restrictive and can be implemented in other specific forms without departing from the spirit or essential characteristics of the present application. The accompanying drawings are only one embodiment of the present application, and the actual structure is not limited thereto. Therefore, if those skilled in the art are inspired by this description and design similar structures and embodiments without departing from the spirit of the present application, such designs should fall within the scope of protection of this application. Furthermore, the use of the word "include" does not exclude other elements or steps, and a word preceding an element does not exclude the inclusion of multiple such elements. Terms such as "first," "second," etc., are used to indicate names and do not indicate any specific order.< / faces> < / faces> < / edges> < / reference3d> < / faces> < / edges> < / edges> < / faces> < / reference3d>
Claims
1. A lightweight conversion and visualization method for bridge engineering BIM models, characterized in that, include: S1. Parse the 3DXML source file to obtain a Manifest.xml file containing root information, at least one .3dxml file containing model hierarchy relationship data, and at least one .3Drep file containing geometric topology data; S2. Parse the Reference3D node, Instance3D node, Reference Rep node, and Instance Rep node in the .3dxml file, and construct a model structure tree with parent-child hierarchical relationships based on the ID value of each node and the reference relationship between nodes; wherein, the Reference Rep node is associated with the corresponding .3Drep file; S3. Extract vertex coordinates, normal vectors, and texture coordinates sequentially from the Vertex Buffer node of the .3Drep file as vertex attribute data of the triangular mesh; extract vertex index type and color attribute from the Faces node; S4. Using an index parsing algorithm, combined with the extracted vertex coordinates, reconstruct the triangular mesh topology according to the vertex index type to obtain a set of triangular facets with preset normal directions; S5 maps the model structure tree to a Node hierarchy structure in glTF format, and maps the triangle face set, vertex attribute data and color attributes to Mesh, Material, Accessor, Buffer View and Buffer data structures in glTF format respectively, to obtain a glTF format file.
2. The lightweight conversion and visualization method for bridge engineering BIM models according to claim 1, characterized in that: A model structure tree with parent-child hierarchical relationships is constructed based on the ID values of each node and the reference relationships between nodes. This includes: determining the parent-child hierarchical relationship between Reference3D nodes based on the Is Aggregated By attribute of the Reference3D node; establishing an instantiation reference relationship between the Instance3D node and its corresponding Reference3D node based on the Is Instance Of attribute of the Instance3D node; associating the Instance3D node with its corresponding parent Reference3D node or Instance3D node based on the Is Aggregated By attribute of the Instance3D node; associating the InstanceRep node with its corresponding Instance3D node based on the Is Aggregated By and Is Instance Of attributes of the Instance Rep node, and establishing an association relationship with the .3Drep file through the Reference Rep node ID pointed to by the Is Instance Of attribute; and traversing all the reference relationships between nodes to construct a model structure tree with parent-child hierarchical relationships, where each node stores its corresponding ID value, attribute information, and association relationship with the .3Drep file.
3. The lightweight conversion and visualization method for bridge engineering BIM models according to claim 2, characterized in that: The index type is triangles, strips, or fans.
4. The lightweight conversion and visualization method for bridge engineering BIM models according to claim 3, characterized in that: When the vertex index type is triangles, the vertex indices are read sequentially from the index sequence, and every three consecutive vertex indices form a triangle facet.
5. The lightweight conversion and visualization method for bridge engineering BIM models according to claim 3, characterized in that: When the vertex index type is strips: identify multiple sets of index data separated by a preset symbol in the strips data, and parse each set of index data separately; where the preset symbol is a comma; for each set of strips data, set the vertex index sequence as follows. Where n≥2, n-2 triangular patches are generated; for the i-th generated triangular patch, where 1≤i≤n-2: if i is odd, the vertex index of the triangle is... If i is even, then the vertex indices of the triangle are... 。 6. The lightweight conversion and visualization method for bridge engineering BIM models according to claim 3, characterized in that: When the vertex index type is fans: Set the vertex index sequence to Where n≥2, Using the central vertex as the center, generate n-1 triangular facets; for the i-th generated triangular facet, where 1≤i≤n-1, the vertex index of the triangle is... 。 7. The lightweight conversion and visualization method for bridge engineering BIM models according to claim 6, characterized in that: Reconstructing the triangular mesh topology according to the vertex index type yields a set of triangular facets with a preset normal direction. This includes: obtaining the corresponding coordinates from the vertex coordinates extracted in step S3 based on the parsed vertex index, and constructing triangular facets; wherein the three vertices of the triangle are arranged in a counterclockwise order so that the determined normal direction is perpendicular to the triangle and outwards, resulting in a set of triangular facets with a consistent normal orientation.
8. The lightweight conversion and visualization method for bridge engineering BIM models according to claim 7, characterized in that: After step S4 and before step S5, the following steps are included: a coordinate system transformation step: identifying the coordinate system orientation of the 3DXML source file, wherein the 3DXML source file uses a coordinate system with the Z-axis upward; obtaining the root node of the glTF format file generated in step S5; setting a rotation transformation matrix in the matrix property of the root node to convert the coordinate system with the Z-axis upward to a coordinate system with the Y-axis upward; for multiple Instance3D nodes generated from the same Reference3D node, reading the Relative Matrix data stored in each Instance3D node from the model structure tree; assigning the Relative Matrix data to the matrix property of the corresponding glTF format Node object, so that each Instance3D node created based on the same Reference3D node has its own independent position, rotation, and scaling transformation in three-dimensional space.
9. The lightweight conversion and visualization method for bridge engineering BIM models according to claim 8, characterized in that: The set of triangle faces, vertex attribute data, and color attributes are mapped to glTF format Mesh, Material, Accessor, Buffer View, and Buffer data structures, respectively. This includes: storing the vertex coordinates and normal vectors after coordinate system transformation as a first data array; storing the texture coordinates and color attributes extracted in step S3 as a second and third data array, respectively; storing the vertex indices in the triangle face set obtained in step S4 as an index array; identifying the same .3Drep file associated with multiple Instance Rep nodes referencing the same Reference Rep node in step S2; creating a Buffer data block for the .3Drep file, storing the corresponding first, second, third, and index arrays; wherein the Buffer data block is shared by multiple Instance Rep nodes referencing the same Reference Rep node; creating an independent Buffer View for each Instance Rep node's generated glTF format Mesh object; and setting the Buffer View's buffer index, byte offset, and byte length parameters to enable multiple Buffer Views to... The View points to the corresponding data area within the same Buffer; converts the numerical data in the first data array, second data array, third data array, and index array into binary format; stores the binary format data directly as a separate .bin file, setting the path of the corresponding .bin file in the URI property of the Buffer object; or encodes the binary format data using Base64 and embeds it as a data URI into the URI property of the Buffer object.
10. A lightweight conversion and visualization system for bridge engineering BIM models, used to execute the method described in any one of claims 1 to 9, characterized in that, include: The file parsing module parses the 3DXML source file, obtaining a Manifest.xml file containing root information, at least one .3dxml file containing model hierarchy relationship data, and at least one .3Drep file containing geometric topology data. The model building module parses the Reference3D, Instance3D, ReferenceRep, and Instance Rep nodes in the .3dxml file, constructing a model structure tree with parent-child hierarchical relationships based on the ID values of each node and the reference relationships between nodes. The data extraction module extracts data from the Vertex data in the .3Drep file. The Buffer node extracts vertex coordinates, normal vectors, and texture coordinates sequentially as vertex attribute data for the triangular mesh. The Faces node extracts vertex index type and color attributes. The mesh reconstruction module uses an index parsing algorithm, combined with the extracted vertex coordinates, to reconstruct the triangular mesh topology according to the vertex index type, resulting in a set of triangular faces with preset normal directions. Index types include triangles, strips, or fans. The coordinate system transformation module identifies the Z-axis upward coordinate system of the 3DXML source file, sets a rotation transformation matrix in the matrix property of the root node of the glTF format file, converts the Z-axis upward coordinate system to the Y-axis upward coordinate system, and assigns the Relative Matrix data of the Instance3D node to the matrix property of the corresponding glTF format Node object. The format mapping and conversion module maps the model structure tree to a Node hierarchy structure in glTF format, and maps the triangle face set, vertex attribute data and color attributes to Mesh, Material, Accessor, BufferView and Buffer data structures in glTF format, respectively; for multiple Instance Rep nodes that reference the same Reference Rep node, it creates a shared Buffer data block and an independent Buffer View.
Citation Information
Patent Citations
Method and device for converting BIM model data into glTF data, equipment and medium
CN110751696A
Building model lightweight method based on gltf
CN115511984A
BIM model lightweight method
CN118821284A
Railway BIM model lightweight processing method
CN119150406A
Image coding system and method
EP3886055A1