Geometric objectification BIM model lightweight method based on fine granularity

Through the fine-grained geometric objectization method, Face objects and Mesh objects in the BIM model are processed to achieve effective lightweighting of the model, solve the problems of high resource consumption and poor model quality in the existing technology, and improve the rendering efficiency and model quality. quality.

CN118656901AActive Publication Date: 2024-09-17CCTEG DIGITAL INNOVATION TECHNOLOGY (CHONGQING) CO LTD +1

Patent Information

Application Number
CN202410820316.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-24
Publication Date
2024-09-17
Estimated Expiration
2044-06-24

AI Technical Summary

Technical Problem

Existing BIM model lightweighting technology is difficult to achieve effective lightweighting while ensuring model accuracy, resulting in high resource consumption and low operating efficiency when viewed on a browser or mobile phone, and there are differences in the selection of object granularity between different manufacturers, resulting in The model is of poor quality.

Method used

Adopt a fine-grained geometric objectization method to save the data of Face objects and Mesh objects by creating a new mapping table, call the IExportContext interface of Revit SDK to extract model data, and determine whether reconstruction is supported based on the feature vector, and perform the mapping of Face objects and Mesh objects. Lightweight processing reduces data volume and supports triangular mesh generation at different precisions.

Benefits of technology

It achieves effective simplification of model data, reduces resource consumption during front-end rendering, improves rendering efficiency, improves geometry reuse, and ensures consistent model quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118656901A
    Figure CN118656901A
Patent Text Reader

Abstract

The invention relates to the technical field of building information models, and discloses a geometric objectification BIM model lightweight method based on fine granularity, comprising the following steps: S1, creating a new mapping table T for storing data of Face objects and Mesh objects in a model; s2, calling an IExportContext interface in a Revit SDK (Software Development Kit) to extract data of a component in the model; s3, checking whether the components in the current model are processed or not; s4, if the processing is finished, ending the flow; if the processing is not finished, obtaining the value of the current flag; s5, if flag = 1, calling a Face object lightweight processing flow and returning to S2; and S6, if flag is equal to 0, calling the Mesh object lightweight processing flow and returning to S2. Model data can be effectively simplified, and light weight of the model is realized; moreover, the obtained data support the LOD technology, so that the resource consumption during front-end rendering can be greatly reduced, and the rendering efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of building information modeling, and in particular to a BIM model lightweighting method based on fine-grained geometric objectification. Background Art

[0002] Revit is a software designed for Building Information Modeling (BIM), and plays an important role in the design, construction, and operation and maintenance stages. In recent years, with the vigorous development of BIM technology, the demand for using BIM models for collaborative design, construction management, and operation and maintenance management has been increasing in all walks of life. How to achieve lightweight models while ensuring model accuracy so that they can be viewed on a browser or mobile phone has become an important direction for the development of BIM technology. In this context, BIM lightweight technology based on Revit came into being and has been widely used and developed.

[0003] At present, lightweight solutions for BIM models include parametric description, surface reduction optimization, geometric object instantiation, data compression and other means, but these means all have certain defects. Among them, although parametric description reduces the file size after lightweighting, it takes a lot of resources to recalculate the geometric data of the model on the browser side; the surface reduction optimization algorithm takes a lot of time during execution and has low operating efficiency; geometric object instantiation can reduce the file size of lightweight, but each manufacturer often has differences in the selection of object granularity, and the effect after instantiation is also uneven, resulting in poor quality of the lightweight model; data compression can further process the lightweight file to improve the transmission efficiency in the network, but it has no effect on BIM lightweighting itself.

[0004] In summary, a more reliable and efficient lightweight method is urgently needed. Summary of the invention

[0005] The present invention aims to provide a BIM model lightweight method based on fine-grained geometric objectification, which can effectively simplify model data and achieve model lightweighting; and the obtained data supports LOD technology, which can greatly reduce resource consumption during front-end rendering and improve rendering efficiency.

[0006] The basic solution provided by the present invention is: a BIM model lightweight method based on fine-grained geometric objectification, comprising the following steps:

[0007] S1, create a new mapping table T to save the data of Face objects and Mesh objects in the model;

[0008] S2, calling the IExportContext interface in the Revit SDK to extract the data of the components in the model;

[0009] S3, check whether the components in the current model have been processed;

[0010] S4, if the processing is completed, the process ends; if the processing is not completed, the value of the current flag flag is obtained;

[0011] S5, if flag = 1, call the Face object lightweight processing flow and return to S2;

[0012] S6, if flag = 0, call the Mesh object lightweight processing flow and return to S2.

[0013] Furthermore, the Face object lightweight processing flow includes the following steps:

[0014] S51, calculating the feature vector σ of the current Face object according to the geometric data provided by the OnPolymesh method;

[0015] S52, query whether the mapping table T contains the feature vector σ;

[0016] S53, if included, skip the subsequent processing and end the process directly;

[0017] S54, if not included, determine whether reconstruction is supported;

[0018] S55, if reconstruction is not supported, storing the geometric data provided by the OnPolymesh method into a mapping table T;

[0019] S56: If reconstruction is supported, use the reconstruction method to calculate the geometric data and store the data in the mapping table T.

[0020] Furthermore, the Mesh object lightweight processing flow includes the following steps:

[0021] S61, calculating the characteristic vector σ of the current Mesh object according to the geometric data provided by the OnPolymesh method;

[0022] S62, query whether the mapping table T contains the feature vector σ;

[0023] S63, if included, skip the subsequent processing and end the process directly;

[0024] S64: If not included, the geometric data provided by the OnPolymesh method is stored in the mapping table T.

[0025] Further, in S54, when determining whether reconstruction is supported, the determination is made based on the following conditions:

[0026] Condition 1: Does the surface have only one contour line?

[0027] Condition 2: The surface consists of edges in four directions, two of which are straight edges, and the remaining two are curved edges or edges composed of multiple types of lines;

[0028] The surface refers to the surface described by the eigenvector σ; if the surface satisfies both condition 1 and condition 2, it is determined to support reconstruction; otherwise, it is determined to not support reconstruction.

[0029] Further, in S56, the reconstruction method includes the following steps:

[0030] S561, create a new vertex array, triangle mesh vertex index array, UV array and normal vector array;

[0031] S562, extracting points on two opposite curved edges in order as vertices, and storing the points in a vertex array;

[0032] S563, calculating the UV coordinates of the extracted vertices in the surface and storing them in the UV array;

[0033] S564, calculating the normal vector coordinates of the vertex and storing them in the normal vector array;

[0034] S565, connecting the vertices on the curved edge in order to form a polygonal line similar to the curved edge;

[0035] S566, connect the vertices on the two broken lines to form polygons, and form a triangular mesh similar to the curved surface; store the vertex indexes that constitute the triangular mesh into the triangular mesh vertex index array; the curved surface refers to the surface described by the eigenvector σ, and the curved edge is the edge of the surface.

[0036] Further, in S562, the sequential extraction is sequential extraction according to the left-hand rule.

[0037] Further, in S563, the TessellateOnFace method provided by the Revit API is used to calculate the UV coordinates of the extracted vertices on the surface.

[0038] Further, in S564, the normal vector coordinates of the vertex are calculated using the ComputeNormal method provided by the Revit API.

[0039] Furthermore, the Face object lightweight processing flow also includes S57, using a point removal method to reduce the vertices sampled on the curved edge, and then using a reconstruction method to generate a triangular mesh similar to the curved surface at different precisions.

[0040] Further, the S57 includes the following sub-steps:

[0041] S571, predefine an angle ε as a threshold, calculate the cosine value ω of ε; extract vertex data of a curved edge in the surface, assuming that the vertex set P = {p0, p1, p2, p3, p4, p5, ...}; and set i = 0, a = P[i];

[0042] S572, let j = i + 2, b = P[j];

[0043] S573, connect vertices a and b to form a new edge l, and the edge between b and the adjacent point P[j+1] is denoted as m;

[0044] S574, using the dot product formula l·m=|l|*|m|*cos(θ), the cosine value of the angle θ between the sides l and m can be calculated

[0045] S575, when When it is less than ω, the vertex pointed to by b is marked as removed, b is set as the next vertex, that is, j = j + 1, b = P[j], and S573 is continued;

[0046] S576, when When it is greater than ω, a is set to b, i.e., i=j, a=P[i], and the execution continues at S572;

[0047] S577, when b points to the last vertex of the curved edge, the remaining vertices on the curved edge are stored in the vertex array;

[0048] S578, use the same method to process the other curved edge of the surface;

[0049] S579, recalculate the triangle mesh vertex index array, UV array and normal vector array according to the steps of the reconstruction method.

[0050] The working principle and advantages of the present invention are:

[0051] The present invention discloses a BIM model lightweighting method based on fine-grained geometric objectization, which is based on finer-grained primitives (corresponding to Face objects and Mesh objects) and realizes the primitive instantiation with faces as objects in the BIM lightweighting process; compared with other geometric object instantiation methods, the granularity is finer and the geometric reuse rate is higher. In addition, different lightweight processing flows are called for Face objects and Mesh objects to perform primitive processing, wherein the reconstruction method for Face objects can greatly simplify the geometric data of regular surfaces in Face objects; for the remaining surfaces of Face objects and Mesh objects, the data volume after BIM lightweighting can be reduced by objectization, thereby realizing the lightweighting of model data.

[0052] In addition, this solution also considers the application scenarios of lightweight data on the front end (browser side). Based on the reconstruction method, a point removal method is specially designed to further simplify the geometric data to support geometric models with different accuracies, thereby meeting the LOD technology application requirements of the browser side in the process of rendering BIM models, which can greatly reduce the resource consumption during front-end rendering and improve rendering efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 A method flow diagram of a method for lightweighting a BIM model based on fine-grained geometric objectification according to a first embodiment of the present invention;

[0054] Figure 2 A Revit model component geometric structure diagram of Embodiment 1 of a BIM model lightweight method based on fine-grained geometric objectification of the present invention;

[0055] Figure 3 It is a schematic diagram of a Face object lightweight processing flow of a first embodiment of a BIM model lightweight method based on fine-grained geometric objectization of the present invention;

[0056] Figure 4 A schematic diagram of a Mesh object lightweight processing flow of a BIM model lightweight method based on fine-grained geometric objectization according to a first embodiment of the present invention;

[0057] Figure 5 It is a schematic diagram of the surface reconstruction process of Embodiment 1 of a BIM model lightweight method based on fine-grained geometric objectification of the present invention (the case where the number of vertices on two broken lines is equal);

[0058] Figure 6 It is a schematic diagram of the surface reconstruction process of Embodiment 1 of a BIM model lightweight method based on fine-grained geometric objectification of the present invention (the case where the number of vertices on two broken lines is not equal);

[0059] Figure 7 A schematic diagram of the geometric structure of a tree model of Embodiment 1 of a BIM model lightweight method based on fine-grained geometric objectification of the present invention;

[0060] Figure 8 It is a schematic diagram of the point removal process of Embodiment 2 of a BIM model lightweight method based on fine-grained geometric objectification of the present invention;

[0061] Fig. 9 A schematic diagram of a mesh constructed based on original surface data in Embodiment 2 of a BIM model lightweight method based on fine-grained geometric objectification of the present invention;

[0062] Fig.10A schematic diagram of a mesh constructed using a surface reconstruction method in Embodiment 2 of a BIM model lightweight method based on fine-grained geometric objectification of the present invention;

[0063] Fig.11 A schematic diagram of a medium-precision mesh constructed using a point removal method in Embodiment 2 of a BIM model lightweight method based on fine-grained geometric objectification of the present invention;

[0064] Fig.12 This is a schematic diagram of a coarse mesh constructed using a point removal method in Embodiment 2 of a BIM model lightweight method based on fine-grained geometric objectification of the present invention. DETAILED DESCRIPTION

[0065] The following is a further detailed description through specific implementation methods:

[0066] Embodiment 1

[0067] The embodiment is basically as shown in the attached Figure 1 As shown: A BIM model lightweight method based on fine-grained geometric objectification, including the following steps:

[0068] S1, create a new mapping table T to save the data of Face objects and Mesh objects in the model.

[0069] The model refers to a BIM model based on Revit software, that is, a Revit model; and this method is mainly run on Revit software. Specifically, Face objects and Mesh objects exist as basic graphic elements in the Revit model. Figure 2 As shown in the figure, the geometric structure of the model components in Revit software is a tree structure, the root of the tree is the Geometry Element object, which as a collection contains several Solid, Geometry Instance, Mesh objects, and the Geometry Instance object is also a collection, which also contains several Solid, Geometry Instance, Mesh objects, and the Solid object contains several Face objects. That is, the Revit model contains two types of surface descriptions, Mesh and Face, among which Face contains regular surface types such as Planar Face, Conical Face, and Cylindrical Face.

[0070] This solution chooses to process data for Face objects and Mesh objects. The object granularity is finer and can fully process model objects.

[0071] S2, call the IExportContext interface in the Revit SDK to extract the data of the components in the model.

[0072] Revit SDK refers to Autodesk Revit Software Development Kit, which is a software development framework that allows developers to extend and customize the functionality of Revit, create plug-ins or custom applications to meet specific design, construction or project management needs. Revit SDK provides an API (Application Programming Interface), which is a set of predefined interfaces and classes through which developers can access Revit's core functions, such as model data, command execution, user interface operations, etc. The IExportContext interface is used to export (extract) model data.

[0073] S3, check whether the components in the current model have been processed. Specifically, when the IExportContext interface calls the Finish method, it indicates that all components in the current scene have been processed.

[0074] S4, if the processing is completed, the process ends; if the processing is not completed, the value of the current flag flag is obtained.

[0075] Specifically, in this embodiment, a flag switch flag is set, and its initial value is 0. When the IExportContext interface calls the OnFaceBegin method, the flag value is set to 1. When the OnFaceEnd method is called, the flag value is reset to 0. When the program calls the OnPolymesh method, the flag value is checked. When it is 0, it indicates that the Mesh object data is currently being processed, and when it is 1, it indicates that the Face object data is currently being processed.

[0076] S5, if flag = 1, call the Face object lightweight processing flow and return to S2.

[0077] like Figure 3 As shown, the Face object lightweight processing flow includes the following steps:

[0078] S51, calculating the feature vector σ of the current Face object according to the geometric data provided by the OnPolymesh method.

[0079] Specifically, the geometric data of different Face objects or Mesh objects are inconsistent. According to the different data, the corresponding feature vector can be constructed, and the feature vector can be used to quickly distinguish different geometric objects. Here, for the current Face object, the feature vector is established based on the vertex, triangle mesh index, UV coordinate and normal vector data provided by the OnPolymesh method. For example, the number of vertices np, the number of triangle mesh indexes ni, the number of UVs nuv, the number of normal vectors nf, and a small number of vertices P, and their corresponding normal vectors N and UV coordinates. The following feature vector can be established: [np, ni, nuv, nf, P[0] x ,P[0] y ,P[0] z ,N[0] x ,N[0] y ,N[0] z ,UV[0] u ,UV[0] v ,...].

[0080] S52, query whether the mapping table T contains the characteristic vector σ.

[0081] S53: If it is included, then the subsequent processing is skipped and the process ends directly.

[0082] S54: If not included, determine whether reconstruction is supported.

[0083] In this step, whether reconstruction is supported is determined based on the following conditions:

[0084] Condition 1: Whether the surface has only one contour line, that is, there can be no holes on the surface;

[0085] Condition 2: The surface consists of edges in four directions, two of which are straight edges, and the remaining two are curved edges or edges composed of multiple types of lines.

[0086] The surface refers to the surface described by the eigenvector σ; if the surface satisfies both condition 1 and condition 2, it is determined to support reconstruction; otherwise, it is determined to not support reconstruction.

[0087] S55: If reconstruction is not supported, the geometric data provided by the OnPolymesh method is stored in the mapping table T.

[0088] S56: If reconstruction is supported, use the reconstruction method to calculate the geometric data and store the data in the mapping table T.

[0089] Among them, Figure 5 As shown, the reconstruction method comprises the following steps:

[0090] S561, create new vertex array, triangle mesh vertex index array, UV array and normal vector array

[0091] S562, extract points on two opposite curved edges in order as vertices, and store the points in a vertex array.

[0092] Since Revit uses a left-hand coordinate system, the sequential extraction is extraction in accordance with the sequence of the left-hand rule.

[0093] S563, calculating the UV coordinates of the extracted vertices on the surface and storing them in a UV array.

[0094] Specifically, the TessellateOnFace method provided by the Revit API is used to calculate the UV coordinates of the extracted vertices in the surface.

[0095] S564, calculate the normal vector coordinates of the vertex and store them in the normal vector array.

[0096] Specifically, the ComputeNormal method provided by the Revit API is used to calculate the normal vector coordinates of the vertex.

[0097] S565, connect the vertices on the curved edge in order to form a polygonal line similar to the curved edge.

[0098] S566, connecting the vertices on the two broken lines to form polygons, and forming a triangular mesh similar to the curved surface.

[0099] Here, if Figure 5 As shown in the figure, when the number of vertices on two polylines is equal, the opposite vertices on the two polylines are connected to form quadrilaterals, and then a diagonal line of each quadrilateral is connected to form a triangular mesh similar to the surface.

[0100] When the number of vertices on two polylines is not equal, first connect the opposite vertices on the two polylines to form quadrilaterals, and then connect a diagonal line of each quadrilateral; then select the extra vertices on the polyline with a longer length (more vertices) and connect them with the last vertex on the other polyline to form a triangle, thus forming a triangular mesh similar to the surface, such as Figure 6 shown.

[0101] The vertex indices constituting the triangle mesh are stored in the triangle mesh vertex index array; the curved surface refers to the surface described by the eigenvector σ, and the curved edge is the edge of the surface.

[0102] Based on the reconstruction method, the regular faces in the Face object can be described approximately with fewer vertices, thus simplifying the data of the Face object. In addition, for the Face objects and Mesh objects that cannot be reconstructed, the data volume after BIM lightweighting is reduced by objectification (corresponding to the lightweight processing flow of S55 and Mesh objects); the lightweighting effect is good.

[0103] S6, if flag = 0, call the Mesh object lightweight processing flow and return to S2.

[0104] like Figure 4 As shown, the Mesh object lightweight processing flow includes the following steps:

[0105] S61, calculating the characteristic vector σ of the current Mesh object according to the geometric data provided by the OnPolymesh method.

[0106] S62, query whether the mapping table T contains the characteristic vector σ.

[0107] S63: If yes, skip the subsequent processing and end the process directly.

[0108] S64: If not included, the geometric data provided by the OnPolymesh method is stored in the mapping table T.

[0109] For ease of understanding, the following is combined with Figure 7 The following is a tree model example, which describes the lightweight processing flow of Mesh objects as a whole:

[0110] Step 1: pre-establish a mapping table T, and initialize the flag bit flag to 0;

[0111] Step 2: Call the IExportContext interface in the Revit SDK to extract the data of the components in the model;

[0112] Step 3, when executing the OnPolyMesh method, check the value of the flag;

[0113] Step 4: If flag = 0, it indicates that the data of the Mesh object is currently being extracted, and the feature vector σ of the Mesh object is calculated based on the vertex array and triangle mesh vertex index array provided by the OnPolyMesh method;

[0114] Step 5, query whether the mapping table T contains the feature vector σ;

[0115] Step 6: If it is already included, end the process;

[0116] Step 7: If not included, use the feature vector σ as the key and the vertex array, triangle mesh vertex index array, UV array, normal vector array and other data provided by the OnPolyMesh method as the value to store them in the mapping table T.

[0117] This embodiment provides a BIM model lightweight method based on fine-grained geometric objectification. Based on finer-grained primitives, it implements primitive instantiation with faces as objects in the BIM lightweight process. Compared with other geometric object instantiation methods, it has finer granularity and higher geometric reuse rate. And on this basis, a geometric reconstruction method is proposed, which greatly simplifies the geometric data of regular surfaces, with a smaller data volume, and can further achieve lightweight model data.

[0118] Embodiment 2

[0119] A BIM model lightweighting method based on fine-grained geometric objectization. On the basis of embodiment 1, the Face object lightweighting processing flow also includes S57, using a de-pointing method to reduce the vertices sampled on the curved edge, and then using a reconstruction method to generate a triangular mesh similar to the curved surface at different accuracies.

[0120] like Figure 8 As shown, the S57 includes the following sub-steps:

[0121] S571, predefine an angle ε as a threshold, calculate the cosine value ω of ε; extract the vertex data of a curved edge in the surface, assuming that the vertex set P = {p0, p1, p2, p3, p4, p5, ...}; and set i = 0, a = P[i].

[0122] S572, let j=i+2, b=P[j].

[0123] S573, connect vertices a and b to form a new edge l, and the edge between b and the adjacent point P[j+1] is denoted as m.

[0124] S574, using the dot product formula l·m=|l|*|m|*cos(θ), the cosine value of the angle θ between the sides l and m can be calculated

[0125] S575, when When it is less than ω, the vertex pointed to by b is marked as removed, and b is set as the next vertex, that is, j=j+1, b=P[j], and execution of S573 continues.

[0126] S576, when When it is greater than ω, a is set to b, that is, i=j, a=P[i], and execution of S572 continues.

[0127] S577, when b points to the last vertex of the curved edge, store the remaining vertices on the curved edge into the vertex array.

[0128] S578, use the same method to process another curved edge of the curved surface. The point removal method corresponds to S571 to S578.

[0129] S579, recalculate the triangle mesh vertex index array, UV array and normal vector array according to the steps of the reconstruction method.

[0130] For ease of understanding, the cylindrical surface, which is the most commonly used surface in the electromechanical model, is used as an example to describe the overall reconstruction process of the cylindrical surface, including the following steps:

[0131] Step 1: pre-establish a mapping table T, and initialize the flag bit flag to 0;

[0132] Step 2: Call the IExportContext interface in the Revit SDK to extract the data of the components in the model;

[0133] Step 3, when calling the OnFaceBegin method of the IExportContext interface, set the flag bit flag = 1;

[0134] Step 4, when executing the OnPolyMesh method, check the value of the flag;

[0135] Step 5: If flag = 1, it indicates that the data of the Face object is currently being extracted, and the feature vector σ of the Mesh object is calculated based on the vertex array and triangle mesh vertex index array provided by the OnPolyMesh method;

[0136] Step 6, query whether the mapping table T contains the feature vector σ;

[0137] Step 7: If it is already included, go to step 12;

[0138] Step 8: If not, determine whether the cylinder surface meets the redrawing conditions based on the composition and type of the cylinder surface edge, that is, determine whether reconstruction is supported;

[0139] Step 9: If the redrawing condition is met (i.e., reconstruction is supported), the vertex array of the curved edge is extracted according to the redrawing step, the vertex index array of the triangle mesh, the UV array, the normal vector array and other data are calculated, and the data is recorded in the mapping table T;

[0140] Step 10, based on the new vertex array, triangle mesh vertex index array, UV array and normal vector array data, use the point removal method to calculate the geometric data of the cylindrical surface at different precisions and generate vertex arrays, triangle mesh vertex index arrays, UV arrays and normal vector arrays at corresponding precisions, and update the data to the mapping table T; the result after redrawing is as follows Fig. 9 , Fig.10 , Fig.11 and Fig.12 As shown;

[0141] Step 11, if the redrawing condition is not met (i.e. reconstruction is not supported), the data provided by the OnPolyMesh method is recorded in the mapping table T;

[0142] Step 12: When the OnFaceEnd method of the IExportContext interface is called, the flag bit flag=0 is set.

[0143] This embodiment provides a BIM model lightweight method based on fine-grained geometric objectification. On the basis of the first embodiment, a point removal method is added to further simplify the geometric data to support geometric models with different precisions. In addition, since the LOD (Level of Detail) technology is often used in the process of rendering the BIM model on the browser side to reduce the consumption of browser resources and improve rendering efficiency, this requires the surface to provide data with different precisions such as fine, medium and rough. This solution can meet the above requirements and provide support for the LOD technology used in front-end rendering, which can greatly reduce the resource consumption during front-end rendering and improve rendering efficiency.

[0144] The above is only an embodiment of the present invention. The common sense such as the known specific structure and characteristics in the scheme is not described in detail here. The ordinary technicians in the relevant field are aware of all the common technical knowledge in the technical field of the invention before the application date or priority date, can obtain all the existing technologies in the field, and have the ability to apply the conventional experimental means before that date. The ordinary technicians in the relevant field can improve and implement the scheme in combination with their own abilities under the enlightenment given by this application. Some typical known structures or known methods should not become obstacles for the ordinary technicians in the relevant field to implement this application. It should be pointed out that for the technicians in this field, without departing from the structure of the present invention, several deformations and improvements can be made, which should also be regarded as the protection scope of the present invention, and these will not affect the effect of the implementation of the present invention and the practicality of the patent.

Claims

1. A lightweight BIM model method based on fine-grained geometric objectification, characterized in that: The following steps are involved: S1, create a new mapping table T to save the data of Face objects and Mesh objects in the model; S2, calling the IExportContext interface in the Revit SDK to extract the data of the components in the model; S3, check whether the components in the current model have been processed; S4, if the processing is completed, the process ends; If the processing is not completed, get the value of the current flag; S5, if flag = 1, call the Face object lightweight processing flow and return to S2; S6, if flag = 0, call the Mesh object lightweight processing flow and return to S2.

2. The BIM model lightweight method based on fine-grained geometric objectification according to claim 1 is characterized in that: The Face object lightweight processing flow includes the following steps: S51, calculating the feature vector σ of the current Face object according to the geometric data provided by the OnPolymesh method; S52, query whether the mapping table T contains the feature vector σ; S53, if included, skip the subsequent processing and end the process directly; S54, if not included, determine whether reconstruction is supported; S55, if reconstruction is not supported, storing the geometric data provided by the OnPolymesh method into a mapping table T; S56: If reconstruction is supported, use the reconstruction method to calculate the geometric data and store the data in the mapping table T.

3. The BIM model lightweight method based on fine-grained geometric objectification according to claim 1 is characterized in that: The Mesh object lightweight processing flow includes the following steps: S61, calculating the characteristic vector σ of the current Mesh object according to the geometric data provided by the OnPolymesh method; S62, query whether the mapping table T contains the feature vector σ; S63, if included, skip the subsequent processing and end the process directly; S64: If not included, the geometric data provided by the OnPolymesh method is stored in the mapping table T.

4. The BIM model lightweight method based on fine-grained geometric objectification according to claim 2 is characterized in that: In S54, when determining whether reconstruction is supported, the determination is made based on the following conditions: Condition 1: Does the surface have only one contour line? Condition 2: The surface consists of edges in four directions, two of which are straight edges, and the remaining two are curved edges or edges composed of multiple types of lines; The surface refers to the surface described by the eigenvector σ; if the surface satisfies both condition 1 and condition 2, it is determined to support reconstruction; otherwise, it is determined to not support reconstruction.

5. The BIM model lightweight method based on fine-grained geometric objectification according to claim 2 is characterized in that: In S56, the reconstruction method includes the following steps: S561, create a new vertex array, triangle mesh vertex index array, UV array and normal vector array; S562, extracting points on two opposite curved edges in order as vertices, and storing the points in a vertex array; S563, calculating the UV coordinates of the extracted vertices in the surface and storing them in the UV array; S564, calculating the normal vector coordinates of the vertex and storing them in the normal vector array; S565, connecting the vertices on the curved edge in order to form a polygonal line similar to the curved edge; S566, connecting the vertices on the two polylines to form polygons, and forming a triangular mesh similar to the curved surface; The vertex indices constituting the triangle mesh are stored in the triangle mesh vertex index array; the curved surface refers to the surface described by the eigenvector σ, and the curved edge is the edge of the surface.

6. The BIM model lightweight method based on fine-grained geometric objectification according to claim 5 is characterized in that: In S562, the sequential extraction is sequential extraction according to the left-hand rule.

7. The BIM model lightweight method based on fine-grained geometric objectification according to claim 5 is characterized in that: In S563, the TessellateOnFace method provided by the Revit API is used to calculate the UV coordinates of the extracted vertices in the surface.

8. The BIM model lightweight method based on fine-grained geometric objectification according to claim 5 is characterized in that: In S564, the normal vector coordinates of the vertex are calculated using the ComputeNormal method provided by the Revit API.

9. The BIM model lightweight method based on fine-grained geometric objectification according to claim 2 is characterized in that: The Face object lightweight processing flow also includes S57, using a point removal method to reduce the vertices sampled on the curved edge, and then using a reconstruction method to generate a triangular mesh similar to the curved surface at different precisions.

10. The BIM model lightweight method based on fine-grained geometric objectification according to claim 9, characterized in that: The S57 comprises the following sub-steps: S571, predefine an angle ε as a threshold, calculate the cosine value ω of ε; extract vertex data of a curved edge in the surface, assuming that the vertex set P = {p0, p1, p2, p3, p4, p5, ...}; and set i = 0, a = P[i]; S572, let j = i + 2, b = P[j]; S573, connect vertices a and b to form a new edge l, and the edge between b and the adjacent point P[j+1] is denoted as m; S574, using the dot product formula l·m=|l|*|m|*cos(θ), the cosine value of the angle θ between the sides l and m can be calculated S575, when When it is less than ω, the vertex pointed to by b is marked as removed, b is set as the next vertex, that is, j = j + 1, b = P[j], and S573 is continued; S576, when When it is greater than ω, a is set to b, i.e., i=j, a=P[i], and the execution continues at S572; S577, when b points to the last vertex of the curved edge, the remaining vertices on the curved edge are stored in the vertex array; S578, use the same method to process the other curved edge of the surface; S579, recalculate the triangle mesh vertex index array, UV array and normal vector array according to the steps of the reconstruction method.

Citation Information

Patent Citations

  • Two-dimensional and three-dimensional linkage and superposition display method based on structured BIM model

    CN110688692A

  • Revit-based BIM model lightweight method and system

    CN111949722A

  • BIM model lightweight method

    CN112000314A

  • BIM model component category-level lightweight method and system

    CN113936114A

  • IFC-based BIM model lightweight method

    CN114372308A

Cited By

  • BIM lightweight method based on fine-grained geometric objectification

    WO2026000752A1