Model visualization method based on improved offshore wind turbine BIM model lightweight algorithm

The improved QEM algorithm lightweight processing of offshore fan BIM model solves the shortcomings of existing algorithms in model generation speed and simplification effect, and achieves more efficient model simplification and detail retention.

CN119445023APending Publication Date: 2025-02-14CHINA THREE GORGES CORPORATION
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411295131.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-15
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

When processing offshore fan BIM models, existing QEM algorithms have problems such as duplicate acquisition of vertex data, duplicate grid arrangement order and mismatch of component materials, resulting in slow model generation speed and large variations, and the simplified model may have a model. Collapse, loss of details, over-processing and other issues.

Method used

The improved QEM algorithm is used to optimize the simplified effect of the modeling algorithm by deduplication of vertex data and rearranging the order of triangle faces, combining boundary processing, patch flip and texture processing.

Benefits of technology

While ensuring the integrity of the model details, it significantly reduces the amount of data of the model, improves the speed of model generation, and solves the problem of poor model variation and simplification effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119445023A_ABST
    Figure CN119445023A_ABST
Patent Text Reader

Abstract

The invention discloses a model visualization method based on an improved offshore wind turbine BIM model lightweight algorithm, and the method comprises the following steps: Step 1, extracting data from an uploaded BIM model through a C-end tool and a corresponding analysis plug-in; 2, geometric data information and material information of the fan model are extracted through Revit secondary development, geometric data are written into a. Obj file, the material information is written into a. Mtl file, and the material information comprises colors, chartlets and transparency; and step 3, the optimized QEM algorithm is adopted to simplify the fan model. In the model generation stage, a model simplification algorithm is used, on the premise that model details are guaranteed, the model is further simplified, and the size of the model is compressed; in a data filling process, performing model simplification by using an improved QEM algorithm; in order to enable the model simplification algorithm to have a better simplification effect, concepts of boundary processing, patch overturning, texture processing and averaging field triangles are added on the basis of an original algorithm, and the simplification effect of the model simplification algorithm is optimized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of visualization management technology, and in particular to a model visualization method based on an improved offshore wind turbine BIM model lightweight algorithm. Background Art

[0002] The 3D model of wind turbines is an indispensable digital base for new energy construction, providing key basic information for many applications such as offshore wind power management, planning, simulation, safety, emergency response, etc. Since the 3D model involves many buildings and a huge amount of data, it needs to be lightweighted to simplify the model for easy storage.

[0003] With the improvement of computer hardware and graphics processing capabilities, graphics technology has developed rapidly, from the earliest line drawing to pixel-by-pixel rasterization, to today's advanced technologies such as real-time ray tracing and volume rendering. These technological advances enable data to be displayed in a more intuitive and easy-to-understand way, thus facilitating decision-making and analysis.

[0004] Through the QEM algorithm, the classified wind turbine model components can be simplified, which can effectively reduce the overall data volume of the model and reduce the size of the generated lightweight wind turbine BIM model file while ensuring the details.

[0005] The existing QEM algorithm has the following defects: 1. When the QEM algorithm obtains model data, problems such as repeated acquisition of vertex data, repeated mesh arrangement order, and mismatched component materials often occur. Although the model generation method can complete the conversion of BIM models to IFC models, the problem of too many meshes and slow transmission rate has not been solved; 2. Modern model simplification algorithms are not effective in simplifying BIM models, because many model simplification algorithms are based on two-dimensional manifold surfaces, which are characterized by: each edge is only adjacent to one or two faces, and faces adjacent to the same vertex can form a closed triangular face. The fan BIM model belongs to a non-manifold surface, which is characterized by: two or more planes share a vertex but not an edge; three or more planes share an edge; there are isolated edges and isolated faces; it is made up of a large number of structural components, with discrete spatial distribution and no continuous surface.

[0006] Due to the above characteristics, some general three-dimensional model simplification algorithms need to be improved before they can be applied to wind turbine BIM models. When processing BIM models, the existing QEM algorithm mainly processes two-dimensional manifold surfaces such as biological grid models, and does not take into account the characteristics of the model. In addition, the cost function is simple, which will cause the simplified BIM model to have problems such as model collapse, detail loss, and over-processing. Summary of the invention

[0007] The technical problem to be solved by the present invention is to provide a model visualization method based on an improved offshore wind turbine BIM model lightweight algorithm, which solves the problems of slow speed and model variation in the three-dimensional model lightweighting process and realizes application.

[0008] In order to solve the above technical problems, the technical solution adopted by the present invention is: The model visualization method based on the improved lightweight algorithm of offshore wind turbine BIM model includes the following steps: Step 1: Extract data from the uploaded BIM model through C-end tools and corresponding parsing plug-ins, including geometric information, material information and geographic information; The C-end tool can be Revit software, and the corresponding analysis plug-in is Dynamo plug-in; Step 2. Extract the geometric data and material information of the fan model through Revit secondary development, write the geometric data into the .obj file, and write the material information into the .mtl file. The material information includes color, texture and transparency. Step 3: Use the optimized QEM algorithm to simplify the fan model.

[0009] The steps for extracting the geometric data information of the wind turbine model in Step 2 above are as follows: The first step is to use the metadata collector FileteredElementCollector and filter to collect the view internal components Element and ElementID. Element is the element of the model, and ElementID is the unique ID contained in the element. The second step is to first traverse the GeometryElement class attribute instance to obtain the geometric entity, and then obtain the face attributes of the triangular mesh through solid.Faces; Step 3: Define List <xyz>The attribute is used to store the three vertices of the triangle mesh and calculate the normal CalculateNomals. Then the texture coordinates are calculated through the coordinates, normals and bounding box; The fourth step is to define the export location of the OBJ file and write the calculated values ​​in the above steps into the .obj file; v represents the vertex; vt represents the texture coordinate; vn represents the vertex normal vector; f represents the face composed of point data; and o represents the division by model object.

[0010] The steps for extracting the material information of the fan model in Step 2 above are as follows: The first step is to obtain the ElementID of all materials of the element by using the material collection method Element.GetMaterialIds of the specified element, convert the obtained ElementID into a material object, and obtain the color, transparency, and glossiness; The second step is to set the texture object, export the model texture map, and get the corresponding Asset through the appearance-related attribute AppearanceAssetId; then, calculate the corresponding material attribute value and normalize the color attribute; The third step is to define a string class field textureFolder to pass the material library address, and then obtain the material library address by reading the corresponding key value in the registry; finally, obtain the texture information through the Asset property and correspond it to the material library address in the registry to obtain the location of the texture file.

[0011] In the above Step 2, the geometric data is written into the .obj file and the material information is written into the .mtl file. Since the OBJ format file does not carry the attribute information of the component, the attribute information of the model is extracted through Revit secondary development and stored in the .json file. The steps for extracting the model attribute information are as follows: Step 1: Reference the class library file and serialized json file, inherit and rewrite the corresponding derived class; Step 2: Collect component Element and ElementID through element collector and filter, define model object and attribute ID, category, top constraint, bottom constraint, volume, family name and other attributes; Step 3: Create a list of elements <data>elements, assign the elements to the data attribute through the category Category, store them in a list, use the IO stream to create a local .json file, and serialize the attribute information data into the file; Step 4: Save the attribute information .json file locally and close the stream.

[0012] The optimized QEM algorithm in Step 3 above includes: Before the model simplification algorithm is implemented, the vertex data, including normal vectors, vertex colors, and texture coordinates, are first deduplicated. At the same time, the arrangement order of the triangles is re-aligned with the deduplicated vertex data. The deduplicated vertex data and the re-arranged triangle order are used as parameters and put into the encapsulated model simplification algorithm. The simplified result is returned as the return value. In the simplification process, the geometric and texture features of the model are considered, and the error cost function of the edge processing and optimization edge collapse algorithm is introduced. .

[0013] The specific process of the above simplification process is as follows: Create a simplification function , add boundary processing, patch flipping and domain triangle average area parameters to the simplified function: Draw a plane through each boundary edge and perpendicular to the boundary triangle where the edge is located. The edge (Va, Vb) is the boundary edge of the triangle (Va, Vb, Vc). Draw a perpendicular line to the edge (Va, Vb) through point Vc to obtain the vertical triangle (Vc, Vb, Vd). The plane a perpendicular to the vertical triangle (Va, Vb, Vc) is drawn. Let the equation of plane a be Ax+By+Cz+D=0. The point after the edge is shrunk is V(X0, Y0, Z0). When calculating the error cost of the edge, determine the distance Dcost between the newly generated vertex and the plane. When the angle between triangles exceeds 90 degrees, the triangles rendered by the 3D engine will display the transparent surface behind the triangles in front of the viewpoint, visually causing "model holes" to appear. In order to avoid the "model hole" phenomenon, the angle between the model triangles is added as an influencing factor to the edge folding error cost.

[0014] The above-mentioned method of adding the angle between the triangular faces of the model as an influencing factor to the edge folding error cost specifically includes: When calculating the edge folding error cost, the angle between the normal vector of the triangle and the normal vector of the newly generated triangle is determined. If the angle is too large, the cost of shrinking the edge is greatly increased. This method can effectively avoid the occurrence of face flipping, thereby ensuring the integrity of the model's geometric details. Take any triangular face T, and record its three vertices as V1, V2, and V3 respectively. The unit normal vector of triangular face T is It can be expressed as the following formula: ; According to the error cost function, the unit normal vector of the triangle T is , calculate the angle between the normal vectors of the two triangles before and after the edge contraction operation to determine the angle between the two triangles; ; The loop determines the angle generated after each edge is shrunk to determine whether the flip angle is too large. If it is too large, the edge cost of this edge is increased.

[0015] The above wind turbine model is split according to the component type, and the components are selected to divide the levels. The distance is controlled by the mouse wheel to load different levels. In the splitting process, in order to ensure that the geometric information and attribute information of the sub-components can be accurately matched and saved, BIMServer open source software is used for structural screening; By connecting to the server through the BimServerClient interface in the BIMServer API, you can perform functions such as type identification, model structure traversal, attribute information reading, and data export, thereby completing model reconstruction.

[0016] The simplified OBJ format model and the sub-files composed of different component sets extracted according to the IFC component class are converted into b3dm tile files respectively, and then the b3dm tiles are processed by constructing a tile metadata organization structure to finally form 3DTiles data.

[0017] For the simplified model above, the hierarchical display of model data is designed accordingly between the wind turbine model outline and the solid model, i.e., between LOD3 and LOD4: By changing the geometric error geometricError attribute value in the metadata, the model level can be changed as the viewing distance changes. The grid is divided according to the adaptive octree spatial structure. The steps are as follows: Step 1: Initialize the root node. Get the global bounding box of the current BIM model, including all family instance objects of the model; determine the size and center position of the bounding box; Step 2: Divide the subspace. First, recursively divide the bounding box obtained in step 1 into 8 subspaces of equal size along the X, Y, and Z axes from the center of the model. Step 3: Check whether the model at each boundary is cut; if the model is cut by the boundary, extend the boundary range of the sub-bounding box; if it is not cut, shrink the sub-bounding box until it covers all the models, which can ensure the integrity of the model in the bounding box and reduce the amount of blank space memory; Step 4: Export the model in the sub-bounding box by adding one to the level of the previous node model; Step 5: Determine whether the maximum octree depth has been reached, and whether the number of family instances in the child node has reached the threshold. If the number of model components in the bounding box is less than the predetermined minimum capacity or the LOD level of the model is 4, the process ends; otherwise, execute steps 1 and 2 to continue dividing the bounding box; until all three-dimensional tiles are exported, the construction of the octree index structure is completed. The present invention provides a model visualization method based on an improved offshore wind turbine BIM model lightweight algorithm. In the model generation stage, a model simplification algorithm is used to further simplify the model and compress the size of the model while ensuring the model details; in the data filling process, an improved QEM algorithm is used to simplify the model; in order to better target the wind turbine BIM model and make the model simplification algorithm have a better simplification effect, the concepts of boundary processing, face flipping, texture processing and average domain triangles are added to the original algorithm to optimize the simplification effect of the model simplification algorithm. The algorithm effect is verified: the geometric errors generated before and after the model are used to judge the processing quality of the model simplification algorithm, and the frame number detection when the model is loaded is performed by using the frame number detection module provided by Three.Js on the Web end; the simplification quality evaluation is performed: the geometric similarity of the model simplification algorithm is verified by the Hausdorff distance, and the minimum distance between the vertices of the original model and the model after lightweighting is judged, so as to verify the lightweight processing effect of the algorithm. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The present invention will be further described below in conjunction with the accompanying drawings and embodiments: Figure 1 A flowchart of geometric data acquisition according to a specific embodiment of the present invention; Figure 2 This is a material acquisition flow chart of a specific embodiment of the present invention; Figure 3 It is a lightweight flow chart of the improved QEM algorithm model of a specific embodiment of the present invention; Figure 4 A schematic diagram of boundary processing in a specific embodiment of the present invention; Figure 5 A schematic diagram of a half-edge folding method according to a specific embodiment of the present invention; Figure 6 This is a flowchart of obtaining the whole tile according to a specific embodiment of the present invention; Figure 7 This is a flowchart of obtaining IFC component sub-file tiles according to a specific embodiment of the present invention; Figure 8 This is a model loading scheduling flow chart of a specific embodiment of the present invention. DETAILED DESCRIPTION

[0019] In order to make the purpose, technical solutions and advantages of the present invention clearer, the following content will systematically and completely describe the specific technical solutions of the present invention in combination with the drawings provided according to the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0020] The model visualization method based on the improved lightweight algorithm of offshore wind turbine BIM model includes the following steps: Step 1, extracting data from the uploaded BIM model through a C-end tool and a corresponding parsing plug-in, including geometric information, material information and geographic information; the C-end tool of the present invention may use Revit software, and the parsing plug-in may use a Dynamo plug-in; Step 2. Extract the geometric data and material information of the fan model through Revit secondary development, write the geometric data into the .obj file, and write the material information into the .mtl file. The material information includes color, texture and transparency. Step 3: Use the optimized QEM algorithm to simplify the fan model.

[0021] The flow chart of extracting geometric data information of the wind turbine model in Step 2 above is shown in Figure 1 , the steps are as follows: The first step is to use the metadata collector FileteredElementCollector and filter to collect the view internal components Element and ElementID. Element is the element of the model, and ElementID is the unique ID contained in the element. The second step is to first traverse the GeometryElement class attribute instance to obtain the geometric entity, and then obtain the face attributes of the triangular mesh through solid.Faces; Step 3: Define List <xyz>The attribute is used to store the three vertices of the triangle mesh and calculate the normal CalculateNomals. Then the texture coordinates are calculated through the coordinates, normals and bounding box; The fourth step is to define the export location of the OBJ file and write the calculated values ​​in the above steps into the .obj file; v represents the vertex; vt represents the texture coordinate; vn represents the vertex normal vector; f represents the face composed of point data; and o represents the division by model object.

[0022] The steps for extracting the material information of the fan model in Step 2 above are as follows: The first step is to obtain the ElementID of all materials of the element by using the material collection method Element.GetMaterialIds of the specified element, convert the obtained ElementID into a material object, and obtain the color, transparency, and glossiness; The second step is to set the texture object, export the model texture map, and get the corresponding Asset through the appearance-related attribute AppearanceAssetId; then, calculate the corresponding material attribute value and normalize the color attribute; The third step is to define a string class field textureFolder to pass the material library address, and then obtain the material library address by reading the corresponding key value in the registry; finally, obtain the texture information through the Asset property and correspond it to the material library address in the registry to obtain the location of the texture file.

[0023] In the above Step 2, the geometric data is written into the .obj file and the material information is written into the .mtl file. Since the OBJ format file does not carry the attribute information of the component, the attribute information of the model is extracted through Revit secondary development and stored in the .json file. The steps for extracting the model attribute information are as follows: Step 1: Reference the class library file and serialized json file, inherit and rewrite the corresponding derived class; Step 2: Collect component Element and ElementID through element collector and filter, define model object and attribute ID, category, top constraint, bottom constraint, volume, family name and other attributes; Step 3: Create a list of elements <data>elements, assign the elements to the data attribute through the category Category, store them in a list, use the IO stream to create a local .json file, and serialize the attribute information data into the file; Step 4: Save the attribute information .json file locally and close the stream.

[0024] The optimized QEM algorithm in Step 3 above includes: Before the model simplification algorithm is implemented, the vertex data, including normal vectors, vertex colors, and texture coordinates, are first deduplicated. At the same time, the arrangement order of the triangles is re-aligned with the deduplicated vertex data. The deduplicated vertex data and the re-arranged triangle order are used as parameters and put into the encapsulated model simplification algorithm. The simplified result is returned as the return value. In the simplification process, the geometric and texture features of the model are considered, and the error cost function of the edge processing and optimization edge collapse algorithm is introduced. ; By optimizing the error cost function and processing the texture coordinates, the final simplified model can greatly reduce the amount of data compared to the original model while ensuring the integrity of the model details and appearance.

[0025] The model lightweight flow chart of the optimized QEM algorithm is shown in Figure 3 , the process is as follows: The coefficients of the plane equation To express The plane equation of each triangle in the plane. Let the plane equation be ,in , is a constant, and the coordinates of a certain point V are , then the distance from V to the plane is: ; because ,so ; on the edge The new apex of folding knives When , the error matrix of the new vertex is ,in and They are and The error matrix of point The position is regarded as ;Depend on and Available , from which we can infer that the vertex To plane The formula for the square of the distance is: ; To obtain the error matrix of a certain point, the following method can be used. Let Q(V) represent the error matrix of vertex V. The formula is: ; in, It is the geometry of all triangles containing vertex V. When performing edge folding operation, take Vertex as edge collapse operation The error matrix of The folding cost is transformed into the error cost function that can be expressed as a quadratic surface equation:

[0026] .

[0027] The specific process of the above simplification process is as follows: Create a simplification function , add boundary processing, face flipping and domain triangle average area parameters to the simplification function to better preserve the geometric features of the model feature area and improve the simplification efficiency of the model: For each boundary edge, a plane is made that passes through the edge and is perpendicular to the boundary triangle where the edge is located. The edge (Va, Vb) is the boundary edge of the triangle (Va, Vb, Vc). A perpendicular line is made to the edge (Va, Vb) through point Vc to obtain the vertical triangle (Vc, Vb, Vd). The plane a perpendicular to the vertical triangle (Va, Vb, Vc) is made. Assume that the equation of plane a is Ax+By+Cz+D=0, and the point after the edge is shrunk is V(X0, Y0, Z0). When calculating the error cost of the edge, the distance Dcost between the newly generated vertex and the plane is determined. This method can prevent the newly generated vertex from deviating too much from the position. See the schematic diagram of boundary processing. Figure 4 ; When the angle between triangles exceeds 90 degrees, the triangles rendered by the 3D engine will display the transparent surface behind the triangles in front of the viewpoint, visually resulting in something similar to "model holes". In essence, the geometric information of the model is not lost, but the model rendering error is caused by the large angle. In order to avoid the "model hole" phenomenon, the angle between the model triangles is added as an influencing factor to the edge folding error cost.

[0028] The above-mentioned method of adding the angle between the triangular faces of the model as an influencing factor to the edge folding error cost specifically includes: When calculating the edge folding error cost, the angle between the normal vector of the triangle and the normal vector of the newly generated triangle is determined. If the angle is too large, the cost of shrinking the edge is greatly increased. This method can effectively avoid the occurrence of face flipping, thereby ensuring the integrity of the model's geometric details. Take any triangular face T, and record its three vertices as V1, V2, and V3 respectively. The unit normal vector of triangular face T is It can be expressed as the following formula: ; According to the error cost function, the unit normal vector of the triangle T is , calculate the angle between the normal vectors of the two triangles before and after the edge contraction operation to determine the angle between the two triangles; ; The loop determines the angle generated after each edge is shrunk to determine whether the flip angle is too large. If it is too large, the edge cost of this edge is increased.

[0029] In the simplification of BIM models, the model uses many small triangular faces to form small components such as buttons, and uses larger triangular faces to create the overall framework of the model. The concept of the average area of ​​domain triangles is used in the stage of model simplification to ensure the integrity of the overall characteristics of the model.

[0030] When performing edge folding on the texture seam edge, choose to use the half-edge folding method to shrink the edge: when shrinking the edge (u, v), no new vertex is generated, but it is directly shrunk to point u or v, and the cost value of the texture seam edge is increased to ensure the integrity of the texture information. The schematic diagram of this method is shown in Figure 5 .

[0031] After the data is loaded, the average area of ​​the domain triangles is obtained by taking the sum of the areas of the triangles around each vertex that contain this vertex, and then dividing it by the number of triangles that contain this vertex. The value obtained is the size of the average area of ​​the domain triangles of the point. The above wind turbine model is split according to the component type, and the components are selected to divide the levels. The distance is controlled by the mouse wheel to load different levels. In the splitting process, in order to ensure that the geometric information and attribute information of the sub-components can be accurately matched and saved, BIMServer open source software is used for structural screening; By connecting to the server through the BimServerClient interface in the BIMServer API, you can perform functions such as type identification, model structure traversal, attribute information reading, and data export, thereby completing model reconstruction.

[0032] The simplified OBJ format model and the sub-files composed of different component sets extracted according to the IFC component class are converted into b3dm tile files respectively, and then the b3dm tiles are processed by constructing a tile metadata organization structure to finally form 3DTiles data.

[0033] There are two ways to obtain tiles: Method 1 is to obtain the tiles of the entire model, that is, use the obj23dtiles tool, combine the model attribute information exported by secondary development and the simplified OBJ format model to create b3dm tile data, then design the tileset file according to the tile model organization method, and finally generate 3D Tiles data. See the flowchart for details. Figure 6 .

[0034] The two-dimensional IFC component sub-file tiles are obtained by using the IfcConvert conversion tool in IfcOpenShell to convert the IFC file into OBJ format. Combined with the IFC model attribute file (.json) exported by BIMServer, the obj23dtiles conversion tool is used to create b3dm tiles. Finally, 3DTiles data is generated through tile metadata design (tileset.json). See the flowchart for details. Figure 7 .

[0035] For the simplified model above, the hierarchical display of model data is designed accordingly between the wind turbine model outline and the solid model, i.e., between LOD3 and LOD4: By changing the geometric error geometricError attribute value in the metadata, the model level can be changed as the viewing distance changes. The grid is divided according to the adaptive octree spatial structure. The steps are as follows: Step 1: Initialize the root node. Get the global bounding box of the current BIM model, including all family instance objects of the model; determine the size and center position of the bounding box; Step 2: Divide the subspace. First, recursively divide the bounding box obtained in step 1 into 8 subspaces of equal size along the X, Y, and Z axes from the center of the model. Step 3: Check whether the model at each boundary is cut; if the model is cut by the boundary, extend the boundary range of the sub-bounding box; if it is not cut, shrink the sub-bounding box until it covers all the models, which can ensure the integrity of the model in the bounding box and reduce the amount of blank space memory; Step 4: Export the model in the sub-bounding box by adding one to the level of the previous node model; Step 5: Determine whether the maximum octree depth has been reached, and whether the number of family instances in the child node has reached the threshold. If the number of model components in the bounding box is less than the predetermined minimum capacity or the LOD level of the model is 4, the process ends; otherwise, execute steps 1 and 2 to continue dividing the bounding box; until all three-dimensional tiles are exported, the construction of the octree index structure is completed. Customize the tile space structure tree according to the tile rendering rules, use the global scene tileset.json to organize and manage all spatial data models, build the spatial structure of the model scene according to the nested relationship of tile data, use two wind turbine model level division methods to perform LOD display, and place tile model files of different levels in each node of the structure tree to realize the spatial organization and scheduling of the model. The specific method of dividing the levels is as follows: Method 1: Divide the levels according to the overall model, that is, convert the simplified overall model into tile set data as the LOD level; for example, when the simplification rate is 30%, the model is displayed as the LOD1 level; when the simplification rate is 50%, the model is displayed as the LOD2 level.

[0036] Method 2: Divide the levels by components, that is, extract data from the IFC model according to the component set, and finally convert it into tile set data as the LOD level; for example, the model outer contour component is used as the LOD1 level.

[0037] Based on LOD, the view culling technology is introduced to effectively reduce the amount of data loaded by the model and improve rendering efficiency.

[0038] When facing a large model or scene, in order to improve rendering efficiency, we do not need to pass the entire scene data into the rendering pipeline; this algorithm can control the camera viewpoint position and viewing angle changes, and determine whether to add tiles to the rendering sequence based on the position of the tiles and the size of the geometric error. On the basis of LOD, for the model in the view frustum, the distance between the model and the camera viewpoint is used to determine the loading level of the 3D tile. The closer the distance is, the higher the complexity of loading tiles and the higher the LOD level of the model; the farther the distance is, the lower the complexity of loading tiles and the lower the LOD level of the model. The screen space error is an indicator for determining the specific loading level. After the frustum culling algorithm is introduced, the 3D tiles are scheduled for rendering, using depth-first and breadth-first traversal to search for tile nodes.

[0039] First, the tile metadata is loaded, the json file request path is given through the Cesium3DTileset class and tileset.json is parsed, and then the spatial tree structure of the tile is traversed to read the geometric error. The model in the tile is not requested during the parsing process.

[0040] After parsing the json file, the visualization system requests the model through the viewpoint position. The system determines the rendering order of tiles based on the screen space error. The model data loading and scheduling flow chart is shown in Figure 8 , the steps are as follows: Step 1, parse the json file: introduce the file request path through the Cesium3DTileset class, the main management class of 3DTiles data, traverse the spatial tree structure of the 3D model tile, any tree node of the model has corresponding tile data, manage the model tile data information through the Cesium3DTile class, and record attribute information such as geometric error, bounding volume, and deformation transform; Step 2, tile culling: According to the culling rules mentioned above, calculate the distance from the camera viewpoint to the tile, calculate the screen space error of the tile, perform tile culling, and then determine the loading level of the tile; Step 3, LOD level judgment: According to the screen space error, determine whether the tile space error reaches the set maximum value. If the screen space error value is lower than the preset threshold, there is no need to load the sub-tile and continue with the subsequent operation; if the screen space error value of the tile exceeds the preset threshold, step 2 needs to be performed again until it is less than the preset maximum screen space error value; Step 4, file request: add tile data to the file request queue according to the size of the screen space error, render tile data with a smaller viewing distance first, then render tile data with a larger viewing distance, and finally sort the requested files by depth according to the distance from the tile center to the camera to ensure the final rendering effect; Step 5, file rendering: Cesium uses the Cesium3DTileContentFactory factory method that processes the content of 3D Tiles to process tile information of different formats, uses the Batched3DModel3DTileContent class that loads and manages the batch model in 3DTiles to process the tile data of the related b3dm type, and finally uses the Primitive class that presents the properties in the 3D scene for rendering.

[0041] The analytical visualization system is divided into data layer, service layer and visualization layer. The data layer is the basis of the service layer and visualization layer, mainly including 3D model data in 3D Tiles format; the service layer includes multi-source data services such as vector data, terrain elevation data, 3DTiles wind turbine model, etc.; the visualization layer includes attribute information query spatial measurement, flight roaming and other functions. The visualization system also involves the following functions based on scene model rendering: Map function: It can support the display of multiple map types, including offline maps and various online thematic maps, and realize the switching function of maps of different dimensions; it can load DEM data and city model vector data, and support terrain display function.

[0042] Spatial query function; the wind turbine model data volume is large and the component types are diverse. The ability to quickly query and locate targets is a necessary condition for offshore wind power space management; realize attribute information query of GIS vector data and BIM model data.

[0043] Flying roaming function: In order to be able to browse the wind turbine model from all angles, the platform system should have a space roaming function. Users can customize and save roaming routes to achieve all-round browsing of the target model from outdoors to indoors.

[0044] Spatial measurement function: Spatial measurement is the most necessary function of GIS system. This system can realize spatial distance measurement, spatial area measurement and triangulation measurement functions for any wind turbine model, terrain and vector data. It adopts three-dimensional coordinate picking to improve the ability to obtain information in three-dimensional space. Hawkeye display and highlighting functions; the main view is kept consistent with the Hawkeye map data to realize the model position confirmation function; the wind turbine model component highlighting function is realized.

[0045] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.< / data> < / xyz> < / data> < / xyz>

Claims

1. A model visualization method based on an improved lightweight algorithm for offshore wind turbine BIM models, characterized in that: The following steps are involved: Step 1: Extract data from the uploaded BIM model through C-end tools and corresponding parsing plug-ins, including geometric information, material information and geographic information; Step 2. Extract the geometric data and material information of the fan model through Revit secondary development, write the geometric data into the .obj file, and write the material information into the .mtl file. The material information includes color, texture and transparency. Step 3: Use the optimized QEM algorithm to simplify the fan model.

2. The model visualization method based on the improved offshore wind turbine BIM model lightweight algorithm according to claim 1 is characterized in that: The steps for extracting the geometric data information of the fan model in Step 2 are as follows: The first step is to use the metadata collector FileteredElementCollector and filter to collect the view internal components Element and ElementID. Element is the element of the model, and ElementID is the unique ID contained in the element. The second step is to first traverse the GeometryElement class attribute instance to obtain the geometric entity, and then obtain the face attributes of the triangular mesh through solid.Faces; Step 3: Define List <xyz> The attribute is used to store the three vertices of the triangle mesh and calculate the normal CalculateNomals; then the texture coordinates are calculated through the coordinates, normals and bounding box;< / xyz> Step 4: Define the export location of the OBJ file and write the calculated values ​​in the above steps into the .obj file; Among them, v represents the vertex; vt represents the texture coordinate; vn represents the vertex normal vector; f represents the face composed of point data; and o represents the division by model object.

3. The model visualization method based on the improved offshore wind turbine BIM model lightweight algorithm according to claim 2 is characterized in that: The steps for extracting the material information of the fan model in Step 2 are as follows: The first step is to obtain the ElementID of all materials of the element by using the material collection method Element.GetMaterialIds of the specified element, convert the obtained ElementID into a material object, and obtain the color, transparency, and glossiness; The second step is to set the texture object, export the model texture map, and get the corresponding Asset through the appearance-related attribute AppearanceAssetId; then, calculate the corresponding material attribute value and normalize the color attribute; The third step is to define a string class field textureFolder to pass the material library address, and then obtain the material library address by reading the corresponding key value in the registry; finally, obtain the texture information through the Asset property and correspond it to the material library address in the registry to obtain the location of the texture file.

4. The model visualization method based on the improved offshore wind turbine BIM model lightweight algorithm according to claim 3 is characterized in that: In the above Step 2, the geometric data is written into the .obj file, and the material information is written into the .mtl file. Since the OBJ format file does not carry the attribute information of the component, the attribute information of the model is extracted through Revit secondary development and stored in the .json file. The steps for extracting the model attribute information are as follows: Step 1: Reference the class library file and serialized json file, inherit and rewrite the corresponding derived class; Step 2: Collect component Element and ElementID through element collector and filter, define model object and attribute ID, category, top constraint, bottom constraint, volume, family name and other attributes; Step 3: Create a list of elements <data> elements, assign the elements to the data attribute through the category Category, store them in a list, use the IO stream to create a local .json file, and serialize the attribute information data into the file;< / data> Step 4: Save the attribute information .json file locally and close the stream.

5. The model visualization method based on the improved offshore wind turbine BIM model lightweight algorithm according to claim 4 is characterized in that: The optimized QEM algorithm in Step 3 includes: Before the model simplification algorithm is implemented, the vertex data, including normal vectors, vertex colors, and texture coordinates, are first deduplicated. At the same time, the arrangement order of the triangles is re-aligned with the deduplicated vertex data. The deduplicated vertex data and the re-arranged triangle order are used as parameters and put into the encapsulated model simplification algorithm. The simplified result is returned as the return value. In the simplification process, the geometric and texture features of the model are considered, and the error cost function of the edge processing and optimization edge collapse algorithm is introduced. .

6. The model visualization method based on the improved offshore wind turbine BIM model lightweight algorithm according to claim 5 is characterized in that: The specific process of the simplification process is as follows: Create a simplification function , add boundary processing, patch flipping and domain triangle average area parameters to the simplified function: Draw a plane through each boundary edge and perpendicular to the boundary triangle where the edge is located. The edge (Va, Vb) is the boundary edge of the triangle (Va, Vb, Vc). Draw a perpendicular line to the edge (Va, Vb) through point Vc to obtain the vertical triangle (Vc, Vb, Vd). The plane a perpendicular to the vertical triangle (Va, Vb, Vc) is drawn. Let the equation of plane a be Ax+By+Cz+D=0. The point after the edge is shrunk is V(X0, Y0, Z0). When calculating the error cost of the edge, determine the distance Dcost between the newly generated vertex and the plane. When the angle between triangles exceeds 90 degrees, the triangles rendered by the 3D engine will display the transparent surface behind the triangles in front of the viewpoint, visually causing "model holes" to appear. In order to avoid the "model hole" phenomenon, the angle between the model triangles is added as an influencing factor to the edge folding error cost.

7. The model visualization method based on the improved offshore wind turbine BIM model lightweight algorithm according to claim 6 is characterized in that: The method of adding the angle between the triangular faces of the model as an influencing factor to the edge folding error cost specifically includes: When calculating the edge folding error cost, the angle between the normal vector of the triangle and the normal vector of the newly generated triangle is determined. If the angle is too large, the cost of shrinking the edge is greatly increased. This method can effectively avoid the occurrence of face flipping, thereby ensuring the integrity of the model's geometric details. Take any triangular face T, and record its three vertices as V1, V2, and V3 respectively. The unit normal vector of triangular face T is It can be expressed as the following formula: ; According to the error cost function, the unit normal vector of the triangle T is , calculate the angle between the normal vectors of the two triangles before and after the edge contraction operation to determine the angle between the two triangles; ; The loop determines the angle generated after each edge is shrunk to determine whether the flip angle is too large. If it is too large, the edge cost of this edge is increased.

8. The model visualization method based on the improved offshore wind turbine BIM model lightweight algorithm according to claim 7, characterized in that: The wind turbine model is split according to the component type, the components are screened and divided into levels, and the distance is controlled by the mouse wheel to load different levels; In the splitting process, in order to ensure that the geometric information and attribute information of the sub-components can be accurately matched and saved, BIMServer open source software is used for structural screening; By connecting to the server through the BimServerClient interface in the BIMServer API, you can perform functions such as type identification, model structure traversal, attribute information reading, and data export, thereby completing model reconstruction.

9. The model visualization method based on the improved offshore wind turbine BIM model lightweight algorithm according to claim 8, characterized in that: The simplified OBJ format model and the sub-files composed of different component sets extracted according to the IFC component class are converted into b3dm tile files respectively, and then the b3dm tiles are processed by constructing a tile metadata organization structure to finally form 3D Tiles data.

10. The model visualization method based on the improved offshore wind turbine BIM model lightweight algorithm according to claim 9, characterized in that: The simplified model is designed to display the model data in different levels between the outline of the wind turbine model and the solid model, i.e., between LOD3 and LOD4: By changing the geometric error geometricError attribute value in the metadata, the model level can be changed as the viewing distance changes. The grid is divided according to the adaptive octree spatial structure. The steps are as follows: Step 1: Initialize the root node; obtain the global bounding box of the current BIM model, including all family instance objects of the model; determine the size and center position of the bounding box; Step 2: Divide the subspace. First, recursively divide the bounding box obtained in step 1 into 8 subspaces of equal size along the X, Y, and Z axes from the center of the model. Step 3: Check whether the model at each boundary is cut; if the model is cut by the boundary, extend the boundary range of the sub-bounding box; if it is not cut, shrink the sub-bounding box until it covers all the models, which can ensure the integrity of the model in the bounding box and reduce the amount of blank space memory; Step 4: Export the model in the sub-bounding box by adding one to the level of the previous node model; Step 5: determine whether the maximum octree depth is reached, and whether the number of family instances in the child node reaches the threshold; If the number of model components in the bounding box is less than the predetermined minimum capacity or the LOD level of the model is 4, the process ends; Otherwise, execute steps 1 and 2 to continue dividing the bounding box; until all three-dimensional tiles are exported, the construction of the octree index structure can be completed.

Citation Information

Cited By

  • BIM (Building Information Modeling) multi-level detail generation method

    CN121074320A

  • Offshore wind power scene rendering method based on broken line optimization and electronic equipment

    CN121810900A

  • Offshore wind power scene rendering method based on polyline optimization and electronic device

    CN121810900B