Method and device for identifying cylinder model parameters of digital building model

By identifying the cylindrical model in the digital building model, calculating its tight enclosure box and building a reference cylindrical model, the problem of difficult to identify and simplify the cylindrical model in the prior art is solved, efficient identification and parameter calculation of the model are realized, and data volume and calculation pressure are reduced.

CN120020787APending Publication Date: 2025-05-20GLODON CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311540205.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-17
Publication Date
2025-05-20

AI Technical Summary

Technical Problem

The prior art is difficult to effectively identify and simplify cylindrical models in digital building models, resulting in high pressure on computer drawing, transmission and browsing.

Method used

By receiving the grid model to be identified in the digital building model, calculating its tight enclosure box, and building a cylindrical model based on the parameter information of the tight enclosure box, determining whether the panel unit of the grid model to be identified is on the reference cylindrical model. If the preset conditions are met, it is determined as a cylindrical model and its parameters are calculated.

Benefits of technology

The accurate identification and parameter calculation of cylindrical models in digital building models is realized, reducing the number of patches of the model, thereby reducing the amount of data and improving the calculation efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120020787A_ABST
    Figure CN120020787A_ABST
Patent Text Reader

Abstract

The invention provides an identification method and device for cylinder model parameters of a digital building model, computer equipment and a medium. The method comprises the steps that a to-be-recognized grid model in a digital building model is received, and the to-be-recognized grid model comprises a plurality of surface patch units; calculating a tight bounding box of the to-be-identified grid model; constructing a cylinder model according to the parameter information of the tight bounding box to obtain a reference cylinder model; judging whether the surface patch unit of the to-be-identified grid model is on the reference cylinder model or not; and when the patch unit of the to-be-identified grid model on the reference cylinder model meets a preset condition, determining the to-be-identified grid model as a cylinder model, and determining parameters of the to-be-identified grid model according to the parameters of the reference cylinder model. According to the invention, the grid cylinder model in the digital building model can be identified, the identification accuracy of the digital building model is improved, and the method is more friendly to users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing for digital building models in the construction field, and particularly to a method, device, computer device and medium for identifying cylindrical model parameters of a digital building model. Background Art

[0002] A Building Information Modeling (BIM) stores a lot of information. For example, a building information model can be regarded as a parametric 3D geometric model of a building. In addition, in this model, the information contained in all building components, in addition to geometric information, also includes spatial relationship information, regional information, building component quantity and characteristic information, budget cost information, material inventory and project schedule information, etc., which are used to display the entire life cycle of a building. By using a building information model, the quantity and common characteristics of materials can be known in real time, the project scope can be easily distinguished and defined, the systems, components and processes of the overall facility or facility group can be displayed in relative proportion, and various construction industry documents can be integrated, including drawings, procurement details, application procedures and other specifications.

[0003] In addition to building models in urban scenes, there are also a large number of intricate urban pipe networks composed of pipes, such as fire protection, water supply and drainage, heating and ventilation pipes, chemical plant pipe gallery pipes, etc., and most of these pipes are in the shape of long straight cylinders.

[0004] The inventor's research found that cylindrical models such as long straight cylindrical pipes are usually composed of many patch units, and the data volume is very large, which causes huge pressure on the computer's rendering, transmission and browsing. Therefore, how to simplify the model to reduce the data volume has become a major problem in the prior art. In this regard, the inventor further found that if the cylindrical model can be identified and then the model-related parameters can be calculated, the model can be simplified, and the purpose of maintaining the characteristics of the original cylindrical model can be achieved with fewer patches, that is, the model data volume can be reduced by reducing the patch units of the cylindrical model. Therefore, the identification of the cylindrical model has become the primary step in the simplification of the cylindrical model.

[0005] Therefore, how to identify the cylindrical model in the BIM model has become a technical problem that needs to be solved urgently in this field. Summary of the Invention

[0006] The purpose of the present invention is to provide a method, device, computer device and medium for identifying cylindrical model parameters of a digital building model to solve the above technical problems in the prior art.

[0007] On the one hand, to achieve the above purpose, the present invention provides a method for identifying cylindrical model parameters of a digital building model.

[0008] The method for identifying the parameters of a cylindrical model for a digital building model includes: receiving a grid model to be identified in the digital building model, where the grid model to be identified includes a plurality of patch units; calculating the tight bounding box of the grid model to be identified; constructing a cylindrical model according to the parameter information of the tight bounding box to obtain a reference cylindrical model; determining whether the patch units of the grid model to be identified are on the reference cylindrical model; and when the patch units of the grid model to be identified on the reference cylindrical model meet a preset condition, determining that the grid model to be identified is a cylindrical model, and determining the parameters of the grid model to be identified according to the parameters of the reference cylindrical model.

[0009] Further, before the step of constructing a cylindrical model according to the parameter information, the identification method further includes: determining the shortest side length and the second shortest side length of the tight bounding box; when the relationship between the shortest side length and the second shortest side length does not meet a preset relationship, determining that the grid model to be identified does not belong to a cylindrical model, where when the relationship between the shortest side length and the second shortest side length meets the preset relationship, the step of constructing a cylindrical model according to the parameter information is executed.

[0010] Further, before the step of constructing a cylindrical model according to the parameter information, the identification method further includes: determining the shortest side length and the second shortest side length of the tight bounding box; performing orthogonal projections on the grid model to be identified along the directions of the shortest side length and the second shortest side length respectively; when the number of projection contour lines of the grid model to be identified along the shortest side length direction and / or the second shortest side length direction is greater than 1, determining that the grid model to be identified does not belong to a cylindrical model, where when the number of projection contour lines of the grid model to be identified along the shortest side length direction and the second shortest side length direction is both 1, the step of constructing a cylindrical model according to the parameter information is executed.

[0011] Further, the step of constructing a cylindrical model according to the parameter information to obtain a reference cylindrical model includes: determining the minimum point, maximum point, first side length, second side length, and third side length of the tight bounding box, where the first side length is greater than the second side length, and the second side length is greater than the third side length; calculating the center and the direction vector of the central axis of the reference cylindrical model according to the minimum point and the maximum point; calculating the radius of the reference cylindrical model according to the second side length and the third side length; and calculating the length of the central axis according to the first side length.

[0012] Further, the steps of constructing a cylindrical model according to the parameter information to obtain a reference cylindrical model further include: taking the center of the reference cylindrical model as the origin, taking the direction vector of the central axis as the Z-axis, and establishing a first local coordinate system; transforming the vertices of each patch unit of the mesh model to be recognized into the first local coordinate system; in the first local coordinate system, extracting the vertices of the patch units located on the bottom surface of the reference cylindrical model to obtain a bottom vertex set, and extracting the vertices of the patch units located on the top surface of the reference cylindrical model to obtain a top vertex set; calculating the bottom center of the reference cylindrical model according to the bottom vertex set, and calculating the top center of the reference cylindrical model according to the top vertex set; calculating the direction vector of the corrected central axis of the reference cylindrical model according to the bottom center and the top center.

[0013] Further, before the step of judging whether the patch unit of the mesh model to be recognized is on the reference cylindrical model, the recognition method further includes: calculating the distances from the points in the bottom vertex set and the top vertex set to the corrected central axis; clustering the points in the bottom vertex set and the top vertex set according to the distances; when the number of valid classes obtained after clustering is not 1 or 2, determining that the mesh model to be recognized does not belong to the cylindrical model, wherein when the number of valid classes obtained after clustering is 1 or 2, execute the step of judging whether the patch unit of the mesh model to be recognized is on the reference cylindrical model.

[0014] Further, the steps of constructing a cylindrical model according to the parameter information to obtain a reference cylindrical model further include: when the number of valid classes obtained after clustering is 1, taking the distance corresponding to the valid class as the corrected radius of the reference cylindrical model; when the number of valid classes obtained after clustering is 2, taking the distances corresponding to the two valid classes as the corrected outer radius and inner radius of the reference cylindrical model respectively.

[0015] Further, the step of judging whether the patch unit of the mesh model to be recognized is on the reference cylindrical model includes: calculating the normal vector and the centroid of the patch unit; calculating the maximum distance among the distances from the centroid and each vertex of the patch unit to the reference cylindrical model respectively; judging whether the normal vector is perpendicular to the direction vector of the corrected central axis; judging whether the difference between the maximum distance and 0 is within a preset distance tolerance; wherein when the normal vector is perpendicular to the direction vector of the corrected central axis and the difference between the maximum distance and 0 is within the preset distance tolerance, the patch unit is on the reference cylindrical model.

[0016] Further, before the step of determining whether the patch unit of the mesh model to be recognized is on the reference cylinder model, the recognition method further includes: calculating the volume difference between the tight bounding box and the reference cylinder model; when the volume difference is greater than a preset volume tolerance, determining that the mesh model to be recognized does not belong to the cylinder model, wherein when the volume difference is less than or equal to the preset volume tolerance, execute the step of determining whether the patch unit of the mesh model to be recognized is on the reference cylinder model.

[0017] Further, when the patch units of the mesh model to be recognized on the reference cylinder model meet the preset conditions, the step of determining that the mesh model to be recognized is a cylinder model includes: calculating the areas of all the patch units of the mesh model to be recognized on the reference cylinder model to obtain the sum of areas; calculating the surface area of the reference cylinder model; determining whether the difference between the sum of areas and the surface area is less than a preset difference threshold; when the difference between the sum of areas and the surface area is less than the preset difference threshold, determining that the mesh model to be recognized is a cylinder model.

[0018] Further, the step of calculating the tight bounding box of the mesh model to be recognized includes: extracting the vertex set {v 1 , v 2 , … v n} of each patch unit of the mesh model to be recognized, where v i = (x i , y i , z i ); calculating the vertex centroid g = ∑ 1 v 2 , … v n / n according to the vertex set {v i v i}; let

[0019]

[0020] where M i represents the covariance matrix of the v i coordinates v i v i T , let ∑ i=1,2,Ωn M i d = λd, solve for the unit eigenvectors d 1 , d 2 , d 3 ; establish the second local coordinate system O′X′Y′Z′ as: O′ = g, X′ = d 1 , Y′ = d 2 and Z′ = d 3, where O′ is the origin of the second local coordinate system, and X′Y′Z′ are the axes of the second local coordinate system; transforming the vertex set {v 1 , v 2 , … v n} into the second local coordinate system to obtain the transformed vertex set {v 1 ′, v 2 ′, … v n ′}, where v i ′ = (x i ′, y i ′, z i ′); calculating the minimum and maximum values of each vertex in the transformed vertex set {v 1 ′, v 2 ′, … v n ′} to obtain the minimum point P min = (x min , y min , z min ) and the maximum point P max = (x max , y max , z max ) of the tight bounding box in the second local coordinate system; calculating the three side lengths of the tight bounding box respectively as: l x = x max - x min , l y = y max - y min , l z = z max - z min .

[0021] On the other hand, to achieve the above object, the present invention provides an identification device for cylinder model parameters of a digital building model.

[0022] The identification device for cylinder model parameters of a digital building model includes: a receiving module for receiving a mesh model to be identified in a digital building model, where the mesh model to be identified includes a plurality of patch units; a calculation module for calculating the tight bounding box of the mesh model to be identified; a construction module for constructing a cylinder model according to the parameter information of the tight bounding box to obtain a reference cylinder model; a judgment module for judging whether the patch units of the mesh model to be identified are on the reference cylinder model; and a determination module for determining that the mesh model to be identified is a cylinder model when the patch units of the mesh model to be identified on the reference cylinder model meet a preset condition, and determining the parameters of the mesh model to be identified according to the parameters of the reference cylinder model.

[0023] To achieve the above object, the present invention further provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the steps of the above method are implemented.

[0024] To achieve the above object, the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above method are implemented.

[0025] The method, device, computer device, and medium for identifying cylinder model parameters of a digital building model provided by the present invention identify a three-dimensional mesh model including multiple patch units in the digital building model. After receiving the mesh model to be identified, its tight bounding box is calculated, and then a cylinder model is constructed according to the parameter information of the tight bounding box to obtain a reference cylinder model. It is judged whether each patch unit of the mesh model to be identified is on the reference cylinder model, and the patch units on the reference cylinder model are counted. When the patch units of the mesh model to be identified on the reference cylinder model are sufficient, it indicates that the degree of fit between the mesh model to be identified and the reference cylinder model is relatively high. Therefore, it is determined that the mesh model to be identified is a cylinder model, and the parameters of the mesh model to be identified are determined according to the parameters of the reference cylinder model, and the identification of the mesh model to be identified is completed. Through the present invention, a method for identifying whether a three-dimensional mesh model is a cylinder model is proposed. After the mesh model is identified, it is beneficial to simplify it. At the same time, compared with identifying a three-dimensional point cloud model, the accuracy of identification is higher. In addition, the initial cylinder parameters are obtained using the tight bounding box of the mesh model to be identified, and then the parameters of the mesh model to be identified can be calculated, without the need for users to manually set identification parameters, which is more user-friendly. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] By reading the detailed description of the preferred embodiments below, various other advantages and benefits will become clear to those of ordinary skill in the art. The drawings are only for the purpose of showing the preferred embodiments and are not considered to be a limitation of the present invention. Moreover, throughout the drawings, the same reference numerals are used to represent the same components. In the drawings:

[0027] Figure 1 is a flowchart of the method for identifying cylinder model parameters of a digital building model provided in Embodiment 1 of the present invention;

[0028] Figure 2 is a flowchart of the method for identifying cylinder model parameters of a digital building model provided in Embodiment 2 of the present invention;

[0029] Figure 3 is a block diagram of the device for identifying cylinder model parameters of a digital building model provided in Embodiment 3 of the present invention;

[0030] Figure 4 This is the hardware structure diagram of the computer device provided in the fourth embodiment of the present invention. Specific implementation manners

[0031] In order to make the objectives, technical solutions and advantages of the present invention clearer and more understandable, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts belong to the scope of protection of the present invention.

[0032] Embodiment 1

[0033] Embodiment 1 of the present invention provides a method for identifying cylinder model parameters for a digital building model. Through this method, it is possible to determine whether a three-dimensional mesh model in the digital building model is a cylinder model, and when the mesh model is a cylinder model, identify the model parameters. Specifically, Figure 1 This is the flowchart of the method for identifying cylinder model parameters for a digital building model provided in Embodiment 1 of the present invention. As Figure 1 shown, the method for identifying cylinder model parameters for a digital building model provided in this embodiment includes the following steps S101 to S105.

[0034] Step S101: Receive the mesh model to be identified in the digital building model.

[0035] Among them, as a new media form, three-dimensional models have gradually started to enter people's production and life, and their applications in virtual reality, animation games, battlefield environment simulation, architectural design, etc. are becoming more and more extensive. The mesh model to be identified in this embodiment can be any three-dimensional mesh model in the digital building model. For example, it can be the three-dimensional mesh model of pipelines such as fire protection, water supply and drainage, heating ventilation, and chemical plant pipe corridors, or the three-dimensional mesh model in other scenarios. This mesh model is encoded for the geometry of a three-dimensional object according to the combination of vertices, edges, and faces, and usually uses faces in the shape of polygons (such as triangles or quadrilaterals), that is, patch units to represent the surface of the three-dimensional object. The mesh model to be identified includes multiple patch units.

[0036] Step S102: Calculate the tight bounding box of the mesh model to be identified.

[0037] Among them, the tight bounding box of a three-dimensional model refers to the smallest cuboid that encloses the model.

[0038] Optionally, in this step S102, the following steps can be used to calculate the tight bounding box of the mesh model to be identified:

[0039] Extract the vertices of each patch unit of the mesh model to be recognized. A total of n vertices are extracted, forming a vertex set {v 1 , v 2 , … v n}, where v i = (x i , y i , z i );

[0040] Calculate the centroid of the vertices g = ∑ 1 v 2 , … v n} / n; i v i / n;

[0041] Let

[0042]

[0043] where M i represents the covariance matrix of the coordinates of v i v i v i T , let ∑ i=1,2,…n M i d = λd, and solve for the unit eigenvector d 1 , d 2 , d 3 ;

[0044] Establish the second local coordinate system O′X′Y′Z′ as: O′ = g, X′ = d 1 , Y′ = d 2 and Z′ = d 3 , where O′ is the origin of the second local coordinate system, and X′Y′Z′ are the axes of the second local coordinate system;

[0045] Transform the vertex set {v 1 , v 2 , … v n} to the second local coordinate system, obtaining the transformed vertex set {v 1 ′, v 2 ′, \v n ′}, where v i ′ = (x i ′, y i ′, z i ′);

[0046] Calculate the transformed vertex set {v 1 ′, v 2 ′, … v nThe minimum and maximum values of each vertex in ′} are obtained, and the minimum point of the tightly enclosed bounding box in the second local coordinate system is P min =(x min ,y min ,z min ), and the maximum point is P max =(x max ,y max ,z max );

[0047] Calculate the three side lengths of the tightly enclosed bounding box respectively as: l x =x max -x min , l y =y max -y min , l z =z max -z min .

[0048] Optionally, in this step S102, a coordinate system can also be established with the normal of each patch unit in the to-be-recognized mesh model as the axis, multiple axis-aligned bounding boxes are calculated, and the smallest one among them is selected as the tightly enclosed bounding box.

[0049] Step S103: Construct a cylinder model based on the parameter information of the tightly enclosed bounding box to obtain a reference cylinder model.

[0050] The tightly enclosed bounding box is a cuboid, and its parameter information includes the minimum point, the maximum point, and the three side lengths. Use the longest side in the tightly enclosed bounding box to construct the axis length and direction vector of the central axis of the cylinder model, the minimum and / or the second smallest side length to construct the radius of the cylinder model, and the minimum point and the maximum point to construct the center of the cylinder model to complete the construction of a cylinder model, and define the constructed cylinder model as the reference cylinder model.

[0051] Optionally, in this step S103, the following steps can be used to construct a cylinder model based on the parameter information to obtain a reference cylinder model:

[0052] Determine the minimum point, the maximum point, the first side length, the second side length, and the third side length of the tightly enclosed bounding box, where the first side length is greater than the second side length, and the second side length is greater than the third side length. For example, by the method of calculating the tightly enclosed bounding box of the to-be-recognized mesh model above, the minimum point of the tightly enclosed bounding box is P min =(x min ,y min ,z min ), the maximum point is P max =(x max ,y max ,z max ), and the three side lengths are l x , ly and l z , let l x > l y > l z .

[0053] Calculate the center and the direction vector of the central axis of the reference cylinder model based on the minimum point and the maximum point. Specifically, the calculation formula for the center C of the cylinder model is:

[0054]

[0055] The direction vector n of the central axis is:

[0056] n = P max - P min

[0057] Calculate the radius R of the reference cylinder model according to the second side length and the third side length as:

[0058]

[0059] Calculate the length l of the central axis according to the first side length as:

[0060] l = l x

[0061] Step S104: Determine whether the patch element of the mesh model to be recognized is on the reference cylinder model.

[0062] For each patch element of the mesh model to be recognized, perform this step S104 respectively to judge the patch element of the mesh model to be recognized. Optionally, when the normal vector of the patch element is close to being perpendicular to the direction vector of the central axis of the cylinder model and the maximum distance from each vertex and the centroid of the patch element to the cylinder model is close to 0, it can be determined that the patch element is on the reference cylinder model.

[0063] Step S105: When the patch elements of the mesh model to be recognized on the reference cylinder model meet the preset conditions, determine that the mesh model to be recognized is a cylinder model, and determine the parameters of the mesh model to be recognized according to the parameters of the reference cylinder model.

[0064] Through the above step S104, after judging each patch unit, the number of patch units of the mesh model to be recognized on the reference cylindrical model can be counted. Combining the area of each patch unit, the total area of the patch units of the mesh model to be recognized on the reference cylindrical model can be obtained. The closer this total area is to the surface area of the reference cylindrical model, the higher the coincidence degree between the mesh model to be recognized and the reference cylindrical model, and the higher the probability that the mesh model to be recognized is a cylindrical model. For example, if the ratio of the total area of the patch units of the mesh model to be recognized on the reference cylindrical model to the surface area of the reference cylindrical model is too low, it can be determined that the mesh model to be recognized does not belong to a cylindrical model, which can prevent a square object from being recognized as a cylindrical model.

[0065] On this basis, optionally, in step S105, when judging whether the number of patch units of the mesh model to be recognized on the reference cylindrical model meets a preset condition to determine whether the mesh model to be recognized is a cylindrical model, the following steps can be specifically executed: calculate the area of all patch units of the mesh model to be recognized on the reference cylindrical model to obtain the sum of areas; calculate the surface area of the reference cylindrical model; judge whether the difference between the sum of areas and the surface area is less than a preset difference threshold. Here, in the equivalent embodiment, it can also be to judge whether the ratio of the sum of areas to the surface area is close to 1; when the difference between the sum of areas and the surface area is less than the preset difference threshold, determine that the mesh model to be recognized is a cylindrical model.

[0066] After determining that the mesh model to be recognized is a cylindrical model, the parameters of the mesh model to be recognized can be obtained from the parameters of the reference cylindrical model to complete the recognition of the mesh model to be recognized. For example, directly use the parameters of the reference cylindrical model as the parameters of the mesh model to be recognized, or correct the parameters of the reference cylindrical model according to the data of the mesh model to be recognized and directly use them as the parameters of the mesh model to be recognized.

[0067] In the conventional recognition method of a three-dimensional cylindrical model, the point cloud three-dimensional model is recognized. A point cloud is a set of data points in three-dimensional space, and these data points can be used to describe the geometric shape of a single object or the entire scene. Each point in the point cloud is defined by X, Y, and Z coordinates, and these coordinates represent the physical position of the point in three-dimensional space. Since the uniformity of the point cloud distribution, the number of points, and the noise points will all affect the accuracy of recognizing the cylindrical model, the accuracy of the recognition method for the three-dimensional model of the point cloud three-dimensional model is unstable. In addition, the three-dimensional cylindrical model recognition method in the prior art needs to set recognition parameters during use, and the default parameters do not have universality. The optimal parameters for different models may vary greatly. How to set appropriate parameters for each model requires a deep understanding of the data characteristics and the method itself, which is very difficult for ordinary users and will also affect the recognition accuracy.

[0068] In the method for identifying the cylindrical model parameters of a digital building model provided in this embodiment, a three-dimensional mesh model including multiple patch units is identified. After receiving the mesh model to be identified, its tight bounding box is calculated, and then a cylindrical model is constructed based on the parameter information of the tight bounding box to obtain a reference cylindrical model. It is determined whether each patch unit of the mesh model to be identified is on the reference cylindrical model, and the patch units on the reference cylindrical model are counted. When there are enough patch units of the mesh model to be identified on the reference cylindrical model, it indicates that the degree of fit between the mesh model to be identified and the reference cylindrical model is relatively high. Therefore, it is determined that the mesh model to be identified is a cylindrical model, and the parameters of the mesh model to be identified are determined according to the parameters of the reference cylindrical model, completing the identification of the mesh model to be identified. By using the method for identifying the cylindrical model parameters of a digital building model provided in this embodiment, a method for identifying whether a three-dimensional mesh model is a cylindrical model is proposed. After the mesh model is identified, it is beneficial to simplify it. At the same time, compared with identifying a three-dimensional point cloud model, the accuracy of identification is higher. In addition, the initial cylindrical parameters are obtained using the tight bounding box of the mesh model to be identified, and then the parameters of the mesh model to be identified can be calculated, without the need for users to manually set the identification parameters, which is more user-friendly.

[0069] Optionally, in one embodiment, before the step of constructing a cylindrical model according to the parameter information, the method for identifying the cylindrical model parameters of a digital building model further includes: determining the shortest side length and the second shortest side length of the tight bounding box; when the relationship between the shortest side length and the second shortest side length does not satisfy a preset relationship, it is determined that the mesh model to be identified does not belong to a cylindrical model, where when the relationship between the shortest side length and the second shortest side length satisfies the preset relationship, the step of constructing a cylindrical model according to the parameter information is executed.

[0070] Specifically, the tight bounding box of the cylindrical model has the following characteristics: the longest side in the tight bounding box is the direction of the central axis of the cylinder, and the lengths of the second shortest side and the shortest side of the tight bounding box are both the radius of the cylinder and are approximately equal. Therefore, when the shortest side length and the second shortest side length of the tight bounding box do not satisfy the approximately equal relationship, that is, when the difference between the shortest side length and the second shortest side length does not satisfy being approximately 0 or the ratio does not satisfy being approximately 1, it can be determined that the mesh model to be identified does not belong to a cylindrical model. For example, let the three side lengths l x , l y , l z have the size relationship of l x >l y >l z , then when the shortest side length and the second shortest side length do not satisfy the following formula:

[0071]

[0072] where, ε lThe tolerance of the length ratio can be set to 0.1, and it can be determined that the grid model to be recognized is not a cylindrical model, and the recognition process is exited. Thus, grid models that are definitely not cylinders can be filtered out. Only when the relationship between the shortest side length and the second shortest side length satisfies a preset relationship of being approximately equal, the step of constructing a cylindrical model based on the parameter information is executed, reducing the redundant processing steps for non-cylindrical models and improving the execution efficiency of the recognition method.

[0073] Optionally, in one embodiment, before the step of constructing a cylindrical model based on the parameter information, the recognition method for the cylindrical model parameters of the digital building model further includes: determining the shortest side length and the second shortest side length of the tight bounding box; performing orthogonal projections on the grid model to be recognized along the directions of the shortest side length and the second shortest side length respectively; when the number of projection contour lines of the grid model to be recognized along the shortest side length direction and / or the second shortest side length direction is greater than 1, determining that the grid model to be recognized does not belong to a cylindrical model, wherein when the number of projection contour lines of the grid model to be recognized along the shortest side length direction and the second shortest side length direction is 1, the step of constructing a cylindrical model based on the parameter information is executed.

[0074] Specifically, the cylindrical model in this embodiment refers to a single, connected cylinder, so the situation where the model is disconnected into multiple non-connected segments needs to be excluded. When judging whether the grid model to be recognized is disconnected, first determine two projection directions according to the tight bounding box, that is, the directions of the shortest side length and the second shortest side length of the tight bounding box, and perform orthogonal projections on the grid model to be recognized in these two directions respectively. The contour lines of the grid model to be recognized are obtained through the projection contour line calculation method. The contour line is composed of a series of ordered vertices connected in a loop in sequence and can represent the boundary between the model and the background. If the number of projection contour lines obtained along these two directions is 1, it means that the grid model to be recognized is a connected whole, otherwise it means that the model is disconnected into multiple non-connected objects, and the judgment process is exited. Compared with the prior art method for recognizing point cloud models, since the recognition of point cloud models is only based on discrete points and completely loses the topological connection relationship in the model, it is very easy to have misrecognition phenomena. However, by using the recognition method for the cylindrical model parameters of the digital building model provided in this embodiment, the topological information in the original grid model to be recognized is used to improve the recognition accuracy. By judging the number of projection contour lines whether the original model is a connected model, the disconnected model is prevented from being misrecognized as a cylindrical model, and the recognition accuracy is improved.

[0075] Optionally, in one embodiment, it can be determined whether the grid model to be recognized is a connected model by calculating the number of connected components of the patch units of the grid model to be recognized.

[0076] Optionally, in one embodiment, the step of constructing a cylinder model based on the parameter information to obtain a reference cylinder model further includes: taking the center of the reference cylinder model as the origin, taking the direction vector of the central axis as the Z-axis, and establishing a first local coordinate system; transforming the vertices of each patch unit of the mesh model to be recognized into the first local coordinate system; in the first local coordinate system, extracting the vertices of the patch units located on the bottom surface of the reference cylinder model to obtain a bottom vertex set, and extracting the vertices of the patch units located on the top surface of the reference cylinder model to obtain a top vertex set; calculating the bottom center of the reference cylinder model according to the bottom vertex set, and calculating the top center of the reference cylinder model according to the top vertex set; calculating the direction vector of the corrected central axis of the reference cylinder model according to the bottom center and the top center.

[0077] Specifically, when the mesh model to be recognized is not a standard cylinder, the initial cylinder axis direction obtained using the tight bounding box may have deviations and needs to be corrected to obtain more accurate model parameters. In the method for identifying the parameters of a cylinder model for a digital building model provided in this embodiment, the idea of correction is to find the vertices of the top and bottom surfaces of the mesh model to be recognized, and connect the center of the top surface and the center of the bottom surface as the new axis direction, so that the parameters of the reference cylinder model are closer to the mesh model to be recognized. In other words, the parameters of the mesh model to be recognized obtained according to the reference cylinder model are more accurate.

[0078] The specific process is first to take the center C of the reference cylinder model as the origin and its initial cylinder axis direction n as the Z-axis to establish a local coordinate system of the cylinder. In this embodiment, this local coordinate system is named the first local coordinate system. Then transform all mesh vertices into this first local coordinate system. Let the minimum and maximum values of the local coordinate z among all vertices be z min and z max , then the vertices of the mesh model to be recognized located on the bottom surface of the reference cylinder model satisfy |z - z min | < ε, and the vertices of the input model mesh model to be recognized located on the top surface of the reference cylinder model satisfy |z - z max | < ε, where ε is the distance tolerance.

[0079] Let V bot = {v = (x, y, z)||z - z min | < ε} represent all bottom vertex sets, with a total of n bot vertices, and V top = {v = (x, y, z)||z - z max | < ε} represent all bottom vertex sets, with a total of n top vertices. Then the bottom center C bot and the top center C top can be calculated as follows:

[0080]

[0081] Finally, the updated direction of the corrected cylindrical axis is:

[0082]

[0083] Optionally, in one embodiment, before the step of determining whether the patch unit of the mesh model to be recognized is on the reference cylindrical model, the recognition method further includes: calculating the distances from each point in the bottom vertex set and the top vertex set to the correction central axis; clustering the points in the bottom vertex set and the top vertex set according to the distances; when the number of effective classes obtained after clustering is not 1 or 2, determining that the mesh model to be recognized does not belong to the cylindrical model, wherein when the number of effective classes obtained after clustering is 1 or 2, the step of determining whether the patch unit of the mesh model to be recognized is on the reference cylindrical model is executed.

[0084] Specifically, in practical applications, there are many pipeline models with thickness that need to be recognized, that is, the corresponding double-layer cylindrical models also need to be parameter-recognized. Therefore, when recognizing the parameters of the cylindrical model, it is also necessary to recognize whether the cylinder belongs to a single-layer model or a double-layer model. In the recognition method for the parameters of the cylindrical model for the digital building model provided in this embodiment, the points on the top and bottom surfaces of the mesh model to be recognized (that is, each point in the bottom vertex set and the top vertex set) are clustered, and the number of effective classes being 1 or 2 is used to determine whether the cylindrical model belongs to a single-layer cylinder or a double-layer cylinder, so as to support the parameter recognition of single-layer and double-layer cylinders, and at the same time exclude the recognition of non-cylindrical models, and only select the points on the top and bottom surfaces of the mesh model to be recognized for clustering, reducing the data processing volume and the time consumption of the clustering operation.

[0085] Based on the characteristic that the distances from the vertices in the cylinder to the axis are equal, after obtaining the axis direction n of the cylinder, the vertices of the mesh model to be recognized can be clustered according to the distances to the axis. For a single-layer cylindrical model, the number of vertex clustering results is 1, and for a double-layer cylindrical model, the number of vertex clustering results is 2. Let the mesh model to be recognized be M, and the reference cylindrical model be M c , and the cylindrical axis be A c , the starting point s and the ending point t of the cylindrical axis A c are respectively: s = C - 0.5l·n, t = C + 0.5l·n, then the distance from any vertex v to the cylindrical axis A c is

[0086]

[0087] For all points in the set of V bot ∪V top , the distances of all points are calculated using the above formula, and then according to the distance threshold ε between pointsdist , cluster the points with a distance less than the threshold into one class. After clustering, the vertices in V bot ∪V top are divided into multiple classes. If the number of vertices in a class exceeds 40% of the total number of vertices in V bot ∪V top , it is considered a valid class. If the number of valid classes is neither 1 nor 2, it means that the grid model to be recognized is not a cylindrical model, and the process exits. If the number of valid classes is 1, it indicates that the grid model to be recognized can only be a single-layer cylindrical model. If the number of valid classes is 2, it indicates that the grid model to be recognized can only be a double-layer cylindrical model.

[0088] Optionally, in one embodiment, the step of constructing a cylindrical model according to the parameter information to obtain a reference cylindrical model further includes: when the number of valid classes obtained after clustering is 1, using the distance corresponding to the valid class as the corrected radius of the reference cylindrical model; when the number of valid classes obtained after clustering is 2, using the distances corresponding to the two valid classes as the corrected outer radius and inner radius of the reference cylindrical model respectively.

[0089] Specifically, after the above vertex clustering, each class of vertices can correspond to a circle. Therefore, the average distance of the vertices in the class can be used as the radius. If the number of clusters is 1, a radius is obtained as the corrected radius of the reference cylindrical model; if the number of clusters is 2, the two average distance values are respectively the corrected outer radius and inner radius of the reference cylindrical model from large to small, making the parameters of the reference cylindrical model closer to the grid model to be recognized. In other words, the parameters of the grid model to be recognized obtained according to the reference cylindrical model are more accurate.

[0090] Optionally, in one embodiment, the step of determining whether the patch unit of the grid model to be recognized is on the reference cylindrical model includes: calculating the normal vector and centroid of the patch unit; calculating the maximum distance among the distances from the centroid and each vertex of the patch unit to the reference cylindrical model; determining whether the normal vector is perpendicular to the direction vector of the corrected central axis; determining whether the difference between the maximum distance and 0 is within a preset distance tolerance; wherein, when the normal vector is perpendicular to the direction vector of the corrected central axis and the difference between the maximum distance and 0 is within the preset distance tolerance, the patch unit is on the reference cylindrical model.

[0091] Specifically, for each patch unit, when determining whether it is on the reference cylindrical model, two judgment conditions are used: Condition 1: Whether the normal vector of the patch unit is close to being perpendicular to the cylindrical axis direction of the reference cylindrical model; Condition 2: Whether the maximum distance from each vertex and the centroid of the patch unit to the reference cylindrical model is close to 0. Specifically, when making a judgment, taking a triangular patch unit as an example, let the three vertices of the triangular patch unit f be v 1 , v 2 , v 3, then calculate its normal vector as:

[0092]

[0093] The barycentric coordinates are:

[0094]

[0095] Let the axis direction of the reference cylindrical model be n axis , then the formula corresponding to Condition 1 is:

[0096] |f n ·n axis | < ε cos ,

[0097] where ε cos is a positive number greater than 0. For example, let it be 0.05, and it can be determined according to the specific situation.

[0098] For a single-layer cylindrical model with a cylinder radius of r, the formula corresponding to Condition 2 is:

[0099]

[0100] For a double-layer cylindrical model, let the outer radius be R and the inner radius be r. Then the formula corresponding to Condition 2 is:

[0101]

[0102] where ε dist = 0.1*r, representing the distance tolerance.

[0103] Through the above judgment process, when both conditions are satisfied, the patch element is considered to be on the reference cylindrical model.

[0104] Optionally, in one embodiment, before the step of determining whether the patch element of the to-be-recognized mesh model is on the reference cylindrical model, the recognition method further includes: calculating the volume difference between the tight bounding box and the reference cylindrical model; when the volume difference is greater than a preset volume tolerance, determining that the to-be-recognized mesh model does not belong to the cylindrical model, where when the volume difference is less than or equal to the preset volume tolerance, execute the step of determining whether the patch element of the to-be-recognized mesh model is on the reference cylindrical model.

[0105] Specifically, since only the two end vertices of the top and bottom surfaces of the grid model to be recognized are used in the above clustering process, and other vertices in the model are not used, it is possible that the top and bottom surfaces of the grid model to be recognized fit the reference cylinder model, but the middle part does not fit. That is, the grid model to be recognized is actually a part of the cylinder at the top and bottom, and the middle part is of other shapes, and the whole is not a cylinder model. To avoid this situation, through the cylinder model recognition method provided in this embodiment, the volume ratio between the tight bounding box of the grid model to be recognized and the tight bounding box of the reference cylinder model is checked. The specific judgment criterion is the calculation formula:

[0106]

[0107] where b 1 , b 2 , b 3 are the three sides of the tight bounding box of the grid model to be recognized, r is the radius of the reference cylinder model, and l is the length of the cylinder axis. When γ is 1, it means that the volumes of the two are exactly the same, and the grid model to be recognized belongs to the cylinder model; when the γ value is greater than the set threshold, it is considered that the grid model to be recognized is not a cylinder model, further improving the accuracy of cylinder model recognition.

[0108] Embodiment 2

[0109] Based on the above Embodiment 1, Embodiment 2 of the present invention provides a preferably method for recognizing cylinder model parameters for a digital building model. Specifically, Figure 2 is a flowchart of the method for recognizing cylinder model parameters for a digital building model provided in Embodiment 2 of the present invention. As Figure 2 shown, the method for recognizing cylinder model parameters for a digital building model provided in this embodiment includes the following steps S201 to step S209.

[0110] Step S201: The user inputs a model, and the required format is a triangular mesh model. This input model is also the grid model to be recognized;

[0111] Step S202: Determine whether the tight bounding box of the input model is like a cylinder;

[0112] The tight bounding box of a 3D model refers to the smallest cuboid that encloses the model. The tight bounding box is not necessarily aligned with the XYZ axes in the world coordinate system, but is aligned with the XYZ axes of the local coordinate system determined by the model itself.

[0113] If the input model is a long straight cylinder, then its tight bounding box has the following characteristics: the cylinder axis direction is the longest side in the tight bounding box, and the second shortest side and the shortest side of the tight bounding box have the same length. According to this characteristic, models that are definitely not cylinders can be screened out. The specific implementation process is introduced as follows:

[0114] First, calculate the tight bounding box B of the model. Let the set of all vertices of the input model be {v 1 , v 2 , … v n}, where v i = (x i , y i , z i ). Then the centroid of the vertices

[0115] Let

[0116]

[0117] M i represent the covariance matrix of the v i coordinates v i v i T . Let ∑ i=1,2,…n M i d = λd, and solve for the unit eigenvector d 1 , d 2 , d 3 . Then the local coordinate system O′X′Y′Z′ is represented as follows:

[0118] O′ = g

[0119] X′ = d 1

[0120] Y′ = d 2

[0121] Z′ = d 3

[0122] where O′ is the origin of the local coordinate system, and X′Y′Z′ are the axes of the local coordinate system

[0123] After obtaining the origin and axes of the local coordinate system, calculate the axis-aligned bounding box in the local coordinate system. Transform all the vertices in the grid into the local coordinate system. Let the set of the transformed vertices be {v 1 ′, v 2 ′, … v n ′}, where v i ′ = (x i ′, y i ′, z i ′). Then the minimum and maximum values of all vertices can be calculated. For example, the minimum and maximum values in the x direction are respectively:

[0124]

[0125]

[0126] Similarly, y can be calculated min , z min , then the minimum point of the tight bounding box B in the local coordinate system is P min =(x min , y min , z min ), and the maximum point is P max =(x max , y max , z max ). Then the three side lengths of the tight bounding box B are respectively

[0127] l x =x max -x min

[0128] l y =y max -y min

[0129] l z =z max -z min

[0130] For the three side lengths l x , l y , l z , sort them from largest to smallest. Without loss of generality, let l x >l y >l z , then the tight bounding box of the cylinder should satisfy the following formula:

[0131]

[0132] where ε l is the tolerance of the length ratio, set to 0.1. If this formula is not satisfied, it can be determined that the input model is not a cylinder, and the process is exited; otherwise, continue with the subsequent judgment.

[0133] Step S203: Check whether the input model is simply connected.

[0134] The cylinder in this embodiment refers to a single connected cylinder. If the model is disconnected into multiple non-connected segments, then it must not be a cylinder. To determine whether the input model is disconnected, the specific process is as follows. First, determine two projection directions based on the tight bounding box. Let the directions of the three axes of the tight bounding box in the world coordinate system be X′Y′Z′, where X′ corresponds to the direction of the longest side of the tight bounding box. Then the two projection directions are Y′ and Z′ respectively. Then perform orthogonal projections on the input model along Y′ and Z′ respectively, and obtain the contour lines of the model through the projection contour line algorithm. The contour line is composed of a series of ordered vertices connected in sequence to form a loop, which can represent the boundary between the model and the background. If the number of projection contour lines obtained along Y′ and Z′ is both 1, it indicates that the model is a connected whole; otherwise, it indicates that the model is disconnected into multiple non-connected objects, and the judgment process is exited.

[0135] Step S204: Initialize the cylinder parameters using the tight bounding box.

[0136] If the input model is a cylinder, then according to the characteristics of the tight bounding box of the cylindrical object, the various parameters of the cylinder can be initialized as follows:

[0137]

[0138]

[0139]

[0140] Where C is the center of the cylinder, R is the radius of the cylinder, n is the direction vector of the central axis of the cylinder, and l is the length of the central axis of the cylinder.

[0141] Step S205: Correct the direction of the cylinder axis.

[0142] Since the input model may not be a standard cylinder, the initial cylinder axis direction n obtained using the tight bounding box B may have deviations, and more accurate cylinder parameters need to be obtained through correction. The idea of correction is to find the vertices on the top and bottom surfaces of the cylinder model, and connect the center of the top surface and the center of the bottom surface as the new axis direction.

[0143] The specific process is as follows: First, establish a local coordinate system of the cylinder with the initial cylinder center C as the origin and the initial cylinder axis direction n as the Z axis. Then transform all mesh vertices into the local coordinate system. Let the minimum and maximum values of the local coordinate z of all vertices be z min and z max , then the vertices on the initial bottom surface of the input model satisfy |z - z min | < ε, and the vertices on the initial top surface of the input model satisfy |z - z max | < ε, where ε is the distance tolerance.

[0144] Let V bot ={v=(x,y,z)||z - z min |<v} represent the set of all bottom vertices, with a total of n bot vertices. V top ={v=(x,y,z)||z - z max |<ε} represent the set of all bottom vertices, with a total of n top vertices. Then the center of the bottom surface can be calculated as: The center of the top surface is After correction, the direction of the cylinder axis is updated to:

[0145]

[0146] Step S206: Determine whether the number of vertex clusters at both ends is 1 or 2.

[0147] Based on the characteristic that the distances from the vertices in the cylinder to the axis are equal, after obtaining the axis direction n of the cylinder, the vertices of the input model need to be clustered according to the distances to the axis. For a single-layer cylinder model, the number of vertex clustering results is 1, and for a double-layer cylinder model, the number of vertex clustering results is 2. Since the number of vertices in the entire model is very large, it is very time-consuming to cluster all the vertices in the input model. Therefore, only the vertices of the input model and the points on the bottom surface are selected for clustering, and the corresponding point set is V bot ∪V top .

[0148] Let the input model be M, and the fitted cylinder be M c , and the cylinder axis be A c , the starting point and end point of the cylinder axis A c are s = C - 0.5l·n, and the end point is t = C + 0.5l·n. Then the distance from any vertex v to the cylinder axis A c is

[0149]

[0150] For all the points in the point set of V bot ∪V top , the distances are calculated using the above formula, and then according to the distance threshold ε dist between points, the points with distances less than the threshold are clustered into one class. After clustering, the vertices in V bot ∪V top are divided into multiple classes. If the number of vertices in a class exceeds 40% of the total number of vertices in V bot ∪V top , it is considered a valid class. Calculate the sum of the number of valid classes. If it is neither 1 nor 2, it means it cannot be a cylinder, and the process is exited.

[0151] Step S207: Calculate the inner and outer radii of the cylinder.

[0152] After vertex clustering, each class of vertices can correspond to a circle. Therefore, the average distance of the vertices in the class can be used as the radius. If the number of clusters is 1, a radius r is obtained. If the number of clusters is 2, the two average distance values are the outer radius R and the inner radius r in descending order.

[0153] Step S208: Determine whether the patch ratio on the cylinder is close to 1.

[0154] If a model is a cylinder, the number of vertex clusters is 1 or 2, but the converse is not true. For example, a cuboid model with a square base satisfies the number of vertex clusters being 1, but it is obviously not a cylinder. The reason for this situation is that when the number of points in the model is small, the information of the points is not sufficient to completely describe the geometric features of the model. To avoid misidentifying an object with a square cross-section as a cylinder, it is necessary to calculate the ratio of the area sum of the patches on the cylinder in the input model to the area of the cylinder. When the ratio is close to 1, it indicates that the coincidence ratio of the input model and the cylinder is very large, and the model is very likely to be a cylinder; otherwise, it cannot be a cylinder. The key to this step is to determine whether the triangular patch is on the cylinder, using the following two judgment conditions:

[0155] 1. The normal vector of the triangular patch is close to being perpendicular to the cylinder axis direction

[0156] 2. The maximum distances from the three vertices and the centroid in the triangle to the cylinder are close to 0

[0157] Let the three vertices of triangle f be v 1 , v 2 , v 3 , the normal vector is and the centroid coordinates are Let the cylinder axis direction be n axis , then the formula corresponding to condition 1 is:

[0158] |f n ·n axis | < ε cos ,

[0159] where ε cos is a positive number greater than 0, set to 0.05, and can be determined according to the specific situation.

[0160] For a single-layer cylinder model, with the cylinder radius being r, the formula corresponding to condition 2 is:

[0161]

[0162] For a double-layer cylinder model, let the outer radius be R and the inner radius be r, then the formula corresponding to condition 2 is:

[0163]

[0164] where ε dist = 0.1*r, representing the distance tolerance.

[0165] Only when both conditions are satisfied is the patch considered to be on the cylinder. If this ratio is too low, the input model is considered not to be a cylinder and the process exits; otherwise, it may be a cylinder and the next step of the process continues for further judgment.

[0166] Step S209: Determine whether the volume ratio of the cylinder to the bounding box of the input model is close to 1.

[0167] Since vertex clustering only uses the two end vertices of the top and bottom surfaces of the original model and does not use other vertices in the original model, it is possible that the top and bottom surfaces of the input model fit the fitted cylinder while the middle part does not. To avoid this situation, it is necessary to check the volume ratio between the bounding box of the input model and the bounding box of the cylinder. The judgment criterion is the calculation formula:

[0168]

[0169] where b 1 , b 2 , b 3 are the three dimension values of the bounding box of the input model, r is the radius of the cylinder, and l is the length of the cylinder axis. When γ is 1, it means that the volumes of the two are exactly the same. When the value of γ is greater than the set threshold, the input model is considered not to be a cylinder; otherwise, it is a cylinder.

[0170] Embodiment III

[0171] Corresponding to the above Embodiment I, Embodiment III of the present invention provides an identification device for the cylinder model parameters of a digital building model. For the corresponding technical feature details and corresponding technical effects, reference can be made to Embodiment I above and will not be elaborated herein. Figure 3 The identification device for the cylinder model parameters of a digital building model provided in Embodiment III of the present invention, as Figure 3 shown, the device includes: a receiving module 301, a calculation module 302, a construction module 303, a judgment module 304, and a determination module 305.

[0172] Among them, the receiving module 301 is used to receive the grid model to be recognized in the digital building model, where the grid model to be recognized includes multiple patch units; the calculation module 302 is used to calculate the tight bounding box of the grid model to be recognized; the construction module 303 is used to construct a cylinder model according to the parameter information of the tight bounding box to obtain a reference cylinder model; the judgment module 304 is used to judge whether the patch unit of the grid model to be recognized is on the reference cylinder model; and the determination module 305 is used to determine that the grid model to be recognized is a cylinder model when the patch unit of the grid model to be recognized on the reference cylinder model meets the preset conditions, and use the parameters of the reference cylinder model as the parameters of the grid model to be recognized.

[0173] Optionally, in one embodiment, the apparatus for identifying the parameters of the cylinder model for the digital building model further includes: a first processing module, configured to determine the shortest side length and the second shortest side length of the tight bounding box before the construction module constructs the cylinder model according to the parameter information; when the relationship between the shortest side length and the second shortest side length does not meet the preset relationship, determine that the grid model to be recognized does not belong to the cylinder model, where the construction module is further configured to execute the step of constructing the cylinder model according to the parameter information when the relationship between the shortest side length and the second shortest side length meets the preset relationship.

[0174] Optionally, in one embodiment, the apparatus for identifying the parameters of the cylinder model for the digital building model further includes: a second processing module, configured to determine the shortest side length and the second shortest side length of the tight bounding box before the step of the construction module constructing the cylinder model according to the parameter information; perform orthogonal projection on the grid model to be recognized along the directions of the shortest side length and the second shortest side length; when the number of projection contour lines of the grid model to be recognized along the shortest side length direction and / or the second shortest side length direction is greater than 1, determine that the grid model to be recognized does not belong to the cylinder model, where the construction module is further configured to execute the step of constructing the cylinder model according to the parameter information when the number of projection contour lines of the grid model to be recognized along the shortest side length direction and the second shortest side length direction is 1.

[0175] Optionally, in one embodiment, the construction module includes: a determination unit, configured to determine the minimum point, maximum point, first side length, second side length, and third side length of the tight bounding box, where the first side length is greater than the second side length, and the second side length is greater than the third side length; a first calculation unit, configured to calculate the center and the direction vector of the central axis of the reference cylinder model according to the minimum point and the maximum point; a second calculation unit, configured to calculate the radius of the reference cylinder model according to the second side length and the third side length; a third calculation unit, configured to calculate the length of the central axis according to the first side length.

[0176] Optionally, in one embodiment, the construction module further includes: a first establishing unit, configured to establish a first local coordinate system with the center of the reference cylindrical model as the origin and the direction vector of the central axis as the Z-axis; a first transformation unit, configured to transform the vertices of each patch unit of the mesh model to be recognized into the first local coordinate system; a first extraction unit, configured to, in the first local coordinate system, extract the vertices of the patch units located on the bottom surface of the reference cylindrical model to obtain a bottom surface vertex set, and extract the vertices of the patch units located on the top surface of the reference cylindrical model to obtain a top surface vertex set; a fourth calculation unit, configured to calculate the center of the bottom surface of the reference cylindrical model according to the bottom surface vertex set, and calculate the center of the top surface of the reference cylindrical model according to the top surface vertex set; a fifth calculation unit, configured to calculate the direction vector of the corrected central axis of the reference cylindrical model according to the center of the bottom surface and the center of the top surface.

[0177] Optionally, in one embodiment, the apparatus for identifying cylindrical model parameters of a digital building model further includes: a third processing module, configured to calculate the distances from each point in the bottom surface vertex set and the top surface vertex set to the corrected central axis before the step of the judging module judging whether the patch unit of the mesh model to be recognized is on the reference cylindrical model; cluster the points in the bottom surface vertex set and the top surface vertex set according to the distances; when the number of effective classes obtained after clustering is not 1 or 2, determine that the mesh model to be recognized does not belong to the cylindrical model, wherein the judging module is further configured to, when the number of effective classes obtained after clustering is 1 or 2, execute the step of judging whether the patch unit of the mesh model to be recognized is on the reference cylindrical model.

[0178] Optionally, in one embodiment, the construction module further includes: a correction unit, configured to, when the number of effective classes obtained after clustering is 1, use the distance corresponding to the effective class as the corrected radius of the reference cylindrical model; when the number of effective classes obtained after clustering is 2, use the distances corresponding to the two effective classes as the corrected outer radius and inner radius of the reference cylindrical model, respectively.

[0179] Optionally, in one embodiment, the judging module includes: a sixth calculation unit, configured to calculate the normal vector and the centroid of the patch unit; a seventh calculation unit, configured to calculate the maximum distance among the distances from the centroid and each vertex of the patch unit to the reference cylindrical model; a first judging unit, configured to judge whether the normal vector is perpendicular to the direction vector of the corrected central axis; a second judging unit, configured to judge whether the difference between the maximum distance and 0 is within a preset distance tolerance; wherein, when the normal vector is perpendicular to the direction vector of the corrected central axis and the difference between the maximum distance and 0 is within the preset distance tolerance, the patch unit is on the reference cylindrical model.

[0180] Optionally, in one embodiment, the recognition device for the cylindrical model parameters of the digital building model further includes: a fourth processing unit, configured to calculate the volume difference between the tight bounding box and the reference cylindrical model before the judgment module determines whether the patch unit of the mesh model to be recognized is on the reference cylindrical model; when the volume difference is greater than a preset volume tolerance, it is determined that the mesh model to be recognized does not belong to the cylindrical model, wherein the judgment module is further configured to, when the volume difference is less than or equal to the preset volume tolerance, perform the step of determining whether the patch unit of the mesh model to be recognized is on the reference cylindrical model.

[0181] Optionally, in one embodiment, the determination module includes: an eighth calculation unit, configured to calculate the area sum of all patch units of the mesh model to be recognized on the reference cylindrical model; a ninth calculation unit, configured to calculate the surface area of the reference cylindrical model; a third judgment unit, configured to judge whether the difference between the area sum and the surface area is less than a preset difference threshold; a determination unit, configured to determine that the mesh model to be recognized is a cylindrical model when the difference between the area sum and the surface area is less than the preset difference threshold.

[0182] Optionally, in one embodiment, the calculation module includes: a second extraction unit, configured to extract the vertex set {v 1 , v 2 , … v n} of each patch unit of the mesh model to be recognized, where v i = (x i , y i , z i ); a tenth calculation unit, configured to calculate the vertex centroid g = ∑ 1 v 2 , … v n} / n according to the vertex set {v i , v i}; an eleventh calculation unit, configured to set

[0183]

[0184] where M i represents the covariance matrix v i of the v i v i T , let ∑ i=1,2,…n M i d = λd, and solve for the unit eigenvector d 1 , d 2 , d 3 ; a second establishment unit, configured to establish the second local coordinate system O'X'Y'Z' as: O' = g, X' = d 1 , Y' = d 2 and Z' = d 3, where O′ is the origin of the second local coordinate system, and X′Y′Z′ are the axes of the second local coordinate system; a second transformation unit for transforming the vertex set {v 1 , v 2 , … v n} into the second local coordinate system to obtain the transformed vertex set {v 1 ′, v 2 ′, … v n ′}, where v i ′ = (x i ′, y i ′, z i ′); a twelfth calculation unit for calculating the minimum and maximum values of each vertex in the transformed vertex set {v 1 ′, v 2 ′, … v n ′} to obtain that the minimum point of the tight bounding box in the second local coordinate system is P min = (x min , y min , z min ) and the maximum point is P max = (x max , y max , z max ); a thirteenth calculation unit for calculating that the three side lengths of the tight bounding box are: l x = x max - x min , l y = y max - y min , l z = z max - z min .

[0185] Example 4

[0186] This example also provides a computer device, such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack server, a blade server, a tower server, or a cabinet server (including an independent server or a server cluster composed of multiple servers) that can execute programs. As Figure 4 shown, the computer device 01 of this example at least includes, but is not limited to, a memory 011 and a processor 012 that can communicate with each other through a system bus, as Figure 4 shown. It should be noted that Figure 4 only the computer device 01 with components memory 011 and processor 012 is shown, but it should be understood that it is not required to implement all the shown components, and more or fewer components can be alternatively implemented.

[0187] In this embodiment, the memory 011 (i.e., the readable storage medium) includes flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 011 may be an internal storage unit of the computer device 01, such as the hard disk or memory of the computer device 01. In other embodiments, the memory 011 may also be an external storage device of the computer device 01, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, etc. equipped on the computer device 01. Of course, the memory 011 may also include both the internal storage unit and the external storage device of the computer device 01. In this embodiment, the memory 011 is generally used to store the operating system and various application software installed on the computer device 01, such as the program code of the recognition device for the cylindrical model parameters of the digital building model in Embodiment 3. In addition, the memory 011 can also be used to temporarily store various data that have been output or will be output.

[0188] In some embodiments, the processor 012 may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other data processing chip. The processor 012 is generally used to control the overall operation of the computer device 01. In this embodiment, the processor 012 is used to run the program code stored in the memory 011 or process data, such as the recognition method for the cylindrical model parameters of the digital building model.

[0189] Embodiment Five

[0190] This embodiment also provides a computer-readable storage medium, such as flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, server, App application mall, etc., on which a computer program is stored, and when the program is executed by a processor, corresponding functions are implemented. The computer-readable storage medium of this embodiment is used to store the recognition device for the cylindrical model, and when executed by a processor, it implements the recognition method for the cylindrical model parameters of the digital building model in Embodiment 1.

[0191] It should be noted that, in this document, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising a..." does not exclude the presence of additional identical elements in the process, method, article or device comprising that element.

[0192] The serial numbers of the above embodiments of the present invention are only for description and do not represent the superiority or inferiority of the embodiments.

[0193] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-described embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation.

[0194] The above are only the preferred embodiments of the present invention, and do not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present invention.

Claims

1. A method for identifying cylindrical model parameters for a digital building model, characterized in that: include: Receiving a grid model to be identified in a digital building model, wherein the grid model to be identified includes a plurality of facet units; Calculating a tight bounding box of the grid model to be identified; Constructing a cylindrical model according to the parameter information of the tight bounding box to obtain a reference cylindrical model; Determining whether the patch unit of the to-be-identified mesh model is on the reference cylindrical model; and When the patch units of the mesh model to be identified on the reference cylindrical model meet preset conditions, the mesh model to be identified is determined to be a cylindrical model, and the parameters of the mesh model to be identified are determined according to the parameters of the reference cylindrical model.

2. The method for identifying cylindrical model parameters for digital building models according to claim 1, characterized in that: Before the step of constructing a cylindrical model according to the parameter information, the recognition method further comprises: Determine the shortest side length and the second shortest side length of the tight bounding box; When the relationship between the shortest side length and the second shortest side length does not satisfy a preset relationship, it is determined that the mesh model to be identified does not belong to a cylindrical model. Among them, when the relationship between the shortest side length and the second shortest side length meets the preset relationship, the step of constructing a cylindrical model according to the parameter information is executed.

3. The method for identifying cylindrical model parameters for digital building models according to claim 1, characterized in that: Before the step of constructing a cylindrical model according to the parameter information, the recognition method further comprises: Determine the shortest side length and the second shortest side length of the tight bounding box; Performing orthogonal projection on the grid model to be identified along the direction of the shortest side length and the direction of the second shortest side length respectively; When the number of projection contour lines of the to-be-identified mesh model along the shortest side length direction and / or the second shortest side length direction is greater than 1, it is determined that the to-be-identified mesh model does not belong to a cylindrical model. Among them, when the number of projection contour lines of the grid model to be identified along the shortest side length direction and the second shortest side length direction is 1, the step of constructing a cylindrical model according to the parameter information is performed.

4. The method for identifying cylindrical model parameters for digital building models according to claim 1, characterized in that: The step of constructing a cylindrical model according to the parameter information and obtaining a reference cylindrical model comprises: Determine the minimum point, the maximum point, the first side length, the second side length, and the third side length of the tight bounding box, wherein the first side length is greater than the second side length, and the second side length is greater than the third side length; Calculate the direction vectors of the center and the center axis of the reference cylindrical model according to the minimum point and the maximum point; Calculating the radius of the reference cylindrical model according to the second side length and the third side length; The length of the central axis is calculated according to the first side length.

5. The method for identifying cylindrical model parameters for digital building models according to claim 4, characterized in that: The step of constructing a cylindrical model according to the parameter information to obtain a reference cylindrical model also includes: Establishing a first local coordinate system with the center of the reference cylindrical model as the origin and the direction vector of the central axis as the Z axis; Transforming the vertices of each patch unit of the to-be-identified mesh model into the first local coordinate system; In the first local coordinate system, extract the vertices of the patch units located on the bottom surface of the reference cylindrical model to obtain a bottom surface vertex set, and extract the vertices of the patch units located on the top surface of the reference cylindrical model to obtain a top surface vertex set; Calculating the bottom center of the reference cylindrical model according to the bottom vertex set, and calculating the top center of the reference cylindrical model according to the top vertex set; The direction vector of the correction center axis of the reference cylindrical model is calculated according to the bottom surface center and the top surface center.

6. The method for identifying cylindrical model parameters for digital building models according to claim 5, characterized in that: Before the step of determining whether the patch unit of the to-be-identified mesh model is on the reference cylindrical model, the identification method further comprises: Calculating the distance from each point in the bottom surface vertex set and the top surface vertex set to the correction center axis; Clustering each point in the bottom surface vertex set and the top surface vertex set according to the distance; When the number of valid classes obtained after clustering is not 1 or 2, it is determined that the grid model to be identified does not belong to a cylindrical model. When the number of valid classes obtained after clustering is 1 or 2, a step of determining whether the patch unit of the to-be-identified mesh model is on the reference cylindrical model is performed.

7. The method for identifying cylindrical model parameters for digital building models according to claim 6, characterized in that: The step of constructing a cylindrical model according to the parameter information to obtain a reference cylindrical model also includes: When the number of valid classes obtained after clustering is 1, the distance corresponding to the valid class is used as the corrected radius of the reference cylindrical model; When the number of valid classes obtained after clustering is 2, the distances corresponding to the two valid classes are respectively used as the corrected outer radius and inner radius of the reference cylindrical model.

8. The method for identifying cylindrical model parameters for digital building models according to claim 5, characterized in that: The step of determining whether the patch unit of the to-be-identified mesh model is on the reference cylindrical model comprises: Calculating the normal vector and the center of gravity of the patch unit; Calculate the maximum distance between the center of gravity and each vertex of the patch unit and the reference cylindrical model; Determining whether the normal vector is perpendicular to the direction vector of the correction center axis; Determine whether the difference between the maximum distance and 0 is within a preset distance tolerance; When the normal vector is perpendicular to the direction vector of the correction center axis and the difference between the maximum distance and 0 is within the preset distance tolerance, the patch unit is on the reference cylindrical model.

9. The method for identifying cylindrical model parameters for digital building models according to claim 1, characterized in that: Before the step of determining whether the patch unit of the to-be-identified mesh model is on the reference cylindrical model, the identification method further comprises: Calculating the volume difference between the tight bounding box and the reference cylindrical model; When the volume difference is greater than the preset volume tolerance, it is determined that the grid model to be identified does not belong to a cylindrical model. Wherein, when the volume difference is less than or equal to the preset volume tolerance, a step of determining whether the patch unit of the mesh model to be identified is on the reference cylindrical model is performed.

10. The method for identifying cylindrical model parameters for digital building models according to claim 1, characterized in that: When the patch unit of the mesh model to be identified on the reference cylindrical model meets a preset condition, the step of determining that the mesh model to be identified is a cylindrical model includes: Calculating the areas of all facet units of the grid model to be identified on the reference cylindrical model to obtain a sum of the areas; Calculating the surface area of ​​the reference cylindrical model; Determining whether a difference between the area sum and the surface area is less than a preset difference threshold; When the difference between the area sum and the surface area is less than the preset difference threshold, it is determined that the grid model to be identified is a cylindrical model.

11. The method for identifying cylindrical model parameters for digital building models according to claim 1, characterized in that: The step of calculating the tight bounding box of the grid model to be identified includes: Extract the vertex set {v1, v2, ...v n }, where v i =(x i ,y i ,z i ); According to the vertex set {v1,v2,…v n }Calculate the vertex center g = ∑ i v i / n; set up Among them, M i It means v i The covariance matrix v of the coordinates i v i T , let ∑ i=1,2,…n M i d = λd, solve for the unit eigenvectors d1, d2, d3; Establish the second local coordinate system O ′ X ′ Y ′ Z ′ For: ′ =g,X ′ =d1,Y ′ =d2 and Z ′ =d3, where, O ′ is the origin of the second local coordinate system, X ′ Y ′ Z ′ are the axes of the second local coordinate system; The vertex set {v1,v2,…v n } is transformed into the second local coordinate system to obtain the transformed vertex set {v1 ′ ,v2 ′ ,…v n ′ }, where v i ′ =(x i ′,y i ′,z i ′); Calculate the transformed vertex set {v1 ′ ,v2 ′ ,…v n ′ }, the minimum point of the tight bounding box in the second local coordinate system is P min =(x min ,y min ,z min ) and the maximum point is P max =(x max ,y max ,z max ); The three side lengths of the tight bounding box are calculated as follows: l x =x max -x min 、l y =y max -y min 、l z =z max -z min 。 12. A cylindrical model recognition device for a digital building model, characterized in that: include: A receiving module, configured to receive a grid model to be identified in a digital building model, wherein the grid model to be identified includes a plurality of facet units; A calculation module, used for calculating the tight bounding box of the grid model to be identified; A construction module, used to construct a cylindrical model according to the parameter information of the tight bounding box to obtain a reference cylindrical model; A judging module, used for judging whether the patch unit of the mesh model to be identified is on the reference cylindrical model; and The determination module is used to determine that the mesh model to be identified is a cylindrical model when the surface unit of the mesh model to be identified on the reference cylindrical model meets a preset condition, and determine the parameters of the mesh model to be identified according to the parameters of the reference cylindrical model.

13. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 11 are implemented.

14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.