BIM model plane cutting analysis method based on Cesium
By evaluating the importance of components and performing spatial division in the BIM model, combining the user's viewpoint dynamically scheduled the cropping task, and using a progressive grid simplification algorithm, the difficulty of setting crop depth and range in the plane cropping analysis of the BIM model is solved, achieving efficient adaptive cropping and good rendering performance.
Patent Information
- Application Number
- CN202411885301.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-03-28
AI Technical Summary
In the plane cropping analysis of BIM models based on Cesium, it is difficult to set the crop depth and range to take into account comprehensiveness and targetedness, resulting in data loss or excessive calculation, affecting the analysis and visualization effect.
By obtaining component geometric features, topological relationships and semantic properties in the BIM model, component importance weights are calculated, and spatial division is performed using the octree spatial index algorithm. Calculate subregion visibility and crop priority based on user viewpoints, schedule crop tasks dynamically, and adjust grid resolution using progressive grid simplification algorithm.
It realizes efficient adaptive cutting of BIM models, retains the geometric integrity of important components, simplifies secondary components, improves cutting efficiency, balances model accuracy and rendering performance, and provides an effective solution for the visualization of large-scale complex BIM models.
Smart Images

Figure CN119720360A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information technology, and in particular to a BIM model plane clipping analysis method based on Cesium. Background Art
[0002] In the plane clipping analysis of BIM models based on Cesium, the setting of clipping limits is a key technical issue. The maximum and minimum values of the clipping depth and range need to be determined according to the specific business scenario and model characteristics. If the clipping depth is too large, the data below the clipping surface may be lost, affecting the subsequent analysis and visualization effects; if the clipping depth is too small, the internal structure and key information of the model may not be fully displayed. At the same time, the setting of the clipping range also needs to take into account comprehensiveness and pertinence. On the one hand, the clipping range should cover the entire model as much as possible to avoid missing important components and spaces; on the other hand, the clipping range should not be too large, otherwise it will increase the amount of calculation and rendering pressure, affecting system performance and user experience. In addition, the dynamic adjustment of clipping limits is also an issue worthy of attention. In practical applications, it may be necessary to adjust the clipping depth and range in real time according to the user's interactive operations and changes in perspective to ensure the coherence and consistency of the clipping effect. This puts higher requirements on the robustness and adaptability of the clipping algorithm, and requires a trade-off and optimization between time efficiency and spatial accuracy. Summary of the invention
[0003] The present invention provides a BIM model plane clipping analysis method based on Cesium, which mainly includes: The geometric features, topological relationships and semantic attributes of the components in the BIM model are obtained, and the component importance weights are calculated according to preset evaluation criteria; the octree spatial indexing algorithm is used to spatially divide the BIM model according to the component importance weights and spatial distribution characteristics to obtain multiple sub-areas; the user's viewpoint position and line of sight direction are obtained, the visibility of the sub-area is calculated, and a clipping priority queue is generated in combination with the sub-area importance weights; the clipping task is dynamically scheduled according to the clipping priority queue, and if the user's viewpoint distance or occlusion relationship changes significantly, the clipping priority is re-evaluated; a list of components in the sub-area to be clipped is obtained, and the influence weight of the component on the clipping effect is calculated according to the distance between the component and the viewpoint and the occlusion relationship; for the simplified clipped components, a progressive mesh simplification algorithm is used to adjust the mesh resolution according to the geometric complexity of the component and the clipping accuracy requirements.
[0004] The technical solution provided by the embodiment of the present invention may have the following beneficial effects: The present invention discloses a method for adaptive clipping of BIM models based on component importance. The method first evaluates the importance of components and performs spatial division, and then calculates the visibility of sub-areas and the clipping priority according to the user's viewpoint. During the clipping process, the perspective change is dynamically monitored and the task scheduling is adjusted, the geometric integrity of important components is retained, and the secondary components are simplified. A progressive mesh simplification algorithm is used to adaptively adjust the component resolution, and the continuity of the clipping boundary is ensured by geometric smoothing. Finally, the clipping results are seamlessly merged and the visible part is rendered in real time. The present invention realizes efficient adaptive clipping of BIM models, improves clipping efficiency while ensuring the integrity of important components, effectively balances model accuracy and rendering performance, and provides an effective solution for the visualization of large-scale complex BIM models. BRIEF DESCRIPTION OF THE DRAWINGS
[0005] Figure 1 This is a flow chart of a BIM model plane clipping analysis method based on Cesium of the present invention. DETAILED DESCRIPTION
[0006] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
[0007] like Figure 1 In this embodiment, a BIM model plane clipping analysis method based on Cesium may specifically include: S101, obtaining geometric features, topological relationships, and semantic attributes of components in the BIM model, and calculating component importance weights according to preset evaluation criteria.
[0008] The geometric features of each component in the BIM model are obtained, including the size, position, shape and other information of the component. The topological relationship between the components in the BIM model is obtained to determine the connection, adjacency, inclusion and other relationships between the components. The semantic attributes of each component in the BIM model are obtained, such as the material, purpose, system and other information of the component. According to the pre-established component evaluation rule library, a comprehensive evaluation is performed on the geometric features, topological relationships and semantic attributes of each component. The evaluation rule library contains the importance judgment conditions and weight coefficients of various components. According to the comprehensive evaluation results, the initial importance score of each component is calculated. The higher the score, the higher the importance of the component. On the basis of the initial importance score, the score is corrected by the topological relationship between the components. If the topological correlation between a component and other components with high importance is high, the importance score of the component is also increased accordingly. After correction, the final importance score of the component is obtained. According to the final importance score, the Min-Max normalization method is used to map the importance score of each component to between 0 and 1 to obtain the importance weight coefficient of the component. The calculated component importance weight coefficient is associated with the geometric, topological and semantic attribute data of the component to form a complete component importance evaluation result data set. Based on the component importance assessment result dataset, it can be further applied to BIM model visualization, information query, design optimization and other tasks to achieve automatic identification, highlighting and attribute query of important components, providing support for the application and analysis of BIM models.
[0009] Specifically, when obtaining the geometric features of each component in the BIM model, the size and position of the component can be represented by a three-dimensional spatial coordinate system. For example, the length, width, and height data of the wall component are extracted, which are 5 meters, 24 meters, and 3 meters respectively, and the starting coordinates in the model coordinate system are (2,1,0). At the same time, the shape features of the component are characterized by a voxelization algorithm, and the component is divided into several small cubic units. The geometric shape feature parameters such as the number of voxels and the voxel distribution density of each component are counted. When analyzing the topological relationship of the component, it can be done by combining the spatial index algorithm with the graph theory algorithm. Taking the relationship between the door and window components and the wall components as an example, firstly, the spatial adjacency relationship between the two is quickly found through spatial indexing methods such as R-tree, and then the graph traversal algorithm is used to determine the topological logic such as connection and inclusion between the door and window and the wall. For the semantic attributes of the component, it can be directly extracted from the IFC file or the attribute database of the BIM software. For example, the material of the wall is "concrete", the thermal insulation performance is "5W / (m·K)", and the space it belongs to is "living room". In the component evaluation rule base, the importance weight coefficients of different types of components can be set, such as the importance weight of load-bearing walls is 8, non-load-bearing walls is 2, and the importance weight of doors and windows is 5. At the same time, the rule base also contains the evaluation conditions of various components. For example, for wall components, their geometric dimensions, material properties, spatial location and other factors will affect their importance. By comprehensively calculating the evaluation indicators of geometry, topology, semantics and other aspects, the initial importance score of each component can be obtained. On this basis, the importance of the component is corrected using the PageRank algorithm. If a component is adjacent to multiple components of high importance, its importance score will also be improved. Finally, the Min-Max normalization formula is used to map the importance score of the component to the interval of 0~1 to achieve the relative quantitative representation of the importance of the component. By associating the evaluation results with the attribute data of the component and storing them, a complete component importance data set can be formed, providing data support for subsequent visualization applications, information query, etc.
[0010] S102: using an octree spatial indexing algorithm to spatially divide the BIM model according to the component importance weights and spatial distribution characteristics to obtain a plurality of sub-areas.
[0011] The geometric information and attribute information of all components in the BIM model are obtained, and the importance weight of each component is calculated according to the preset importance evaluation rules. The BIM model is divided into octree space, and the root node represents the entire model space. Each node is recursively divided into eight child nodes until the number of components contained in the child node is less than the preset threshold. In the octree partitioning process, the child node to which the component belongs is calculated according to the spatial coordinates of the component, and the importance weight of the component is accumulated to the child node. For each leaf node, the DBSCAN clustering algorithm is used to cluster the components in the node, and the clustering features are the geometric information and importance weight of the component. The purpose of clustering is to divide components with similar positions and similar importance weights into the same cluster. For each non-leaf node, it is determined whether the importance weight distribution of the components of its eight child nodes is balanced. If the importance weight distribution of the components of the child node is uneven and the number of components of the node is greater than the preset threshold, the node is further divided. For each cluster, the average importance weight and spatial proximity of the components contained in it are calculated as the characteristic attributes of the cluster. Based on the characteristic attributes of clusters, the decision tree classification algorithm is used to semantically annotate clusters. The categories of semantic annotation include important areas, less important areas, and general areas. The decision tree classifier uses manually annotated BIM model sub-areas as training data. Through the above steps, the regional division results of the BIM model are obtained. Different areas are annotated into different semantic categories according to the importance weights of the components they contain and the spatial distribution characteristics. The regional division results can be used for subsequent BIM model visualization and information retrieval, providing support for the understanding and application of BIM models.
[0012] Specifically, when obtaining the geometric information and attribute information of all components in the BIM model, it can be achieved by parsing the IFC file or calling the API interface of the BIM software. For example, using the API interface of AutodeskRevit, the spatial coordinate information of the component is obtained through the Location attribute of the RevitElement class, and the attribute information of the component, such as length, width, height, material, and floor, is obtained through the Parameter attribute. According to the preset importance evaluation rules, combined with the geometric dimensions, spatial position, material properties and other factors of the component, the weighted summation method is used to calculate the importance weight of each component. For example, for the load-bearing column, its geometric dimension weight is 4, the material strength weight is 4, and the floor weight is 2. The importance weight of the load-bearing column is 8 obtained by weighted summation. When the BIM model is divided into octree space, the entire model space is first used as the root node, and then the center point of the model space is used as the partition point to recursively divide the space into eight child nodes, and the spatial size of each child node is half of the parent node. The termination condition of the recursive division is that the number of components contained in the child node is less than the preset threshold, for example, less than 50 components. During the partitioning process, the spatial coordinates of the component are compared with the spatial boundaries of the child node to determine which child node the component belongs to, and the importance weight of the component is accumulated to the child node. For each leaf node of the octree, the DBSCAN clustering algorithm is used to cluster the components in the node. The clustering features include the geometric information (such as volume, surface area) and importance weight of the component, and the similarity between components is measured by calculating the Euclidean distance between the components. The parameters of the DBSCAN algorithm are set to ε=0, MinPts=5, that is, 0 is used as the radius and 5 components are used as the minimum number to determine the core object of the clustering. The clustering result divides components with similar positions and similar importance weights into the same cluster. For each non-leaf node of the octree, the standard deviation of the importance weights of the components of its eight child nodes is calculated to determine whether the weight distribution of the child nodes is balanced. If the standard deviation is greater than the preset threshold (such as 2) and the number of components of the node is greater than the preset threshold (such as 100), the node is further partitioned and the above octree partitioning and clustering process is repeated. After obtaining the regional division results of the BIM model, the average importance weight and spatial proximity of the components contained in each cluster are calculated. Spatial proximity is measured by calculating the average distance between the geometric center points of the components in the cluster. The smaller the distance, the higher the proximity. The average importance weight and spatial proximity are used as the characteristic attributes of the cluster, and the clusters are semantically annotated using the decision tree classification algorithm. The decision tree classifier uses 100 manually annotated BIM model sub-regions as training data. The characteristic attributes of the sub-regions are the same as those of the clusters. The manually annotated categories include important areas, less important areas, and general areas. The trained decision tree classifier semantically annotates the clusters to obtain the regional semantic information of the BIM model.Finally, the area division results and semantic information are associated with the original BIM model to form BIM model data rich in spatial structure and semantics, providing support for subsequent visualization and information retrieval applications.
[0013] S103: Obtain the user's viewpoint position and sight direction, calculate the visibility of the sub-region, and generate a cropping priority queue in combination with the importance weight of the sub-region.
[0014] Get the user's current viewpoint position and sight direction data. Divide the entire scene into multiple sub-areas based on the viewpoint position and sight direction. The sub-areas can be divided using common spatial division data structures such as octrees and BSP trees. For each sub-area, use the frustum clipping algorithm to determine whether it is within the frustum and calculate its visibility. Frustum clipping can be achieved by determining the positional relationship between the bounding box of the sub-area and the frustum. Establish an importance weight table in advance, which records the importance weight value of each sub-area. The importance weight can be preset based on factors such as the type, number, and area of objects in the sub-area. Traverse each sub-area. If it is visible, query its weight value from the importance weight table as the clipping priority of the sub-area; if it is not visible, set its clipping priority to 0. Sort all sub-areas based on the calculated clipping priority to generate a clipping priority queue. Starting from the sub-area with the highest clipping priority, load the object data in it into memory and render it using a graphics API such as OpenGL or DirectX. After rendering the current sub-area, determine whether there is still available video memory and rendering time budget. If there is, take the next sub-region from the priority queue for rendering; if not, stop rendering. Repeat steps 7 and 8 until all visible high-priority sub-regions are rendered, or the video memory and time budget limits are reached.
[0015] Specifically, when performing visual rendering of BIM models, the user's current viewpoint position and sight direction data are first obtained through the head-mounted VR device. According to the viewpoint position and sight direction, the system uses the octree space partitioning algorithm to divide the entire scene into multiple sub-areas. The octree partitioning granularity can be adjusted according to the complexity of the scene and the performance of the device. Generally, the scene is divided into about 512 sub-areas. For each sub-area, the system uses the cone clipping algorithm to determine whether it is within the cone. The viewing angle of the cone can be set according to the field of view parameters of the VR device, generally 90 degrees in the horizontal direction and 60 degrees in the vertical direction. By judging the positional relationship between the bounding box of the sub-area and the cone, the visibility of the sub-area can be quickly calculated. The system pre-establishes an importance weight table, and assigns weight values according to the parameters such as the component type, quantity, and volume in each sub-area, such as the weight of the pipe is 9, the weight of the wall is 6, and the weight of the furniture is 3. Traverse each sub-area, and for the visible area, query its weight value as the clipping priority; for the invisible area, set its clipping priority to 0. Then, all sub-areas are sorted according to the cropping priority to generate a cropping priority queue. The system starts with the sub-area with the highest cropping priority, loads the component data into the video memory, and uses the DirectX graphics API for rendering. After the rendering is completed, it determines whether the remaining video memory and rendering time meet the requirements. If so, it continues to render the next sub-area until all visible high-priority sub-areas are rendered, or the video memory and time budget limits are reached. Through the above method, the system can adaptively adjust the rendering content and order of the BIM model according to the user's viewpoint position and line of sight direction, while ensuring the visualization effect, minimizing the performance overhead of the device.
[0016] S104: dynamically scheduling cropping tasks according to the cropping priority queue, and re-evaluating the cropping priority if the user viewpoint distance or occlusion relationship changes significantly.
[0017] The depth camera monitors the distance between the user's viewpoint and each object in the virtual scene in real time, as well as the occlusion relationship between the objects, to obtain the user's viewpoint data. Based on the obtained viewpoint data, the system determines whether the viewpoint distance or occlusion relationship has changed significantly. If the change exceeds the preset threshold, the priority re-evaluation mechanism is triggered. In the priority re-evaluation mechanism, the system calculates the priority score of each task based on the relevance of each cropping task to the current user's perspective. The higher the priority score, the greater the relevance of the task to the current perspective. Then all cropping tasks are sorted from high to low according to the priority score and stored in the priority queue. The system management module records the processing status of each cropping task, including task start execution time, completion time, priority score and other information. When the priority queue changes, the priority change record of the corresponding task is updated. The system regularly analyzes the task processing status and priority change records, dynamically optimizes the task scheduling strategy, and improves resource utilization efficiency. The automatic scheduling system sequentially takes out the cropping tasks from the priority queue and assigns them to the idle GPU resources for execution. When a new high-priority task arrives, the currently executed low-priority task is suspended, and the high-priority task is processed first to ensure that the tasks related to the user's perspective are completed in time. The task scheduling process does not require human intervention and is completed automatically by the system, ensuring smooth execution of cutting tasks.
[0018] Specifically, the system uses a TOF depth camera to monitor the distance and occlusion relationship between the user's viewpoint and each object in the virtual scene in real time, and obtains viewpoint data every 50ms. By calculating the change in the distance between the viewpoint and the object and the change ratio of the occlusion relationship, if the distance change exceeds 1m or the occlusion relationship change ratio exceeds 30%, the priority re-evaluation mechanism is triggered. In the re-evaluation mechanism, the system uses the correlation calculation formula S=aD+bO+cV to calculate the priority score of each cropping task, where D represents the distance between the task and the viewpoint, O represents the proportion of the task being occluded, V represents the visibility of the task, and a, b, and c are weight coefficients. The system records the processing status of each cropping task, including task start execution time, completion time, priority score and other information, and uses a hash table to store priority change records. The system analyzes the task processing status and priority change records every 1s, and uses a dynamic programming algorithm to optimize the task scheduling strategy, taking the average waiting time of the task as the optimization target and the resource utilization rate as the constraint condition to solve the optimal scheduling strategy. Based on the optimized scheduling strategy, the automatic scheduling system uses a greedy algorithm to sequentially extract cropping tasks from the priority queue and assign them to idle GPU resources. When the priority score of a new task is higher than the priority score of the currently executing task, the scheduling system will pause the current task and save its status, giving priority to the high-priority task, and resume the original task after the high-priority task is completed, ensuring the timely completion of tasks related to the user's perspective.
[0019] S105 , obtaining a component list of the sub-area to be cropped, and calculating the influence weight of the component on the cropping effect according to the distance between the component and the viewpoint and the occlusion relationship.
[0020] The spatial distance between each component and the viewpoint is obtained through the component list and viewpoint parameters. The components are sorted according to the spatial distance, and the components closer to the viewpoint have higher priority. According to the spatial position and size attributes of the component, the ray tracing algorithm is used to calculate the intersection of the line of sight and the component to determine whether the component is blocked by other components. The occlusion state of the blocked component is marked as "blocked", and the occlusion state of the unblocked component is marked as "visible". According to the occlusion state of the component and the viewpoint distance, the linear weighted method is used to determine the influence weight of each component. The weight of the visible component is assigned according to the inverse of the viewpoint distance, and the closer the distance, the greater the weight; the weight of the blocked component is assigned to 0. The calculated influence weight is associated with the component list to form a weight distribution table. Through the weight distribution table, the simulated annealing algorithm is used to optimize the cropping parameters of the component, including the position and size of the cropping area. The optimized objective function is the weighted average of the component influence weights to improve the cropping quality of the key visual area. The visual saliency of the cropped sub-region is evaluated. By calculating the contrast, color statistical histogram and other features of the sub-region, it is determined whether the visual effect after cropping meets the expectations. If the visual effect evaluation result is lower than the preset threshold, return to the fourth step to re-optimize the cropping parameters until the visual effect meets the requirements. By iteratively optimizing the cropping parameters, the accuracy and visual quality of the cropping effect are continuously improved, and finally the optimized cropping results and key component information are output.
[0021] Specifically, the system obtains the spatial coordinate information of all components in the scene through the depth camera and calculates the Euclidean distance between the geometric center of each component and the viewpoint. For example, a scene contains 100 components, of which the closest component to the viewpoint is 2 meters away and the farthest component is 25 meters away. The system sorts the components in descending order according to the distance and generates a component priority list. Then, the system uses the ray casting algorithm to generate rays with the eight vertices of each component as the starting point and the viewpoint as the end point. The visibility of each component is determined by calculating the intersection of the ray with other components. For example, for a component, if 6 of the 8 rays it generates intersect with other components, the occlusion ratio of the component is 75%, marked as "occluded" state; if none of the 8 rays intersect with other components, the occlusion ratio is 0%, marked as "visible" state. For visible components, the system calculates the weight using the 1 / d method based on the distance d from the viewpoint; for obscured components, the weight value is directly set to 0. Finally, a weight distribution table of component ID, spatial distance, occlusion status, impact weight and other information is generated. The system takes the weight distribution table as input and uses the simulated annealing algorithm to optimize the cropping parameters of each component. During the optimization process, the position and size of the cropping area are randomly selected as the initial solution. Through repeated iterative optimization, the weighted influence weight average of the cropping result is maximized. For example, after 1000 iterative optimizations, a set of optimal cropping parameters is obtained, and the scene is divided into 8 sub-areas. The cropping accuracy of the sub-areas where important components are concentrated reaches 90%, and the cropping accuracy of non-key areas is 60%. The overall weighted average influence weight is increased by 30%. The system visually evaluates the cropping results, extracts the color histogram, gradient histogram and other features of each sub-area, and calculates its similarity with the original scene features. If the similarity is less than 85%, it returns to continue optimization; if the similarity is higher than 85%, it is considered to meet the visual requirements, and the final cropping result data and key component information are output. Through the above process, the system can adaptively adjust the cropping strategy according to the viewpoint position and component distribution to improve rendering efficiency and quality.
[0022] According to the component position, size attributes and viewpoint distance, the ray tracing algorithm is used to determine the occlusion state and obtain the component influence weight. The simulated annealing algorithm is used to optimize the cropping area position and size parameters to obtain the cropping sub-area. Based on the visual contrast, color statistical histogram distribution and other characteristics, it is judged whether the cropping quality meets the expectations.
[0023] The number of particles is 50, the maximum number of iterations is 100, the learning factors c1 and c2 are both 2, the initial value of the inertia weight w is 9, and it decreases by 0.5 each iteration until it decreases to 4. The image features of the cropped sub-region are extracted, including the edge gradient histogram (EGH) and color moments. EGH divides the image into 4x4 grids, calculates the gradient histogram for each grid, and each histogram is divided into 8 directions, and finally obtains a 128-dimensional feature vector. The color moment extracts the first-order moment (mean), second-order moment (variance) and third-order moment (skewness) of the image, 3 for each channel, for a total of 9-dimensional features. The EGH and color moment features are cascaded to obtain a 137-dimensional feature vector. The feature vector is input into the pre-trained support vector machine (SVM) quality assessment model to determine whether the quality of the cropped sub-region meets the expected requirements. The SVM model uses a Gaussian kernel function, and grid search and cross-validation are used to optimize the model parameters, including the penalty coefficient C and the gamma parameter of the Gaussian kernel function. If the cropping quality does not meet the requirements, return to step 4, adjust the position and size parameters of the cropping area, and search for the optimal cropping sub-area again until the quality requirements are met.
[0024] Specifically, during the optimization of the cropped sub-region, the system sets the parameters of the particle swarm algorithm as follows: the number of particles is 50, the maximum number of iterations is 100, the learning factors c1 and c2 are both set to 2, the initial value of the inertia weight w is 9, and it is linearly reduced by 0.5 at each iteration until it is reduced to 4. In order to evaluate the quality of the cropped sub-region, the system extracts two image features: edge gradient histogram (EGH) and color moment (ColorMoments). For the EGH feature, the system divides the sub-region image into 4x4 grids, calculates the gradient histogram in 8 directions for each grid, and generates a 128-dimensional feature vector. For the color moment feature, the system calculates the mean, variance and skewness of each color channel of the sub-region image, a total of 9 statistics. The EGH and color moment features are cascaded to finally obtain a 137-dimensional feature vector as the input of the SVM model. The SVM model uses the Gaussian kernel function, and through grid search and 5-fold cross validation, the optimal model parameters are obtained: the penalty coefficient C=10, and the gamma parameter of the Gaussian kernel function is 0.1. After training, the accuracy of the SVM model on the test set reached 95%. In each iterative optimization, the system inputs the current optimal cropping sub-region into the SVM model for quality assessment. If the quality score is lower than the threshold of 85, it is considered that the current cropping region does not meet the requirements, and the particle swarm algorithm is returned to search for a better cropping region again. If the quality scores of the optimal solution for 5 consecutive iterations are higher than 85, it is considered that the optimal cropping region that meets the visual quality requirements has been found, and its position and size parameters are output. By combining iterative optimization and quality assessment, the system can adaptively find the optimal cropping sub-region that takes into account both rendering efficiency and visual quality.
[0025] S106: For the simplified cropped component, a progressive mesh simplification algorithm is used to adjust the mesh resolution according to the geometric complexity of the component and the cropping accuracy requirements.
[0026] According to the geometric complexity of the component, the CGAL library is used to convert the component into an initial mesh model, and the target mesh resolution is determined according to the preset clipping accuracy requirements as the termination condition for mesh simplification. The Garland-Heckbert edge collapse algorithm is used to simplify the mesh model, collapsing one edge at a time and updating the mesh topology at the same time. During the mesh simplification process, the geometric error before and after simplification is calculated by the quadratic error metric function. If the geometric error exceeds the preset threshold, the current edge is stopped from collapsing, and the next edge with the smallest error is selected to continue collapsing. Repeat the edge collapse and error measurement until the mesh resolution reaches the target value or cannot be collapsed further. Using the functions provided by the CGAL library, the simplified mesh model is converted into a simplified component model to obtain a simplified component with clipping accuracy that meets the requirements.
[0027] Specifically, the system first uses the functions provided by the CGAL library to convert the component to be clipped into an initial mesh model. For example, for a component model containing 1,000 triangular facets, the system sets the clipping accuracy requirement to 90%, and the target mesh resolution is 100 triangular facets. Next, the system uses the Garland-Heckbert edge collapse algorithm to simplify the mesh model. The algorithm selects the edge with the lowest cost to collapse each time, and uses the quadratic error metric function to calculate the geometric error before and after simplification. For example, for an edge to be collapsed, the coordinates of its two endpoints are (0,0,0) and (1,1,1), respectively, and the coordinates of the new point after collapse are (5,5,5), then the geometric error is 25. If the error is less than the preset threshold of 3, the collapse operation is performed and the mesh topology is updated; otherwise, the next edge with the lowest cost is selected to continue the evaluation. Through continuous iteration, the resolution of the mesh model is gradually reduced until it reaches the target value of 100. Finally, the system converts the simplified mesh model into a simplified component, obtaining a simplified model containing 100 triangular facets, with a geometric accuracy loss of no more than 10%, meeting the clipping accuracy requirements. Through the above adaptive mesh simplification process, the system can automatically generate simplified models of different resolutions according to the complexity of the component and the clipping accuracy requirements, significantly improving the rendering efficiency while ensuring the visual quality.
[0028] Although the present invention has been described in detail above by general description and specific embodiments, it is obvious to those skilled in the art that some modifications or improvements can be made to the present invention. Therefore, these modifications or improvements made without departing from the spirit of the present invention all belong to the scope of protection claimed by the present invention.
Claims
1. A BIM model plane clipping analysis method based on Cesium, characterized in that: The method comprises: The geometric features, topological relationships and semantic attributes of the components in the BIM model are obtained, and the component importance weights are calculated according to preset evaluation criteria; the octree spatial indexing algorithm is used to spatially divide the BIM model according to the component importance weights and spatial distribution characteristics to obtain multiple sub-areas; the user's viewpoint position and line of sight direction are obtained, the visibility of the sub-area is calculated, and a clipping priority queue is generated in combination with the sub-area importance weights; the clipping task is dynamically scheduled according to the clipping priority queue, and if the user's viewpoint distance or occlusion relationship changes significantly, the clipping priority is re-evaluated; a list of components in the sub-area to be clipped is obtained, and the influence weight of the component on the clipping effect is calculated according to the distance between the component and the viewpoint and the occlusion relationship; for the simplified clipped components, a progressive mesh simplification algorithm is used to adjust the mesh resolution according to the geometric complexity of the component and the clipping accuracy requirements.
2. The method according to claim 1, characterized in that The obtaining of geometric features, topological relationships and semantic attributes of components in the BIM model, and calculating component importance weights according to preset evaluation criteria, includes: Obtain the geometric features of each component in the BIM model, including information such as the size, position and shape of the component; Obtain the topological relationship between components in the BIM model, and determine the connection, adjacency, and inclusion relationships between components; Obtain the semantic attributes of each component in the BIM model, such as the component's material, purpose, and system; According to the pre-established component evaluation rule base, a comprehensive evaluation is conducted on the geometric features, topological relationships and semantic attributes of each component. The evaluation rule base contains the importance judgment conditions and weight coefficients of various components. According to the comprehensive evaluation results, the initial importance score of each component is calculated. The higher the score, the higher the importance of the component. On the basis of the initial importance score, the score is corrected by the topological relationship between components. If a component has a high topological correlation with other components with high importance, the importance score of the component is also increased accordingly. After correction, the final importance score of the component is obtained. According to the final importance score, the Min-Max normalization method is used to map the importance score of each component to between 0 and 1 to obtain the importance weight coefficient of the component; The calculated component importance weight coefficient is associated with the component's geometric, topological and semantic attribute data and stored to form a complete component importance assessment result data set; Based on the component importance assessment result dataset, it can be further applied to tasks such as BIM model visualization, information query and design optimization, and realize functions such as automatic identification, highlighting and attribute query of important components, providing support for the application and analysis of BIM models.
3. The method according to claim 1, characterized in that The octree spatial indexing algorithm is used to spatially divide the BIM model according to the component importance weights and spatial distribution characteristics to obtain multiple sub-areas, including: Obtain the geometric information and attribute information of all components in the BIM model, and calculate the importance weight of each component according to the preset importance evaluation rules; The BIM model is divided into an octree space, where the root node represents the entire model space and each node is recursively divided into eight child nodes until the number of components contained in the child node is less than a preset threshold. In the octree partitioning process, the sub-node to which the component belongs is calculated according to its spatial coordinates, and the importance weight of the component is accumulated to the sub-node; For each leaf node, the DBSCAN clustering algorithm is used to cluster the components in the node. The clustering features are the geometric information and importance weight of the components. The purpose of clustering is to group components with similar locations and importance weights into the same cluster; For each non-leaf node, determine whether the component importance weight distribution of its eight child nodes is balanced; If the component importance weights of the sub-nodes are unevenly distributed and the number of components of the node is greater than the preset threshold, the node is further divided; For each cluster, the average importance weight and spatial proximity of the components it contains are calculated as the characteristic attributes of the cluster; Based on the characteristic attributes of clusters, a decision tree classification algorithm is used to semantically annotate clusters. The categories of semantic annotation include important areas, less important areas and general areas. The decision tree classifier uses manually annotated BIM model sub-areas as training data; Through the above steps, the regional division results of the BIM model are obtained. Different regions are marked as different semantic categories according to the importance weights and spatial distribution characteristics of the components they contain; The area division results can be used for subsequent BIM model visualization and information retrieval, providing support for the understanding and application of BIM models.
4. The method according to claim 1, characterized in that: The obtaining of the user's viewpoint position and the sight direction, calculating the visibility of the sub-region, and generating a clipping priority queue in combination with the importance weight of the sub-region include: Get the user's current viewpoint position and sight direction data; The entire scene is divided into multiple sub-areas according to the viewpoint position and line of sight direction; The sub-regions can be divided into common space partitioning data structures such as octree and BSP tree; For each sub-area, use the frustum clipping algorithm to determine whether it is within the frustum and calculate its visibility; View frustum clipping can be achieved by determining the positional relationship between the bounding box of the sub-region and the view frustum; An importance weight table is established in advance, which records the importance weight value of each sub-area; Importance weights can be preset based on factors such as the type, number, and area of objects in the sub-area; Traverse each sub-region, if it is visible, query its weight value from the importance weight table as the clipping priority of the sub-region; If it is not visible, set its clipping priority to 0; According to the calculated clipping priority, all sub-areas are sorted to generate a clipping priority queue; Starting from the sub-region with the highest clipping priority, load the object data in it into memory and render it using a graphics API such as OpenGL or DirectX; After rendering the current sub-region, determine whether there is still available video memory and rendering time budget; If so, take the next sub-region from the priority queue for rendering; If not, stop rendering; Repeat steps 7 and 8 until all visible high-priority sub-regions are rendered, or until the limits of video memory and time budget are reached.
5. The method according to claim 1, characterized in that The dynamically scheduling the cropping task according to the cropping priority queue, and re-evaluating the cropping priority if the user viewpoint distance or the occlusion relationship changes significantly, includes: The depth camera is used to monitor in real time the distance between the user's viewpoint and each object in the virtual scene, as well as the occlusion relationship between the objects, to obtain the user's viewpoint data; Based on the acquired viewpoint data, the system determines whether the viewpoint distance or occlusion relationship has changed significantly. If the change exceeds the preset threshold, the priority re-evaluation mechanism is triggered; In the priority re-evaluation mechanism, the system calculates the priority score of each task based on the relevance of each cropping task to the current user perspective; The higher the priority score, the more relevant the task is to the current perspective; Then all the cutting tasks are sorted from high to low according to the priority scores and stored in the priority queue; The system management module records the processing status of each cutting task, including information such as the task start execution time, completion time, and priority score; When the priority queue changes, update the priority change record of the corresponding task; The system regularly analyzes task processing status and priority change records, dynamically optimizes task scheduling strategies, and improves resource utilization efficiency; The automatic scheduling system takes out the cropping tasks from the priority queue in order and assigns them to the idle GPU resources for execution; When a new high-priority task arrives, the currently executing low-priority task is suspended and the high-priority task is processed first to ensure that tasks related to the user's perspective are completed in a timely manner; The task scheduling process does not require human intervention and is completed automatically by the system, ensuring smooth execution of cutting tasks.
6. The method according to claim 1, characterized in that The step of obtaining a list of components in the sub-area to be cropped, and calculating the influence weight of the components on the cropping effect according to the distance between the components and the viewpoint and the occlusion relationship, comprises: Obtain the spatial distance between each component and the viewpoint through the component list and viewpoint parameters; Components are sorted according to spatial distance, and the components closer to the viewpoint have higher priority; According to the spatial position and size attributes of the component, the ray tracing algorithm is used to calculate the intersection of the line of sight and the component to determine whether the component is blocked by other components; The occlusion state of the obstructed component is marked as "Occluded", and the occlusion state of the unobstructed component is marked as "Visible"; According to the occlusion status and viewpoint distance of the component, a linear weighted method is used to determine the influence weight of each component; The weight of the visible component is assigned according to the inverse of the viewpoint distance, and the closer the distance, the greater the weight; The weight of the obscured component is assigned a value of 0; Associating the calculated influence weights with the component list to form a weight distribution table; Through the weight distribution table, the simulated annealing algorithm is used to optimize the cutting parameters of the component, including the position and size of the cutting area; The optimized objective function is the weighted average of the component influence weights to improve the cropping quality of the visual key area; Perform visual saliency evaluation on the cropped sub-regions, and determine whether the visual effect after cropping meets expectations by calculating features such as the contrast and color statistical histogram of the sub-regions; If the visual effect evaluation result is lower than the preset threshold, return to step 4 to re-optimize the cropping parameters until the visual effect meets the requirements; By iteratively optimizing the cropping parameters, the accuracy and visual quality of the cropping effect are continuously improved, and finally the optimized cropping results and key component information are output; it also includes: according to the component position, size attributes and viewpoint distance, a ray tracing algorithm is used to determine the occlusion state, obtain the component influence weight, and optimize the cropping area position and size parameters through a simulated annealing algorithm to obtain the cropping sub-area, and judge whether the cropping quality meets expectations based on visual contrast, color statistical histogram distribution and other characteristics.
7. The method according to claim 6, characterized in that The method uses a ray tracing algorithm to determine the occlusion state according to the component position, size attributes and viewpoint distance, obtains the component influence weight, optimizes the position and size parameters of the cropping area through a simulated annealing algorithm, obtains the cropping sub-area, and determines whether the cropping quality meets expectations according to features such as visual contrast and color statistical histogram distribution, including: The number of particles is 50, the maximum number of iterations is 100, the learning factors c1 and c2 are both 2, the initial value of the inertia weight w is 9, and it is reduced by 0.5 each iteration until it is reduced to 4; the image features of the cropped sub-region are extracted, including the edge gradient histogram (EGH) and color moment (ColorMoments); EGH divides the image into 4x4 grids, calculates the gradient histogram for each grid, each histogram is divided into 8 directions, and finally obtains a 128-dimensional feature vector; the color moment extracts the first-order moment (mean), second-order moment (variance) and third-order moment (skewness) of the image, and each pass The EGH and color moment features are concatenated to obtain a 137-dimensional feature vector. The feature vector is input into a pre-trained support vector machine (SVM) quality assessment model to determine whether the quality of the cropped sub-region meets the expected requirements. The SVM model uses a Gaussian kernel function, and uses grid search and cross-validation to optimize the model parameters, including the penalty coefficient C and the gamma parameter of the Gaussian kernel function. If the cropping quality does not meet the requirements, return to step 4, adjust the position and size parameters of the cropped area, and search for the optimal cropped sub-region again until the quality requirements are met.
8. The method according to claim 1, characterized in that The component for simplified cutting adopts a progressive mesh simplification algorithm, and adjusts the mesh resolution according to the geometric complexity of the component and the cutting accuracy requirements, including: According to the geometric complexity of the component, the CGAL library is used to convert the component into an initial mesh model, and the target mesh resolution is determined according to the preset clipping accuracy requirements as the termination condition for mesh simplification; The Garland-Heckbert edge collapse algorithm is used to simplify the grid model, collapsing one edge at a time and updating the grid topology structure at the same time; During the mesh simplification process, the geometric error before and after simplification is calculated by the quadratic error metric function. If the geometric error exceeds the preset threshold, the current edge is stopped from collapsing, and the next edge with the smallest error is selected to continue collapsing. Repeat edge collapse and error measurement until the mesh resolution reaches the target value or cannot be collapsed further; By using the functions provided by the CGAL library, the simplified mesh model is converted into a simplified component model, and a simplified component with cutting accuracy that meets the requirements is obtained.
Citation Information
Cited By
Intelligent camera scheduling algorithm and system based on unmanned aerial vehicle trajectory prediction
CN120388120A
Intelligent camera scheduling method and system based on UAV trajectory prediction
CN120388120B
Automatic rendering method and system of building block model, medium and product
CN120672924A
An automated rendering method, system, medium and product for a building block model
CN120672924B
CAD modeling-oriented grid adaptive subdivision method and real-time preview method
CN120995800A