BIM model linear component instantiation method and system and medium

By extracting the contours of linear components in the BIM model and performing geometric similarity comparison and transformation matrix calculation, the problems of low instantiation rate of linear components and information loss are solved, and efficient GPU rendering and information retention are achieved.

CN120449280APending Publication Date: 2025-08-08TONGJI UNIV ARCHITECTURAL DESIGN INST GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510671447.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-23
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

In the BIM model rendering, the instantiation rate of linear components is low, and information loss is severe in the traditional conversion process, so it is impossible to effectively utilize the characteristics of linear components to improve GPU rendering performance.

Method used

By traversing the Revit file, the cross-sectional profile of the linear component is extracted and converted into a contour vertex sequence, geometric similarity comparison is performed, standard geometry of unit length is generated, and the contour and baseline transformation matrix is calculated through singular value decomposition, and the standard geometry is finally restored to the real position and pose of the instance, and instantiated data is derived.

Benefits of technology

It significantly improves the instantiation rate of linear components, reduces information loss, improves rendering efficiency, and supports the secondary development and expansion of mainstream engines.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120449280A_ABST
    Figure CN120449280A_ABST
Patent Text Reader

Abstract

The invention relates to a BIM model linear component instantiation method and system and a medium, and the method comprises the following steps: traversing a linear component in a Revit file, extracting a cross section contour, and converting the cross section contour into a cross section contour vertex sequence; performing geometric similarity comparison on the vertex sequence of the section contour, and generating a standard geometry of unit length for each linear component group with the same section contour; performing singular value decomposition calculation according to the contour center and the baseline of the linear component and the standard geometry of unit length to obtain a contour transformation matrix and a baseline transformation matrix; combining the contour transformation matrix and the baseline transformation matrix into an instance restoration matrix, and restoring the standard geometry in unit length into the real position and attitude of the instance through the instance restoration matrix; and exporting the real position and attitude as instantiated data of the linear component. Compared with the prior art, the problem of information loss in a traditional conversion process is avoided, and the instantiation rate of the linear component is remarkably increased.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of BIM model rendering efficiency optimization, and in particular to a method, system and medium for instantiating linear components of a BIM model. Background Art

[0002] In the field of BIM model rendering efficiency optimization, geometry merging and geometry instancing are two typical technologies. Their core is to reduce draw calls (Drawcall) and the number of geometries by optimizing the organization of geometric data.

[0003] The geometry merging solution reduces draw calls by combining the meshes of multiple components, but this can disrupt the model's original component hierarchy. For example, after merging components like walls and pipes, their independence is lost, rendering component-based interactive features (such as single-object selection) ineffective, severely hindering subsequent management and development efficiency.

[0004] Theoretically, geometry instancing can render homogeneous instances with a single Drawcall. The principle is to submit only one model mesh to the GPU, replicate it, and apply different world transformation matrices (scaling, rotation, and translation) to render multiple instances independently. However, traditional implementations have the following problems:

[0005] (1) When BIM models are converted into common 3D formats such as FBX and glTF, the original construction information of the components is lost, which makes it difficult to compare the similarity of instantiations and significantly reduces the instantiation rate.

[0006] (2) The general import process of mainstream 3D formats and rendering engines does not support instanced data transfer and requires manual optimization, which is inefficient and has a high technical threshold.

[0007] Taking the civil engineering BIM model as an example, components that do not use instantiation technology (such as walls, structural frames, structural columns, curtain wall vertical bars, etc.) are mostly linear components. Their characteristics are that the geometric body can be constructed by stretching the outline, and there is only a length difference between different instances. However, the existing technology cannot effectively utilize this feature to improve GPU rendering performance. For example, patent application CN118940355A discloses a normalized instantiation method for BIM model components. This method uses the normalized BIM model components through the instantiation method to create multiple identical or similar model instances in the scene, and assigns a unique position, rotation angle and scaling ratio to each instance. This method cannot effectively utilize the characteristics of linear components to improve GPU rendering performance. Summary of the Invention

[0008] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and provide a method, system and medium for instantiating linear components of BIM models, thereby avoiding the problem of information loss in traditional conversion processes and significantly improving the instantiation rate of linear components.

[0009] The purpose of the present invention can be achieved by the following technical solutions:

[0010] A method for instantiating linear components of a BIM model includes the following steps:

[0011] Traversing the linear components in the Revit file, extracting the cross-sectional profile of the linear components, and converting the cross-sectional profile into a cross-sectional profile vertex sequence;

[0012] Performing geometric similarity comparison on the cross-sectional profile vertex sequence, and generating a standard geometric body of unit length for each group of linear components having the same cross-sectional profile in the profile vertex sequence;

[0013] A contour transformation matrix is obtained by calculating the contour center of the linear component and the contour center of the standard geometric body of unit length through singular value decomposition;

[0014] A baseline transformation matrix is obtained by calculating the baseline of the linear component and the baseline of the standard geometric body of unit length through singular value decomposition;

[0015] Combining the outline transformation matrix and the baseline transformation matrix into an instance restoration matrix, and restoring the standard geometric body of unit length to the real position and posture of the instance through the instance restoration matrix;

[0016] The real position and pose of the instance are derived as instantiation data of the linear component.

[0017] Furthermore, the position attribute of the linear component is a line position, including multiple types of structural frames, structural columns, walls and pipes.

[0018] Furthermore, after the cross-sectional profile of the linear component is converted into a series of vertex coordinate sets by the Tessellate method, the vertex coordinates are deduplicated to obtain a profile vertex sequence.

[0019] Furthermore, the baseline of the linear component is obtained through Revit API, and the baseline represents the path of the linear component in space.

[0020] Furthermore, the specific steps of constructing the standard geometric body of unit length are: using the ear cutting method to sequentially cut off the convex vertices and adjacent edges on the outline of the linear component until the outline of the linear component becomes a triangle, and forming a standard geometric body according to the vertex sequence number and vertex coordinates of the triangle.

[0021] Furthermore, when the mean square difference of the vertex displacements of two groups of cross-sectional profiles in the cross-sectional profile vertex sequence after rotation and scaling is less than a preset difference value threshold, the two groups of profiles are regarded as a linear component group with the same cross-sectional profile.

[0022] Furthermore, the instance restoration matrix is:

[0023]

[0024] Where A 实例 is the instance recovery matrix, R ij is the element of the rotation matrix R, S x 、S y and S z are the scaling factors along the X, Y, and Z axes, respectively, T x 、T y and T z are the translations along the X, Y, and Z axes, respectively, S x R 00 is the (0,0) element of the scaled rotation matrix R, S y R 11 is the (1,1) element of the scaled rotation matrix R, S z R 22 is the (2,2) element of the scaled rotation matrix R.

[0025] Furthermore, the instantiation data is a glTF file with an EXT_mesh_gpu_instancing extension.

[0026] According to another aspect of the present invention, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method for instantiating linear components of a BIM model as described above can be implemented.

[0027] According to the present invention, a BIM model linear component instantiation system is characterized by comprising:

[0028] A contour extraction module is used to traverse the linear components in the Revit file, extract the contours of the linear components, and convert the contours into a sequence of contour vertices;

[0029] A similarity comparison module is used to perform geometric similarity comparison on the contour vertex sequence and generate a standard geometric body of unit length for each group of linear components with the same contour;

[0030] A contour transformation matrix acquisition module is used to calculate the contour transformation matrix by singular value decomposition according to the contour center of the linear component and the contour center of the standard geometric body of unit length;

[0031] A baseline transformation matrix acquisition module is used to obtain a baseline transformation matrix by singular value decomposition calculation based on the baseline of the linear component and the baseline of the standard geometric body of unit length;

[0032] An instance restoration module, configured to combine the contour transformation matrix and the baseline transformation matrix into an instance restoration matrix, and restore the standard geometric body of unit length to the real position and posture of the instance through the instance restoration matrix;

[0033] The instantiation data exporting module is used to export the real position and posture of the instance as the instantiation data of the linear component.

[0034] Compared with the prior art, the present invention has the following beneficial effects:

[0035] 1. The present invention obtains linear components through secondary development of Revit, generates standard geometric bodies of unit length for linear components with the same cross-sectional profile, and calculates an inverse transformation matrix for each instance that can restore the real position and posture. The inverse transformation matrix can restore the standard geometric body of unit length to the real position and posture of the instance, and finally exports an instantiated model file that can be used in various rendering engines. The contour comparison is performed based on the original construction information of Revit, avoiding the information loss problem in the traditional conversion process and significantly improving the instantiation rate of linear components.

[0036] 2. This invention is based on the GPU instancing standard interface. Through GPU instancing technology, it can significantly reduce the repeated transmission of vertex data during rendering, reduce the number of communications between the CPU and GPU, reduce performance bottlenecks, fully utilize the GPU parallel rendering capabilities, and improve rendering efficiency. The generated instantiation data is a glTF file with the EXT_mesh_gpu_instancing extension, which supports secondary development and extension of mainstream engines such as Three.js, Unity, and Unreal. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 A schematic flow chart of a method for instantiating linear components of a BIM model proposed by the present invention;

[0038] Figure 2 Schematic diagram of the instance restoration matrix. DETAILED DESCRIPTION

[0039] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.

[0040] Abbreviations involved:

[0041] Building Information Modeling (BIM)

[0042] Graphics Language Transmission Format: Graphics Language Transmission Format, glTF

[0043] Multiple levels of detail: Levels of Detail, LOD

[0044] Singular Value Decomposition: Singular Value Decomposition, SVD

[0045] Example 1

[0046] This embodiment provides a method for instantiating linear components of a BIM model, such as Figure 1 As shown, the following steps are included:

[0047] S1. Traverse the linear components in the Revit file, extract the cross-sectional profile of the linear components, and convert the cross-sectional profile into a cross-sectional profile vertex sequence.

[0048] Traverse the linear components in the Revit file. These components, including structural frames, columns, walls, and pipes, have their position attributes as line positions. Use the Tessellate method to convert the cross-sectional profile of the linear component into a series of vertex coordinates. Then, perform deduplication on the vertex coordinates to obtain a contour vertex sequence.

[0049] This embodiment takes the structural professional BIM model of a hospital project as an example, uses Revit to open the BIM model that needs to be instantiated, runs the plug-in to read all visible components in the current Revit file, filters the components whose position attributes are line positions and extracts their cross-sectional profile data. The cross-sectional profile is usually stored in the properties of the component in the form of a geometric shape, such as a rectangle, a circle, an H-shape, etc. The contour boundary is converted into a series of vertex coordinate sets using the Tessellate method, and the cross-sectional profile is discretized by this method. Since the Tessellate method may generate duplicate vertices (for example, at the corners of the contour), it is necessary to detect and remove duplicate vertices through an algorithm. After deduplication, the vertex coordinates are stored as a contour vertex sequence. Taking the H-shaped steel beam as an example, the number of its vertices is 40 after being discretized from 12 edges, and 24 valid vertices are retained after deduplication.

[0050] When extracting and processing cross-sectional profiles, it's important to consider both data accuracy and efficiency. You can balance profile accuracy and vertex count by setting appropriate Tessellate parameters (such as the level of subdivision). For complex cross-sectional profiles (such as irregularly shaped components), you can employ an adaptive Tessellate strategy, dynamically adjusting discretization accuracy based on the profile's complexity.

[0051] S2. Perform geometric similarity comparison on the cross-sectional profile vertex sequence, and generate a standard geometric body of unit length for each group of linear components with the same cross-sectional profile in the profile vertex sequence.

[0052] Orthogonal Procrustes analysis is used to compare the geometric similarity of contour vertex sequences. Orthogonal Procrustes analysis uses rotation, scaling, and translation operations to best match one set of points with another set of points, thereby evaluating the geometric similarity between them.

[0053] When the mean square difference of the post-rotation and scaling vertex displacements of two sets of cross-sectional profiles in a cross-sectional profile vertex sequence is less than a preset difference threshold, the two sets of profiles are considered to be linear components with the same cross-sectional profile. In this embodiment, the difference threshold is set to 0.02, which is determined based on the actual engineering precision requirements and the data noise level to ensure the accuracy and reliability of the comparison results.

[0054] The specific steps to construct a standard geometric body of unit length are:

[0055] The ear-cut method sequentially removes convex vertices and their adjacent edges from the contour of a linear component until the contour becomes triangular. Convex vertices and their two adjacent edges are gradually identified and removed from the contour polygon of the linear component, forming a triangle with each removal. The ear-cut method is an efficient polygon triangulation algorithm suitable for decomposing any simple polygon. Through multiple ear-cut operations, a complex polygon contour is gradually decomposed into multiple triangles, ultimately completely decomposing the entire contour polygon into a set of triangles.

[0056] The vertex numbers and coordinates of all triangles are integrated to form a standard geometric body with a unit length. The unit length of this standard geometric body can be obtained by normalizing the length of the original linear component contour to ensure that its length is 1 unit length, which facilitates subsequent geometric transformation and comparison operations.

[0057] For a hospital project, 3,678 structural frames were compared and 45 groups of linear components with the same cross-sectional profile were obtained. During the traversal process, a check was performed to determine whether the current cross-sectional profile was identical to the previously traversed cross-sectional profile. If the current cross-sectional profile was not identical to the previously traversed cross-sectional profile, a standard geometric body of unit length was generated for each group of linear components with the same cross-sectional profile obtained after comparison. The number of standard geometric bodies generated was consistent with the number of linear component groups with the same cross-sectional profile obtained after comparison, and step S3 was then executed. If the current cross-sectional profile was identical to the previously traversed cross-sectional profile, step S3 was executed directly, avoiding the repeated generation of standard geometric bodies and improving computational efficiency.

[0058] S3. A contour transformation matrix is obtained by calculating the contour center of the linear component and the contour center of the standard geometric body of unit length through singular value decomposition.

[0059] During the contour comparison process, the coordinates of the center of the linear component contour and the center of the standard geometric body contour are obtained by calculating the mean of the coordinates of the contour vertices.

[0060] According to the coordinate difference between the center of the outline of the linear component and the center of the outline of the standard geometric body of unit length, a translation matrix is generated to translate the outline of the linear component to a position aligned with the center of the outline of the standard geometric body.

[0061] Singular value decomposition (SVD) is performed on the vertex coordinates of the translated linear component outline and the vertex coordinates of the standard geometric body outline, and the rotation matrix and scaling factor are extracted from the SVD results to ensure that the linear component outline is best matched with the standard geometric body outline after rotation and scaling.

[0062] The translation matrix, the rotation matrix and the scaling factor are combined into a comprehensive contour transformation matrix, through which the contour of the linear component instance can be transformed into the contour of the standard geometric body.

[0063] S4. A baseline transformation matrix is obtained by calculating the baseline of the linear component and the baseline of the standard geometric body of unit length through singular value decomposition.

[0064] The Revit API provides powerful data access and manipulation capabilities, enabling accurate retrieval of linear component baseline information. The baseline of a linear component is obtained through the Revit API. The baseline represents the path of the linear component in space, and the starting and ending points of the path determine the position, rotation, and length of the final model. The baseline transformation matrix is calculated using singular value decomposition based on the baseline of the linear component and the baseline of a standard geometric solid of unit length.

[0065] S5. Combine the outline transformation matrix and the baseline transformation matrix into an instance restoration matrix, and use the instance restoration matrix to restore the standard geometric body of unit length to the actual position and posture of the instance.

[0066] The instance restoration matrix is:

[0067]

[0068] Where A 实例 is the instance recovery matrix, R ij is the element of the rotation matrix R, S x 、S y and S z are the scaling factors along the X, Y, and Z axes, respectively, T x 、T y and T z are the translations along the X, Y, and Z axes, respectively, S x R 00 is the (0,0) element of the scaled rotation matrix R, S y R 11 is the (1,1) element of the scaled rotation matrix R, S z R 22 is the (2,2) element of the scaled rotation matrix R.

[0069] The instance restoration matrix can restore the standard geometric body of unit length to the actual position and posture of the instance, such as Figure 2 shown.

[0070] S6. Export the real position and posture of the instance as instantiation data of the linear component.

[0071] Extract the instanced data for each instance from the instance restoration matrix, including position, rotation, and scale information. Build the instanced data into a glTF file with the EXT_mesh_gpu_instancing extension. The specific steps include:

[0072] Create the basic structure of a glTF file, including scenes, nodes, meshes, etc.

[0073] Writes vertex data, normal data, texture coordinates, and other information of standard geometry into the mesh part of the glTF file.

[0074] Write instanced data (position, rotation, scale) to the extensions section of the glTF file, using the EXT_mesh_gpu_instancing extension to support GPU instanced rendering.

[0075] Assign corresponding material and texture information to each instance to ensure correct display during rendering.

[0076] This embodiment proposes a method for instantiating linear components in a BIM model, which exists as a Revit plug-in. It automatically converts the BIM model into a glTF file containing geometric instantiation information. This method, implemented based on the GPU instantiation standard interface, has the following advantages:

[0077] Efficient rendering: Through GPU instancing technology, the repeated transmission of vertex data can be significantly reduced during rendering, the number of communications between the CPU and GPU can be reduced, performance bottlenecks can be reduced, the GPU parallel rendering capabilities can be fully utilized, and rendering efficiency can be improved.

[0078] Strong compatibility: The generated glTF file has the EXT_mesh_gpu_instancing extension, which supports secondary development extensions of mainstream engines such as Three.js, Unity, and Unreal.

[0079] Coexist with LOD technology: It can be combined with LOD (Level of Detail) technology to dynamically adjust model details according to the view distance to further optimize performance.

[0080] This method is suitable for BIM model rendering and visualization in the fields of architecture, engineering and construction, and is particularly suitable for efficient display and interaction of large-scale scenes.

[0081] Example 2

[0082] This embodiment provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the instantiation method of the BIM model linear component in Example 1 can be implemented.

[0083] The rest is the same as Example 1.

[0084] Example 3

[0085] This embodiment provides a BIM model linear component instantiation system, including:

[0086] The contour extraction module is used to traverse the linear components in the Revit file, extract the contours of the linear components, and convert the contours into a sequence of contour vertices;

[0087] A similarity comparison module is used to compare the geometric similarity of the contour vertex sequence and generate a standard geometric body of unit length for each group of linear components with the same contour;

[0088] A contour transformation matrix acquisition module is used to calculate the contour transformation matrix based on the contour center of the linear component and the contour center of the standard geometric body of unit length through singular value decomposition;

[0089] A baseline transformation matrix acquisition module is used to obtain a baseline transformation matrix by singular value decomposition calculation based on the baseline of the linear component and the baseline of the standard geometric body of unit length;

[0090] The instance restoration module is used to combine the contour transformation matrix and the baseline transformation matrix into an instance restoration matrix, and restore the standard geometric body of unit length to the actual position and posture of the instance through the instance restoration matrix;

[0091] The instantiation data export module is used to export the real position and posture of the instance as the instantiation data of the linear component.

[0092] The rest is the same as Example 1.

[0093] The above describes in detail the preferred embodiments of the present invention. It should be understood that those skilled in the art can make numerous modifications and variations based on the concepts of the present invention without inventive effort. Therefore, any technical solutions that can be derived by those skilled in the art through logical analysis, reasoning, or limited experimentation based on the concepts of the present invention and the prior art should be within the scope of protection defined by the claims.

Claims

1. A method for instantiating linear components of a BIM model, characterized in that: The following steps are involved: Traversing the linear components in the Revit file, extracting the cross-sectional profile of the linear components, and converting the cross-sectional profile into a cross-sectional profile vertex sequence; Performing geometric similarity comparison on the cross-sectional profile vertex sequence, and generating a standard geometric body of unit length for each group of linear components having the same cross-sectional profile in the profile vertex sequence; A contour transformation matrix is obtained by calculating the contour center of the linear component and the contour center of the standard geometric body of unit length through singular value decomposition; A baseline transformation matrix is obtained by calculating the baseline of the linear component and the baseline of the standard geometric body of unit length through singular value decomposition; Combining the outline transformation matrix and the baseline transformation matrix into an instance restoration matrix, and restoring the standard geometric body of unit length to the real position and posture of the instance through the instance restoration matrix; The real position and pose of the instance are derived as instantiation data of the linear component.

2. The instantiation method of a BIM model linear component according to claim 1, characterized in that: The position attribute of the linear component is a line position, including multiple types of structural frames, structural columns, walls, and pipes.

3. The instantiation method of a BIM model linear component according to claim 1, characterized in that: After the cross-sectional profile of the linear component is converted into a series of vertex coordinate sets by the Tessellate method, the vertex coordinates are deduplicated to obtain a profile vertex sequence.

4. The instantiation method of a BIM model linear component according to claim 1, characterized in that: The baseline of the linear component is obtained through the Revit API, and the baseline represents a path of the linear component in space.

5. The instantiation method of a BIM model linear component according to claim 1, characterized in that: The specific steps of constructing the standard geometric body of unit length are: using the ear cutting method to sequentially cut off the convex vertices and adjacent edges on the outline of the linear component until the outline of the linear component becomes a triangle, and forming a standard geometric body according to the vertex sequence number and vertex coordinates of the triangle.

6. The method for instantiating a linear component of a BIM model according to claim 1, wherein: When the mean square difference of the rotationally scaled vertex displacements of two groups of cross-sectional profiles in the cross-sectional profile vertex sequence is less than a preset difference value threshold, the two groups of profiles are regarded as a linear component group with the same cross-sectional profile.

7. The instantiation method of a BIM model linear component according to claim 1, characterized in that: The example restoration matrix is: Where A 实例 is the instance recovery matrix, R ij is the element of the rotation matrix R, S x 、S y and S z are the scaling factors along the X, Y, and Z axes, respectively, T x 、T y and T z are the translations along the X, Y, and Z axes, respectively, S x R 00 is the (0,0) element of the scaled rotation matrix R, S y R 11 is the (1,1) element of the scaled rotation matrix R, S z R 22 is the (2,2) element of the scaled rotation matrix R.

8. The instantiation method of a BIM model linear component according to claim 1, characterized in that: The instantiation data is a glTF file with the EXT_mesh_gpu_instancing extension.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it can implement the method for instantiating a linear component of a BIM model according to any one of claims 1 to 8.

10. A BIM model linear component instantiation system, characterized in that: include: A contour extraction module is used to traverse the linear components in the Revit file, extract the contours of the linear components, and convert the contours into a sequence of contour vertices; A similarity comparison module is used to perform geometric similarity comparison on the contour vertex sequence and generate a standard geometric body of unit length for each group of linear components with the same contour; A contour transformation matrix acquisition module is used to calculate the contour transformation matrix by singular value decomposition according to the contour center of the linear component and the contour center of the standard geometric body of unit length; A baseline transformation matrix acquisition module is used to obtain a baseline transformation matrix by singular value decomposition calculation based on the baseline of the linear component and the baseline of the standard geometric body of unit length; An instance restoration module, configured to combine the contour transformation matrix and the baseline transformation matrix into an instance restoration matrix, and restore the standard geometric body of unit length to the real position and posture of the instance through the instance restoration matrix; The instantiation data exporting module is used to export the real position and posture of the instance as the instantiation data of the linear component.