A BIM model lightweight method based on fine-grained geometric objectification
Through fine-grained geometric objectification method, feature vector judgment and reconstruction processing are performed on the Face and Mesh objects of the BIM model, which solves the problems of high resource consumption and low efficiency of the existing BIM model lightweight method, and realizes efficient simplification of model data and improves rendering efficiency.
Patent Information
- Application Number
- CN202410820316.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-24
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2044-06-24
AI Technical Summary
The existing BIM model lightweight method has problems such as high resource consumption, low operating efficiency, and poor model quality while ensuring model accuracy, making it difficult to render efficiently on the browser or mobile phone.
The fine-grained geometric objectization method is adopted, and the Face and Mesh object data is saved by creating a new mapping table. The model component data is extracted using the Revit SDK, and the lightweight processing process is called for the Face and Mesh objects, including feature vector judgment and reconstruction methods, simplifying the geometric data of the regular surface, and using the point de-point method to generate triangular meshes of different precisions.
It realizes efficient and lightweight model data, reduces resource consumption during front-end rendering, improves rendering efficiency, and supports the application of LOD technology under different precisions.
Smart Images

Figure CN118656901B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of building information modeling, and particularly relates to a BIM model lightweighting method based on fine-grained geometric objectification. Background Art
[0002] Revit is 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 booming development of BIM technology, the demand in all walks of life for using BIM models for collaborative design, construction management, and operation and maintenance management has been increasing day by day. How to achieve the lightweighting of the model on the premise of ensuring model accuracy, so as to facilitate viewing on a browser or mobile phone, has become an important direction for the development of BIM technology. In this context, the BIM lightweighting technology based on Revit has emerged and has been widely applied and developed.
[0003] Currently, the lightweighting solutions for BIM models include means such as parametric description, face reduction optimization, geometric object instantiation, and data compression. However, these means all have certain defects. Among them, although parametric description reduces the file size after lightweighting, it requires a large amount of resources to recalculate on the browser side to obtain the geometric data of the model; the face reduction optimization algorithm takes a large amount of time during execution, and the running efficiency is low; geometric object instantiation can reduce the file size after lightweighting, but there are often differences in the selection of object granularity by each manufacturer, and the effects after instantiation are uneven, resulting in poor quality of the lightweighted model; data compression can further process the lightweighted file to improve the transmission efficiency in the network, but it has no effect on BIM lightweighting itself.
[0004] In summary, there is an urgent need for a more reliable and efficient lightweighting method at present. Summary of the Invention
[0005] The present invention aims to provide a BIM model lightweighting method based on fine-grained geometric objectification, which can effectively simplify model data and achieve model lightweighting; moreover, the obtained data supports the LOD technology, which can significantly reduce the resource consumption during front-end rendering and improve the rendering efficiency.
[0006] The basic solution provided by the present invention is: a BIM model lightweighting method based on fine-grained geometric objectification, including the following steps:
[0007] S1, create a mapping table T to save the data of Face objects and Mesh objects in the model;
[0008] S2. Call the IExportContext interface in the Revit SDK to extract the data of components in the model;
[0009] S3. Check whether the components in the current model have been processed;
[0010] S4. If the processing is completed, end the process; if not, obtain the value of the current flag "flag";
[0011] S5. If flag = 1, call the lightweight processing process of the Face object and return to S2;
[0012] S6. If flag = 0, call the lightweight processing process of the Mesh object and return to S2.
[0013] Furthermore, the lightweight processing process of the Face object includes the following steps:
[0014] S51. Calculate the eigenvector σ 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 eigenvector σ;
[0016] S53. If it contains, skip the subsequent processing and directly end the process;
[0017] S54. If it does not contain, judge whether reconstruction is supported;
[0018] S55. If reconstruction is not supported, store the geometric data provided by the OnPolymesh method into the mapping table T;
[0019] S56. If reconstruction is supported, calculate the geometric data using the reconstruction method and store the data into the mapping table T.
[0020] Furthermore, the lightweight processing process of the Mesh object includes the following steps:
[0021] S61. Calculate the eigenvector σ 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 eigenvector σ;
[0023] S63. If it contains, skip the subsequent processing and directly end the process;
[0024] S64. If it does not contain, store the geometric data provided by the OnPolymesh method into the mapping table T.
[0025] Furthermore, in S54, when judging whether reconstruction is supported, the judgment is based on the following conditions:
[0026] Condition 1: Whether the surface has only one contour line;
[0027] Condition 2: The surface is composed of edges in four directions, where two opposite edges are straight edges, and the remaining two opposite edges 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 not to support reconstruction.
[0029] Furthermore, in S56, the reconstruction method includes the following steps:
[0030] S561: Create a new vertex array, a triangular mesh vertex index array, a UV array, and a normal vector array;
[0031] S562: Extract points on two opposite curved edges in sequence as vertices and store the points in the vertex array;
[0032] S563: Calculate the UV coordinates of the extracted vertices on the surface and store them in the UV array;
[0033] S564: Calculate the normal vector coordinates of the vertices and store them in the normal vector array;
[0034] S565: Connect the vertices on the curved edge in sequence to form a polyline similar to the curved edge;
[0035] S566: Connect the vertices on the two polylines to form polygons one by one and form a triangular mesh similar to the surface; store the vertex indices of the formed triangular mesh in the triangular mesh vertex index array; the surface refers to the surface described by the eigenvector σ, and the curved edge is the edge of this surface.
[0036] Furthermore, in S562, the sequential extraction is performed in the order of the left - hand rule.
[0037] Furthermore, in S563, use the TessellateOnFace method provided by the Revit API to calculate the UV coordinates of the extracted vertices on the surface.
[0038] Furthermore, in S564, use the ComputeNormal method provided by the Revit API to calculate the normal vector coordinates of the vertices.
[0039] Furthermore, the lightweight processing flow of the Face object also includes S57, which uses the point - removal method to reduce the sampled vertices on the curved edge, and then uses the reconstruction method to generate triangular meshes similar to the surface at different precisions.
[0040] Furthermore, S57 includes the following sub - steps:
[0041] S571, predefined an angle ε as a threshold, calculate the cosine value ω of ε; extract the vertex data of a curved edge in the surface, assume the vertex set P = {p0, p1, p2, p3, p4, p5,...}; and set i = 0, a = P[i];
[0042] S572, set j = i + 2, b = P[j];
[0043] S573, connect vertex a and b to form a new edge l, and denote the edge between b and the adjacent point P[j + 1] as m;
[0044] S574, using the dot product formula l·m = |l| * |m| * cos(θ), the cosine value of the included angle θ between edge l and m can be calculated
[0045] S575, when is less than ω, the vertex pointed to by b is marked for removal, set b to the next vertex, that is, j = j + 1, b = P[j], and continue to execute S573;
[0046] S576, when is greater than ω, set a to b, that is, i = j, a = P[i], and continue to execute S572;
[0047] S577, when b points to the last vertex of the curved edge, store the remaining vertices on the curved edge into the vertex array;
[0048] S578, use the same method to process another curved edge of the surface;
[0049] S579, recalculate the triangular mesh vertex index array, UV array, and normal vector array with reference to the steps of the reconstruction method.
[0050] The working principle and advantages of the present invention are as follows:
[0051] A BIM model lightweighting method based on fine-grained geometric objectification according to the present invention is particularly based on more fine-grained primitive elements (corresponding to Face objects and Mesh objects), and realizes the primitive element instantiation with surfaces as objects during the BIM lightweighting process; compared with other geometric object instantiation methods, the granularity is finer and the geometric reuse rate is higher. Moreover, different lightweight processing flows are respectively called for Face objects and Mesh objects to process primitive elements. Among them, for the reconstruction method of Face objects, the geometric data of regular surfaces in Face objects can be greatly simplified; for the remaining surfaces of Face objects and Mesh objects, through the way of objectification, the data volume after BIM lightweighting can be reduced; thereby realizing the lightweighting of model data.
[0052] In addition, this solution also considers the application scenarios of the lightweight data on the front end (browser side). Based on the reconstruction method, a point removal method is specifically set up, which can further simplify the geometric data to support geometric models under different precisions, and thus can meet the application requirements of the LOD technology in the process of rendering the BIM model on the browser side, greatly reducing the resource consumption during front-end rendering and improving the rendering efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 It is a schematic flowchart of the method of Embodiment 1 of a BIM model lightweighting method based on fine-grained geometric objectification according to the present invention;
[0054] Figure 2 It is a geometric structure diagram of Revit model components of Embodiment 1 of a BIM model lightweighting method based on fine-grained geometric objectification according to the present invention;
[0055] Figure 3 It is a schematic flowchart of the lightweighting process of the Face object of Embodiment 1 of a BIM model lightweighting method based on fine-grained geometric objectification according to the present invention;
[0056] Figure 4 It is a schematic flowchart of the lightweighting process of the Mesh object of Embodiment 1 of a BIM model lightweighting method based on fine-grained geometric objectification according to the present invention;
[0057] Figure 5 It is a schematic diagram of the surface reconstruction process of Embodiment 1 of a BIM model lightweighting method based on fine-grained geometric objectification according to the present invention (when 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 lightweighting method based on fine-grained geometric objectification according to the present invention (when the number of vertices on two broken lines is not equal);
[0059] Figure 7 It is a geometric structure diagram of the tree model of Embodiment 1 of a BIM model lightweighting method based on fine-grained geometric objectification according to the present invention;
[0060] Figure 8 It is a schematic diagram of the point removal method process of Embodiment 2 of a BIM model lightweighting method based on fine-grained geometric objectification according to the present invention;
[0061] Figure 9 It is a mesh diagram constructed based on the original surface data in Embodiment 2 of a BIM model lightweighting method based on fine-grained geometric objectification according to the present invention;
[0062] Figure 10Schematic diagram of the mesh constructed by the surface reconstruction method in the second embodiment of a lightweight method for a BIM model based on fine-grained geometric objectification according to the present invention;
[0063] Figure 11 Schematic diagram of the medium-precision mesh constructed by the point-removing method in the second embodiment of a lightweight method for a BIM model based on fine-grained geometric objectification according to the present invention;
[0064] Figure 12 Schematic diagram of the rough mesh constructed by the point-removing method in the second embodiment of a lightweight method for a BIM model based on fine-grained geometric objectification according to the present invention. Detailed implementation manners
[0065] The following is a more detailed description through specific implementation manners:
[0066] Embodiment 1
[0067] The embodiment is basically as shown in the appendix Figure 1 shown: A lightweight method for a BIM model based on fine-grained geometric objectification includes the following steps:
[0068] S1, create a 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 mainly runs for Revit software. Specifically, Face objects and Mesh objects exist as basic primitives in the Revit model. As Figure 2 shown, in Revit software, the geometric structure of model components is in a tree structure, with the root being the Geometry Element object, which contains several Solid, Geometry Instance, and Mesh objects as a collection, and the Geometry Instance object is also a collection, which also contains several Solid, Geometry Instance, and Mesh objects, and the Solid object contains several Face objects. That is, the Revit model contains two types of face descriptions, Mesh and Face, and Face contains regular face types such as PlanarFace, Conical Face, and Cylindrical Face.
[0070] This solution selects to perform data processing on Face objects and Mesh objects, with a finer object granularity, and can fully process model objects.
[0071] S2, call the IExportContext interface in the Revit SDK to extract the data of components in the model.
[0072] Among them, the Revit SDK refers to the Autodesk Revit Software Development Kit, which is a software development framework that allows developers to extend and customize the functions of Revit, create plugins or custom applications to meet specific design, construction, or project management requirements. The Revit SDK provides an API (Application Programming Interface), which is a set of predefined interfaces and classes. Developers can access the core functions of Revit through these APIs, 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, end the process; if not, obtain the value of the current flag bit flag.
[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 value of flag is set to 1. When calling the OnFaceEnd method, the value of flag is reset to 0. When the program calls the OnPolymesh method, check the value of the flag bit flag. When it is 0, it means that the Mesh object data is being processed currently. When it is 1, it means that the Face object data is being processed currently.
[0076] S5, if flag = 1, call the lightweight processing process of the Face object and return to S2.
[0077] As Figure 3 shown, the lightweight processing process of the Face object includes the following steps:
[0078] S51, calculate the eigenvector σ 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 is inconsistent. According to the different data, their corresponding feature vectors can be constructed, and different geometric objects can be quickly distinguished through the feature vectors. Here, for the current Face object, a feature vector is established based on the data such as vertices, triangle mesh indices, UV coordinates, and normal vectors provided by the OnPolymesh method. For example, the number of vertices np, the number of triangle mesh indices 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 feature vector σ.
[0081] S53, If it contains, skip the subsequent processing and directly end the process.
[0082] S54, If it does not contain, determine whether reconstruction is supported.
[0083] In this step, when determining whether reconstruction is supported, the judgment is based on the following conditions:
[0084] Condition 1, Whether the surface has only one contour line, that is, there should be no holes on the surface;
[0085] Condition 2, The surface is composed of edges in four directions, where two opposite edges are straight edges, and the remaining two opposite edges are curved edges or edges composed of multiple types of lines.
[0086] The surface refers to the surface described by the feature vector σ; if the surface satisfies both Condition 1 and Condition 2, it is determined that reconstruction is supported; otherwise, it is determined that reconstruction is not supported.
[0087] S55, If reconstruction is not supported, store the geometric data provided by the OnPolymesh method into the mapping table T.
[0088] S56, If reconstruction is supported, calculate the geometric data using the reconstruction method and store the data into the mapping table T.
[0089] Among them, as Figure 5 shown, the reconstruction method includes the following steps:
[0090] S561, create a new vertex array, a triangular mesh vertex index array, a UV array, and a normal vector array
[0091] S562, extract the points on two opposite curved edges in sequence as vertices and store the points in the vertex array.
[0092] Among them, since Revit uses a left-handed coordinate system, the extraction in sequence is performed in the order of the left-hand rule.
[0093] S563, calculate the UV coordinates of the extracted vertices on the surface and store them in the UV array.
[0094] Specifically, use the TessellateOnFace method provided by the Revit API to calculate the UV coordinates of the extracted vertices on the surface.
[0095] S564, calculate the normal vector coordinates of the vertices and store them in the normal vector array.
[0096] Specifically, use the ComputeNormal method provided by the Revit API to calculate the normal vector coordinates of the vertices.
[0097] S565, connect the vertices on the curved edge in sequence to form a polyline similar to the curved edge.
[0098] S566, connect the vertices on the two polylines to form polygons one by one and form a triangular mesh similar to the surface.
[0099] Here, as Figure 5 shown, when the number of vertices on the two polylines is equal, then select to connect the opposite vertices on the two polylines to form quadrilaterals one by one, and then connect a diagonal of each quadrilateral to form a triangular mesh similar to the surface.
[0100] When the number of vertices on the two polylines is not equal, then first connect the opposite vertices on the two polylines to form quadrilaterals one by one, and then connect a diagonal of each quadrilateral; then select the extra vertices on the longer (with more vertices) polyline of the two polylines and connect them to the last vertex on the other polyline to form a triangle, and then form a triangular mesh similar to the surface, as Figure 6 shown.
[0101] Store the vertex indices that make up the triangular mesh in the triangular mesh vertex index array; the surface refers to the surface described by the eigenvector σ, and the curved edge is the edge of this surface.
[0102] Based on the reconstruction method, these regular faces in the Face object can be approximately described with fewer vertices, achieving data simplification of the Face object. In addition, for Face objects and Mesh objects that cannot be reconstructed, the data volume after BIM lightweighting is reduced through an objectification method (corresponding to the lightweight processing flow of S55 and Mesh objects); the lightweight effect is better.
[0103] S6, if flag = 0, call the lightweight processing flow of the Mesh object and return to S2.
[0104] As Figure 4 shown, the lightweight processing flow of the Mesh object includes the following steps:
[0105] S61, calculate the eigenvector σ 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 eigenvector σ.
[0107] S63, if it contains, skip the subsequent processing and directly end the process.
[0108] S64, if it does not contain, store the geometric data provided by the OnPolymesh method into the mapping table T.
[0109] For easy understanding, the following combines a tree model case as Figure 7 shown to describe the lightweight processing flow of the Mesh object 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 the OnPolyMesh method is executed, check the value of the flag bit flag;
[0113] Step 4, if flag = 0, it indicates that the data of the Mesh object is being extracted currently. Calculate the eigenvector σ of the Mesh object according to the vertex array and triangular mesh vertex index array provided by the OnPolyMesh method;
[0114] Step 5, query whether the mapping table T contains the eigenvector σ;
[0115] Step 6, if it already contains, end the process;
[0116] Step 7, if not included, use the feature vector σ as the key and store the data such as the vertex array, triangular mesh vertex index array, UV array, and normal vector array provided by the OnPolyMesh method as the value into the mapping table T.
[0117] A BIM model lightweighting method based on fine-grained geometric objectification provided by this embodiment is based on finer-grained primitives and realizes primitive instantiation with faces as objects during the BIM lightweighting process. Compared with other geometric object instantiation methods, it has a finer granularity and a higher geometric reuse rate. And on this basis, a geometric reconstruction method is proposed, which greatly simplifies the geometric data of regular surfaces, has a smaller data volume, and can further realize the lightweighting of model data.
[0118] Embodiment 2
[0119] A BIM model lightweighting method based on fine-grained geometric objectification. On the basis of Embodiment 1, the lightweighting process of the Face object further includes S57, which uses the point removal method to reduce the vertices of the curve upsampling, and then uses the reconstruction method to generate triangular meshes similar to the surface at different precisions.
[0120] As Figure 8 shown, the S57 includes the following sub-steps:
[0121] S571, predefined an angle ε as the threshold, calculate the cosine value ω of ε; extract the vertex data of a curve edge in the surface, assume the vertex set P = {p0, p1, p2, p3, p4, p5,...}; and set i = 0, a = P[i].
[0122] S572, set j = i + 2, b = P[j].
[0123] S573, connect vertex 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 edge l and m can be calculated
[0125] S575, when is less than ω, the vertex pointed to by b is marked for removal, set b to the next vertex, that is, j = j + 1, b = P[j], and continue to execute S573.
[0126] S576, when is greater than ω, set a to b, that is, i = j, a = P[i], and continue to execute S572.
[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, Process another curved edge of the curved surface using the same method. The point removal method corresponds to S571 to S578.
[0129] S579, Recalculate the triangular mesh vertex index array, UV array, and normal vector array with reference to the steps of the reconstruction method.
[0130] For easy understanding, take the cylindrical surface with the highest usage rate in the electromechanical model as an example to describe the reconstruction process of the cylindrical surface as a whole, 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 bit flag;
[0135] Step 5, If flag = 1, it indicates that the data of the Face object is currently being extracted. Calculate the eigenvector σ of the Mesh object according to the vertex array and triangular mesh vertex index array provided by the OnPolyMesh method;
[0136] Step 6, Query whether the mapping table T contains the eigenvector σ;
[0137] Step 7, If it already contains, jump to Step 12;
[0138] Step 8, If it does not contain, judge whether it meets the redrawing conditions according to the composition and type of the edges of the cylindrical surface, that is, judge whether it supports reconstruction;
[0139] Step 9, If it meets the redrawing conditions (that is, supports reconstruction), extract the vertex array of the curved edge, calculate the triangular mesh vertex index array, UV array, normal vector array and other data according to the redrawing steps, and record the data in the mapping table T;
[0140] Step 10: According to data such as the new vertex array, triangular mesh vertex index array, UV array, and normal vector array, use the point removal method to calculate the geometric data of the cylindrical surface at different precisions and generate the vertex array, triangular mesh vertex index array, UV array, normal vector array, etc. at the corresponding precisions respectively, and update the data to the mapping table T; the results after redrawing are as shown in Figure 9 , Figure 10 , Figure 11 and Figure 12 shown;
[0141] Step 11: If the redrawing condition (i.e., reconstruction is not supported) is not met, record the data provided by the OnPolyMesh method into the mapping table T;
[0142] Step 12: When the OnFaceEnd method of the IExportContext interface is called, set the flag bit flag = 0.
[0143] A BIM model lightweighting method based on fine-grained geometric objectification provided in this embodiment adds the point removal method on the basis of Embodiment 1, which can further simplify geometric data to support geometric models at different precisions. Moreover, during the process of rendering the BIM model on the browser side, in order to reduce the consumption of browser resources and improve the rendering efficiency, the LOD (Level of Detail) technology is often adopted, which requires the surface to provide data at different precisions such as fine, medium, and rough. And 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 the rendering efficiency.
[0144] The above are only the embodiments of the present invention. Common general knowledge such as the specific structures and characteristics in the solution is not described in detail here. Those of ordinary skill in the art know all the common general knowledge in the technical field to which the invention belongs before the application date or the priority date, can know all the existing technologies in this field, and have the ability to apply the conventional experimental means before this date. Those of ordinary skill in the art can, under the inspiration given in this application, combine their own abilities to complete and implement this solution. Some typical well-known structures or well-known methods should not be an obstacle for those of ordinary skill in the art to implement this application. It should be noted that for those skilled in the art, without departing from the structure of the present invention, several deformations and improvements can be made, and these should also be regarded as the protection scope of the present invention, and these will not affect the implementation effect of the present invention and the practicality of the patent.
Claims
1. A lightweight method for BIM models based on fine-grained geometric objectification, characterized in that, It includes the following steps: S1. Create a new mapping table T to save the data of Face objects and Mesh objects in the model; S2. Call the IExportContext interface in the Revit SDK to extract the data of components in the model; S3. Check whether the components in the current model have been processed; S4. If the processing is completed, end the process; If the processing is not completed, obtain the value of the current flag bit flag; S5. If flag = 1, call the lightweight processing process of the Face object and return to S2; The lightweight processing process of the Face object includes the following steps: S51. Calculate the feature vector of the current Face object based on the geometric data provided by the OnPolymesh method ; S52, query whether the feature vector is included in the mapping table T ; S53. If it contains, skip the subsequent processing and directly end the process; S54. If it does not contain, judge whether reconstruction is supported; S55. If reconstruction is not supported, store the geometric data provided by the OnPolymesh method into the mapping table T; S56. If reconstruction is supported, calculate the geometric data using the reconstruction method and store the data into the mapping table T; S6. If flag = 0, call the lightweight processing process of the Mesh object and return to S2; The lightweight processing process of the Mesh object includes the following steps: S61, calculating the eigenvector of the current Mesh object according to the geometric data provided by the OnPolymesh method ; S62, query whether the feature vector is included in the mapping table T ; S63. If it contains, skip the subsequent processing and directly end the process; S64. If it does not contain, store the geometric data provided by the OnPolymesh method into the mapping table T.
2. The lightweight method of a BIM model based on fine-grained geometric objectification according to claim 1, characterized in that, In S54, when judging whether reconstruction is supported, the judgment is based on the following conditions: Condition 1. Whether the surface has only one contour line; Condition 2. The surface is composed of edges in four directions, where two opposite edges are straight edges, and the remaining two opposite edges are curved edges or edges composed of multiple types of lines; The surface refers to the eigenvector The described surface; if the surface satisfies both Condition 1 and Condition 2, it is determined to support reconstruction; otherwise, it is determined not to support reconstruction.
3. A BIM model lightweighting method based on fine-grained geometric objectification according to claim 1, characterized in that, In S56, the reconstruction method includes the following steps: S561. Create a new vertex array, a triangular mesh vertex index array, a UV array, and a normal vector array; S562. Extract the points on two opposite curved edges in order as vertices and store the points into the vertex array; S563. Calculate the UV coordinates of the extracted vertices on the surface and store them into the UV array; S564. Calculate the normal vector coordinates of the vertices and store them into the normal vector array; S565. Connect the vertices on the curved edge in order to form a polygonal broken line similar to the curved edge; S566. Connect the vertices on the two broken lines and form polygons, and form a triangular mesh similar to the surface; Store the vertex indices that make up the triangular mesh into the triangular mesh vertex index array; the surface refers to the surface described by the eigenvector The described face, and the curved edge is the edge of this face.
4. A BIM model lightweighting method based on fine-grained geometric objectification according to claim 3, characterized in that, In S562, the extraction in order is extraction in the order of the left-hand rule.
5. A BIM model lightweighting method based on fine-grained geometric objectification according to claim 3, characterized in that, In S563, use the TessellateOnFace method provided by the Revit API to calculate the UV coordinates of the extracted vertices on the surface.
6. A BIM model lightweighting method based on fine-grained geometric objectification according to claim 3, characterized in that, In S564, use the ComputeNormal method provided by the Revit API to calculate the normal vector coordinates of the vertices.
7. A lightweight method for BIM models based on fine-grained geometric objectification according to claim 1, characterized in that, The lightweight processing process of the Face object further includes S57. Adopt the point removal method to reduce the sampled vertices on the curved edge, and then use the reconstruction method to generate triangular meshes similar to the surface at different precisions.
8. A lightweight method for BIM models based on fine-grained geometric objectification according to claim 7, characterized in that The S57 includes the following sub-steps: S571, pre-define an angle as a threshold value, calculate the cosine value of ; extract the vertex data of a curved edge in the surface, assuming the vertex set ; and set ; S572, set ; S573, connecting vertex and form a new edge , and the edge with the neighboring point is denoted as ; S574, using the dot product formula , the included angle between side and can be calculated for the cosine value ; S575, when is less than , the pointed vertex is marked for removal, and is set to the next vertex, i.e., , and continue to execute S573; S576, when is greater than then set to i.e., and continue to execute S572; S577. When b points to the last vertex of the curved edge, store the remaining vertices on the curved edge into the vertex array; S578. Process another curved edge of the curved surface using the same method; S579. Recalculate the triangular mesh vertex index array, UV array, and normal vector array with reference 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