Automatic conversion method and system of CAD and BIM model coordinates based on coordinate mapping

Through a coordinate mapping method and combined with Poisson surface reconstruction technology, the three-dimensional model conversion of two-dimensional plan diagrams is solved, and the problems of insufficient model accuracy and geometric distortion in the existing technology are achieved, and high-precision and high-quality three-dimensional model construction is achieved.

CN119478285BActive Publication Date: 2025-04-22北京北投智慧城市科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510060172.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-15
Publication Date
2025-04-22
Estimated Expiration
2045-01-15

AI Technical Summary

Technical Problem

When the prior art transforms a two-dimensional plan into a three-dimensional model, the sampling density for corners, special-shaped space and changes in floor height are insufficient, resulting in a reduction in the local accuracy of the model, and geometric distortions are difficult to avoid in complex building areas, affecting the detailed expression and visual effect of the model.

Method used

Through a coordinate mapping method, the key geometric feature points of the building are extracted, and the two-dimensional grid is mapped to the three-dimensional coordinate space by combining the floor height parameters and corner information to generate the initial building three-dimensional point cloud data. Then, the Poisson surface reconstruction technology was used to fit and reconstruct the point cloud surface, and the local mesh structure and density distribution were adjusted to generate optimized building surface model data.

Benefits of technology

The geometric expression quality of the three-dimensional model is improved, the model accuracy loss problem is alleviated, the model accuracy and visual effect are significantly improved in complex scenarios, and the model is ensured in geometric and topological consistency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119478285B_ABST
    Figure CN119478285B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of coordinate conversion technology, specifically to a method and system for automatic conversion of CAD and BIM model coordinates based on coordinate mapping, comprising the following steps: extracting the two-dimensional coordinates of a CAD building inputted with reference to a building drawing, constructing an initial two-dimensional triangular mesh, extracting key geometric feature points of the building, and mapping the two-dimensional mesh to a three-dimensional coordinate space in combination with the building's floor height parameters and corner information, thereby generating initial three-dimensional point cloud data of the building. In the present invention, a high-quality initial triangular mesh is constructed by a Delaunay triangulation algorithm to accurately capture the coordinate information of sparse locations, and combined with the Poisson surface reconstruction technology, global surface fitting and smoothing are performed on the point cloud in the sparse area, thereby achieving density compensation and precision improvement of the coordinate point distribution. This optimization method effectively alleviates the problem of model accuracy loss in complex scenes such as building corners, irregular spaces, and floor height changes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of coordinate conversion, and in particular to a method and system for automatic conversion of CAD and BIM model coordinates based on coordinate mapping. Background Art

[0002] The field of coordinate transformation technology refers to a collection of methods and technologies for data mapping, transformation and association between different coordinate systems. This technology is widely used in computer-aided design (CAD), geographic information system (GIS), building information model (BIM) and other fields. It is an important basic technology for data standardization and interoperability in the fields of spatial information processing, engineering design and construction.

[0003] Among them, the automatic conversion method of CAD and BIM model coordinates refers to the automatic conversion and mapping of coordinate data in CAD models and BIM models through coordinate conversion technology, so that the data of the two in different coordinate systems can be quickly and accurately aligned and unified. This method is mainly used in the fields of architectural design and engineering construction, which helps to realize the integration of building information models and design models, and provides efficient data support and management tools for engineering projects.

[0004] When converting a two-dimensional plan into a three-dimensional model, the existing technology often lacks sampling density for corners, irregular spaces, and floor height changes, resulting in reduced local model accuracy, which may cause dimensional deviations and misjudgments in subsequent design and construction. For complex building areas with drastic changes in curvature or surface discontinuities, existing methods are prone to geometric distortion during the fitting process and cannot completely avoid the problem of rough or abrupt model surfaces, thus affecting the detailed expression and visual effects of the building model. When dealing with changes in design parameters, an efficient and accurate model update solution is not provided, and the adjusted model is difficult to maintain accuracy consistency with the reference model, especially in complex geometries and multi-deformation areas, where local deviations may accumulate, affecting the reliability of subsequent construction data. Summary of the invention

[0005] The purpose of the present invention is to solve the shortcomings of the prior art and propose a method for automatic conversion of CAD and BIM model coordinates based on coordinate mapping.

[0006] In order to achieve the above object, the present invention adopts the following technical solution: a method for automatic conversion of CAD and BIM model coordinates based on coordinate mapping, comprising the following steps:

[0007] S1: Extract the CAD building 2D coordinates inputted with reference to the building drawings, construct the initial 2D triangular mesh, extract the key geometric feature points of the building, combine the building's floor height parameters and corner information, map the 2D mesh to the 3D coordinate space, and generate the initial building 3D point cloud data;

[0008] S2: Based on the initial building 3D point cloud data, the distribution law and change characteristics of the point cloud data are analyzed, and the overall point cloud surface is reconstructed by fitting. For building corners, irregular facades, and abnormal areas with sudden changes in storey height, the structure and density distribution of the local grid are readjusted, and optimized building surface model data is output;

[0009] S3: Based on the optimized building surface model data, extract the control point coordinates of the surface in the building surface model data, initialize the control point weights according to the building surface gradient and curvature characteristics, adjust the control point weights for the abnormal building form area, and generate the building parameterized surface structure;

[0010] S4: Based on the parametric surface structure of the building, the key point area is selected according to the control point weight, and the rotation and translation relationship is established. The area where the rotation and translation relationship is established first is used as the constraint reference, and the reference range is gradually expanded to other point cloud areas. Iterative optimization alignment is performed to generate optimized BIM building surface coordinate data.

[0011] As a further solution of the present invention, the step of extracting key geometric feature points of the building is specifically as follows:

[0012] S111: based on the two-dimensional coordinate information in the architectural drawing, all vertex coordinates are extracted and stored as structured data, and a triangulation mesh that satisfies the maximum and minimum angle optimization is constructed to obtain the side length of the mesh and the angle of the triangle, thereby generating mesh topological structure data;

[0013] S112: Based on the grid topology data, by statistically analyzing the side lengths and extracting adjacency relationships, marking boundary points and extracting key geometric feature points, and arranging the feature point set in connection order, the key point data of the building is obtained.

[0014] As a further solution of the present invention, the steps for obtaining the initial building three-dimensional point cloud data are specifically as follows:

[0015] S121: Based on the key point data of the building, the two-dimensional coordinates are associated with the floor height parameters of the building, and the corresponding height values ​​are obtained by linear superposition. At the same time, the corner changes of each floor are obtained by combining the corner information, and coordinate transformation is performed to generate three-dimensional space coordinate data;

[0016] S122: Capture sparse area points in the three-dimensional space coordinate data, extract point density information, add supplementary points to the sparse area and boundary area by interpolation, and generate initial building three-dimensional point cloud data after renormalization.

[0017] As a further solution of the present invention, the acquisition step of fitting and reconstructing the entire point cloud surface is specifically as follows:

[0018] S211: Based on the initial building three-dimensional point cloud data, the formula is used:

[0019] ;

[0020] Calculate the gradient vector , generate gradient vector data;

[0021] in, represents the distribution of points in three-dimensional space, :Respectively represent The rate of change in the x, y, and z directions, where x, y, and z represent the coordinates of a point in three-dimensional space;

[0022] S212: Based on the gradient vector data, the distribution law and change characteristics of the point cloud data are analyzed, the feature information of the key area is extracted, the overall point cloud surface is fitted and reconstructed, and a building facade surface model is generated.

[0023] As a further solution of the present invention, the step of obtaining the optimized building surface model data is specifically as follows:

[0024] S221: Based on the data in the building facade curved surface model, extract points in building corners, special-shaped facades and storey height mutation areas, analyze the connection relationship between the points and adjacent grids, as well as the connection length and angle value to determine the structural characteristics, classify and mark the points and grid information in the abnormal area, and establish basic feature data of the abnormal area;

[0025] S222: Based on the basic feature data of the abnormal area, the connection relationship of the mesh vertices and the mesh structure of the special-shaped facade are adjusted to generate smooth mesh vertices in the area of ​​sudden height changes, and the overall quality is verified after reconnecting the mesh to obtain optimized building surface model data.

[0026] As a further solution of the present invention, the steps of obtaining the architectural parameterized curved surface structure are specifically as follows:

[0027] S311: Based on the optimized building surface model data, evenly divide the surface area, extract geometric feature points on the surface as initial control points, adjust the positions of the control points, and generate control point coordinate data;

[0028] S312: Based on the control point coordinate data, the formula is used:

[0029] ;

[0030] Calculate the The weight of the control point , get the control point weight information;

[0031] in, It is The curvature value of the control point, It is The modulus of the gradient vector at each control point;

[0032] S313: Based on the control point weight information, the control point area is weighted, the local fitting effect is optimized by redistributing the weights, and the overall surface is dynamically optimized to generate a parametric architectural surface structure.

[0033] As a further solution of the present invention, the step of obtaining the relationship between rotation and translation is specifically as follows:

[0034] S411: extracting the three-dimensional coordinates of the control points in the building surface based on the building parameterized surface structure, adjusting the control point coordinates and evaluating the errors through operations of segmenting the surface, extracting feature points and fitting the control point sequence, and generating the three-dimensional coordinate data of the control points;

[0035] S412: Based on the three-dimensional coordinate data of the control point, the formula is used:

[0036] ;

[0037] Calculate the midpoint of the model point cloud With the reference point cloud midpoint The Euclidean distance between , get the Euclidean distance in the key point area;

[0038] in, is the midpoint of the model point cloud The three-dimensional coordinate values ​​of is the midpoint of the reference point cloud The three-dimensional coordinate values ​​of It is the corresponding point pair composed of the points in the model point cloud and the points in the reference point cloud;

[0039] S413: Based on the Euclidean distance of the key point area, a preliminary spatial geometric relationship is established, the position is adjusted by the difference in regional centroids, and the error is gradually expanded to adjacent areas for iterative optimization to generate globally adjusted model point cloud coordinate data.

[0040] As a further solution of the present invention, the steps for obtaining the optimized BIM building surface coordinate data are specifically as follows:

[0041] S421: Based on the globally adjusted model point cloud coordinate data, by comparing the distance between each point cloud point and the nearest point in the reference point cloud, evaluating the overall error level, marking the point cloud area with errors, and obtaining the point cloud error analysis result;

[0042] S422: Based on the point cloud error analysis results, combined with the spatial geometric relationship and local smoothness characteristics of adjacent points, the overall transformation matrix is ​​updated point by point, and the error distribution is re-iterated until the overall error converges to the error threshold range, thereby generating optimized BIM building surface coordinate data.

[0043] A CAD and BIM model coordinate automatic conversion system based on coordinate mapping, the CAD and BIM model coordinate automatic conversion system based on coordinate mapping is used to execute the above-mentioned CAD and BIM model coordinate automatic conversion method based on coordinate mapping, the system comprises:

[0044] The 2D to 3D mapping module constructs an initial 2D triangular mesh based on the 2D coordinates of the CAD building inputted from the architectural drawings, extracts the key geometric feature points of the building, maps the 2D mesh to the 3D coordinate space in combination with the building's floor height parameters and corner information, and generates the initial 3D point cloud data of the building;

[0045] The point cloud data analysis module analyzes the distribution law and change characteristics of the point cloud data based on the initial building three-dimensional point cloud data, fits and reconstructs the overall point cloud surface, and readjusts the structure and density distribution of the local grid for abnormal areas such as building corners, special-shaped facades and sudden changes in storey height to obtain optimized building surface model data;

[0046] The surface control point adjustment module extracts the control point coordinates of the surface in the building surface model data based on the optimized building surface model data, and initializes the control point weights according to the building surface gradient and curvature characteristics, and adjusts the control point weights for abnormal building form areas to generate a parametric building surface structure;

[0047] The key point area selection module selects the key point area based on the parametric surface structure of the building according to the control point weight, establishes the rotation and translation relationship, and takes the area where the rotation and translation relationship is established first as the constraint reference to obtain the selected key point area;

[0048] The iterative optimization alignment module gradually expands the reference range to other point cloud areas based on the selected key point areas, performs iterative optimization alignment, and generates optimized BIM building surface coordinate data.

[0049] Compared with the prior art, the advantages and positive effects of the present invention are:

[0050] In the present invention, a high-quality initial triangular mesh is constructed by the Delaunay triangulation algorithm to accurately capture the coordinate information of sparse locations, and combined with the Poisson surface reconstruction technology, the point cloud in the sparse area is globally fitted and smoothed, thereby achieving density compensation and precision improvement of the coordinate point distribution. This optimization method effectively alleviates the problem of model accuracy loss in complex scenes such as building corners, irregular spaces, and floor height changes, and significantly improves the geometric expression quality of the three-dimensional model. The NURBS surface fitting algorithm is used to describe the building surface in a refined manner. By adjusting the control points and weights, the curvature abnormalities or steep areas are optimized, and the smooth transition and high-precision reconstruction of the surface are achieved, thereby enhancing the structural continuity and visual effect of the model. The iterative closest point algorithm is used to gradually align the model point cloud and the reference point cloud after the parameter update, and the geometric and topological consistency of the changed model is ensured by repeatedly calculating the optimal rigid transformation matrix. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 It is a schematic diagram of the main steps of the present invention;

[0052] Figure 2 A flowchart of extracting key geometric feature points of a building according to the present invention;

[0053] Figure 3 A flowchart of obtaining initial building three-dimensional point cloud data for the present invention;

[0054] Figure 4 This is a flow chart of fitting and reconstructing the entire point cloud surface according to the present invention;

[0055] Figure 5 A flow chart for obtaining optimized building surface model data for the present invention;

[0056] Figure 6 A flowchart for obtaining a parametric curved surface structure of a building according to the present invention;

[0057] Figure 7 A flow chart for establishing the relationship between rotation and translation for the present invention;

[0058] Figure 8 The present invention is a flow chart for obtaining optimized BIM building surface coordinate data. DETAILED DESCRIPTION

[0059] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with 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 intended to limit the present invention.

[0060] In the description of the present invention, it should be understood that the terms "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, in the description of the present invention, "multiple" means two or more, unless otherwise clearly and specifically defined.

[0061] See also Figure 1 The present invention provides a technical solution: a method for automatically converting CAD and BIM model coordinates based on coordinate mapping, comprising the following steps:

[0062] S1: Extract the CAD building 2D coordinates inputted with reference to the building drawings, construct the initial 2D triangular mesh through the Delaunay triangulation algorithm, obtain the side lengths and angle values ​​between the mesh vertices, analyze the adjacency relationship and boundary distribution characteristics of the mesh vertices according to the side lengths and angle values, extract the key geometric feature points of the building according to the boundary distribution characteristics, use the key geometric feature points as the basis for generating the 3D point cloud, combine the building's floor height parameters and corner information, map the 2D mesh to the 3D coordinate space, and supplement the key feature points through interpolation operations for the sparse corners and boundary areas in the 3D coordinate space to generate the initial 3D point cloud data of the building;

[0063] S2: Based on the initial building 3D point cloud data, by calculating the gradient vector of the coordinates in the 3D point cloud data, the distribution law and change characteristics of the point cloud data are analyzed according to the gradient vector, and the Poisson surface reconstruction algorithm is used to fit and reconstruct the overall point cloud surface. For abnormal areas such as building corners, special-shaped facades and sudden changes in storey height, the connection characteristics between the points in the abnormal area and the adjacent grids are analyzed, the structure and density distribution of the local grid are readjusted, and the optimized building surface model data is output;

[0064] S3: Based on the optimized building surface model data, the control point coordinates of the surface in the building surface model data are extracted through the non-uniform rational spline surface fitting algorithm, and the control point weights are initialized according to the gradient and curvature characteristics of the building surface. For the abnormal building form area, the control point weights are adjusted to generate the architectural parametric surface structure;

[0065] S4: Based on the parametric surface structure of the building, the iterative nearest point algorithm is used to perform a preliminary global alignment between the building model point cloud after the parameter change and the reference point cloud. The key point area is selected according to the control point weight, and the Euclidean distance between the corresponding points of the model point cloud and the reference point cloud in the key point area is calculated. The rotation and translation relationship is established according to the Euclidean distance. The area where the rotation and translation relationship is established first is used as the constraint benchmark, and the benchmark range is gradually expanded to other point cloud areas. The error of all points in the building model point cloud after the parameter change and the reference point cloud is recalculated. According to the calculated error, the point pairs in the adjacent area are iteratively optimized and aligned to generate the optimized BIM building surface coordinate data;

[0066] The initial building three-dimensional point cloud data includes key geometric feature points, point cloud density distribution, and interpolation supplement results in the corner area. The optimized building surface model data includes the reconstructed continuous surface, mesh optimization results in the corner area, and gradient adjustment results in the abnormal area. The building parametric surface structure includes the control point coordinates of the surface, the control point weight distribution, and the weight adjustment results in the abnormal building form area. The optimized BIM building surface coordinate data includes the global coordinate distribution after alignment, the rotation and translation parameters of the key point area, and the error optimization results of the adjacent area.

[0067] See also Figure 2 ,The specific steps for extracting the key geometric feature points of the building are:

[0068] S111: based on the two-dimensional coordinate information in the architectural drawing, all vertex coordinates are extracted and stored as structured data, and a triangulation mesh that satisfies the maximum and minimum angle optimization is constructed to obtain the side length of the mesh and the angle of the triangle, thereby generating mesh topological structure data;

[0069] Extract the 2D coordinates of the CAD building inputted with reference to the building drawing. First, import the building drawing file through the CAD software, and use the coordinate extraction tool to extract the 2D coordinate values ​​of all vertices (including and ) is exported as a structured data table, and then the point coordinates are stored in a CSV file or database for further processing. The coordinate data is read by a programming language (such as Python) and stored in the form of a point set. Subsequently, an algorithm library based on Delaunay triangulation (such as SciPy's Delaunay function) is used to construct the initial mesh. The algorithm uses the point set as input to recursively generate a triangular mesh that satisfies the Delaunay characteristics, that is, to maximize the minimum internal angle of the triangle and avoid generating triangles that are too oblong. At the same time, the generated mesh topology includes the triangle vertex index and connection relationship. After the mesh is constructed, the geometric relationship is used to calculate the length of each edge and store it as an edge length array. At the same time, the three angles inside each triangle are calculated by the coordinate position of the point, and the angles are stored as an angle array.

[0070] S112: Based on the grid topology data, by statistically analyzing the side lengths and extracting the adjacency relationship, marking the boundary points and extracting the key geometric feature points, arranging the feature point set in the connection order, and obtaining the key point data of the building;

[0071] The adjacency relationship and boundary distribution characteristics of the mesh vertices are analyzed according to the side length and angle value. In the current building scene, the key geometric feature points can include the corner points of the building (such as the coordinate points of the four corners of the house), the boundary points with convex and concave changes (such as the vertices of the protruding balcony or the concave entrance), and the turning points with obvious building structure characteristics (such as the corner points of the wall or the starting points of the stairs). During the operation, the edge length array and the adjacency matrix are processed to locate and classify the points related to the boundary. Specifically, for the edges with side lengths exceeding the mean, their connection points may be external boundary points, and the topological information is used to further confirm the point The number of adjacent points of the triangle is calculated, and the points with fewer adjacent points are often boundary points. These points are marked as candidate boundary point sets. The turning points are screened by combining the triangle angle value, and the angles related to these points are calculated. If the angle corresponding to a point is close to a right angle (90 degrees) or an acute angle (<60 degrees), the point may be a corner point. Finally, the building plane grid is drawn with visualization tools (such as Matplotlib), and these points are marked on the grid. The accuracy of the points is verified by manual review or by combining with the original building drawings. Finally, these key geometric feature points are extracted and output as JSON files or CSV files containing point coordinates.

[0072] See also Figure 3 ,The specific steps for obtaining the initial building 3D point cloud data are:

[0073] S121: Based on the key point data of the building, the two-dimensional coordinates are associated with the floor height parameters of the building, and the corresponding height values ​​are obtained by linear superposition. At the same time, the corner information is combined to obtain the change of the corner of each floor, and the coordinate transformation is performed to generate three-dimensional space coordinate data;

[0074] ; In addition, for architectural features with corner information, the corner direction is calculated through the connection relationship between key points and projected into three-dimensional space. For example, the corner change of each layer is calculated through the angle between the vectors of key points, which is used as a reference parameter for subsequent point cloud generation. The process of calculating the corner change of each layer includes arranging these points according to the building boundary or structure order based on the key points extracted from each layer, and determining the connecting line segments between adjacent key points to form the boundary contour of each layer. For every two adjacent line segments, the direction vector of the line segment is calculated using the coordinates of the points, and then the angle between the two line segments is analyzed through the direction change of the vector. This angle is the corner value of the position. Repeat the above process to calculate the position and value of all corners of the layer. If there are obvious geometric turns or boundary changes at certain positions, these points are recorded as feature points of corner changes, and finally combined with the key point coordinate data of each layer to output as a three-dimensional point cloud data file.

[0075] S122: Capture sparse area points in the three-dimensional space coordinate data, extract point density information, add supplementary points to the sparse area and the boundary area by interpolation, and generate initial building three-dimensional point cloud data after re-normalization;

[0076] For the sparse areas at corners and boundaries in the three-dimensional coordinate space, the key feature points are supplemented through interpolation operations. First, the extracted three-dimensional key point cloud data is analyzed, and the sparse areas are identified by calculating the distribution density of the points in the point cloud. The density calculation method is to count the number of points in a unit volume, and mark the areas with point density lower than a certain threshold as sparse areas; for these sparse areas, supplementary points are generated through three-dimensional interpolation methods (such as the scipy.interpolate.griddata function based on cubic spline interpolation). The interpolation operation uses existing key points as input and fits continuous surfaces in space to ensure that the newly added points are consistent with the existing key points in geometry and topology; for the building boundary area, according to the distribution characteristics of the boundary points, linear interpolation or parametric curve fitting is used to generate supplementary points, gradually increasing the integrity of the point cloud data, and finally the supplemented point cloud data is renormalized and output as a formatted file.

[0077] See also Figure 4 , the specific steps for fitting and reconstructing the overall point cloud surface are:

[0078] S211: Based on the initial building 3D point cloud data, the formula is:

[0079] ;

[0080] Calculate the gradient vector , generate gradient vector data;

[0081] in, It represents the distribution characteristics of points in three-dimensional space, which can be associated with the point cloud density distribution. It is generated by the distribution of point cloud data using interpolation or kernel density estimation algorithms. For example, by selecting a local area, counting the number of points in a unit volume, and fitting the point density distribution to a continuous function using the Gaussian kernel method. , :Respectively represent The rate of change in the x, y, and z directions is calculated by numerical differentiation or finite difference methods, for example, given the spacing between adjacent points , using the formula: Calculate partial derivatives. Similar methods apply to the y and z directions. For example, for a point (1,1,1), if the scalar value The neighboring points of are (1.1,1,1), and the scalar values ​​are and , then the partial derivative is approximately , used to construct the gradient vector, which is the basic measure of scalar change, Indicates the coordinate position of a point in three-dimensional space, which is directly collected from point cloud data.

[0082] Assuming a scalar-valued function , which is obtained by fitting the point cloud density or other distribution characteristics, and taking the partial derivative in the x direction: , find the partial derivative in the y direction: , find the partial derivative in the z direction: , at the point (1,1,1): , construct the gradient vector: The results show that the gradient vector at the display point (1,1,1) is .

[0083] S212: Based on the gradient vector data, the distribution law and change characteristics of the point cloud data are analyzed, the feature information of the key area is extracted, the overall point cloud surface is fitted and reconstructed, and a building facade surface model is generated;

[0084] According to the gradient vector, the distribution law and change characteristics of the point cloud data are analyzed, and the calculation results of the point cloud gradient vector in paragraph 1 are extracted. For example, the gradient vector at point (1, 1, 1) is , which can reflect the surface change characteristics around the point. When analyzing the distribution law of point cloud data, first calculate the gradient vector for all points in the point cloud data. The size of the gradient can be used to identify areas with drastic surface changes. For example, larger gradient values ​​correspond to corners, mutation surfaces or boundary characteristics. Then, statistical analysis tools (such as point density distribution maps or gradient histograms) are used to display the change law of point cloud data. For building boundaries or corner areas, feature lines or feature surfaces are extracted by identifying the continuous change trend of the gradient direction. For overall surface fitting, the Poisson surface reconstruction algorithm is used. The point cloud data and its normal vector are input into the reconstruction tool (such as the Poisson function in Open3D). The tool will generate a continuous surface equation based on the gradient information. For local abnormal areas that appear in the fitting (such as sparse data or discontinuous gradient direction), the mesh density is adjusted through local interpolation or topology optimization to complete the reconstruction process.

[0085] See also Figure 5 ,The specific steps for obtaining the optimized building surface model data are:

[0086] S221: Based on the data in the building facade surface model, extract the points in the building corners, special-shaped facades and storey height mutation areas, analyze the connection relationship between the points and adjacent grids, as well as the connection length and angle value to determine the structural characteristics, classify and mark the points and grid information in the abnormal area, and establish the basic feature data of the abnormal area;

[0087] For building corners, irregular facades, and abnormal areas with sudden height changes, we use the gradient vector The characteristic areas obtained by analysis, such as points with larger gradient vectors, usually correspond to corners or areas with drastic changes in facades. These points are extracted and their connection relationship with adjacent grids is analyzed. The specific operations include: first, the grid structure generated by the point cloud data is parsed, the adjacency relationship of each point is extracted, and the connection length and angle value between the points are used to judge the structural characteristics of the local area. For example, areas with short connecting edges but large angles may correspond to sharp corners of buildings; for irregular facades, the rate of change of the normal vector direction on the point cloud surface is analyzed to mark the points with drastic changes and the grid structure around them; for areas with sudden changes in floor height, the height difference between adjacent grids is located and related points are extracted through the gradient distribution analysis of the z-coordinate value of the point cloud. Based on the above analysis results, the points and grid connection characteristics of the abnormal areas are classified and marked.

[0088] S222: Based on the basic feature data of the abnormal area, the connection relationship of the mesh vertices and the mesh structure of the special-shaped facade are adjusted to generate smooth mesh vertices in the area of ​​sudden height changes. After reconnecting the mesh, the overall quality is verified to obtain optimized building surface model data;

[0089] Re-adjust the structure and density distribution of the local mesh, and optimize the mesh structure by combining the abnormal area point set and its adjacent mesh characteristics analyzed in paragraph 1. Specifically, for the area marked as a corner, by adjusting the connection relationship of the mesh vertices, give priority to retaining the edges with larger angles and appropriately encrypt the surrounding meshes; for the area of ​​the irregular facade, by locally re-segmenting the mesh, generate relatively uniform small mesh units to adapt to the complex geometric characteristics; for the area with sudden changes in floor height, combine the height difference of the point cloud z coordinates, generate additional mesh vertices in the transition area by interpolation method, and reconnect with the surrounding meshes to smooth the structure; after the optimization is completed, check the uniformity and topological rationality of the overall mesh through the triangular mesh quality evaluation algorithm, including calculating the area of ​​the triangle vertex coordinates to determine whether the size of the triangle is uniform. Calculate each internal angle according to the side length of the triangle to check whether there are triangles that are too sharp or too blunt. Calculate the ratio of the longest side to the shortest side of the triangle to evaluate the degree of distortion of the triangle. According to the above calculated properties, define the quality standard of the triangular mesh, and also include: setting a reasonable range of internal angles (such as 20°-120°) and counting the number of triangles that exceed the range. Calculate the average and standard deviation of all triangle areas to determine the uniformity of the mesh. Set an upper limit for the side length ratio (e.g., 3:1) and count the number of triangles that exceed this value. Summarize the evaluation results of all triangles, count the proportion of triangles with quality problems in the mesh, determine whether the overall quality of the mesh meets the requirements, and generate an optimized building surface model.

[0090] See also Figure 6 , the specific steps for obtaining the parametric surface structure of the building are:

[0091] S311: Based on the optimized building surface model data, evenly divide the surface area, extract geometric feature points on the surface as initial control points, adjust the positions of the control points, and generate control point coordinate data;

[0092] The coordinates of the control points of the surface in the architectural surface model data are extracted by the non-uniform rational spline (NURBS) surface fitting algorithm. First, the optimized surface model data is evenly divided, and the initial control points are extracted using the geometric information of the segmentation points on the surface. These segmentation points are usually selected as discrete points or feature points on the surface isoparametric lines. By analyzing the boundaries, mutation areas or corner areas of the surface, points that can describe the geometric characteristics are preferentially extracted as control points. Next, according to the requirements of the NURBS fitting algorithm, the extracted initial point set is processed, and the control point sequence is generated using the cubic B-spline function to ensure that the control point sequence has a certain degree of smoothness and uniformity; then, the position of the control point is adjusted by evaluating the surface fitting error to ensure that the fitted surface can match the original surface model.

[0093] S312: Based on the control point coordinate data, the formula is used:

[0094] ;

[0095] Calculate the The weight of the control point , get the control point weight information;

[0096] in, It is The curvature value of a control point indicates the local curvature of the surface at that point. The curvature value is obtained through geometric analysis of the building surface model data. For example: for smooth surfaces, the curvature is automatically calculated using the derivative value; for discrete points, the triangular mesh method is used to calculate the change of the normal vector of each point and derive the curvature value. It is The modulus of the gradient vector at a control point indicates the rate of change of the surface at the control point.

[0097] Assume that the surface equation at a control point is , select point , calculate the gradient vector: , calculate the modulus: , calculate the curvature value : Assumption point The curvature value at , calculate the weight value The results show that the weight value of the current control point .

[0098] S313: Based on the control point weight information, the control point area is weighted, the local fitting effect is optimized by redistributing the weight, and the overall surface is dynamically optimized to generate a parametric surface structure of the building;

[0099] Combined with the control point weight results, for example, at point (1,1,1), the weight value , indicating that the point has little influence on the fitted surface; if the weight of a control point is low, it may mean that the area where it is located is a complex geometric area with large gradient and curvature, and the surface fitting is optimized by weight adjustment. The specific adjustment process is as follows: Mark low-weight areas: Extract a set of control points with weight values ​​less than a certain threshold (such as 0.2). These points are usually located in areas with high curvature or drastic gradient changes, such as corners or mutation areas. Adjust weight distribution: Adjust the weight value of the marked area, for example, increase the weight of the boundary and corner areas to enhance the control of local geometric forms, and reduce the weight of the transition area to smooth the overall surface structure. Dynamic optimization process: The adjusted weight value is optimized by the surface fitting error analysis function. The fitting error function can be obtained by calculating the Euclidean distance between the fitted surface and the original surface point set. Generate parameterized surface: Use the adjusted control point weights to re-fit and generate architectural parametric surfaces, and save them in file formats (such as IGES or STEP formats) for architectural model analysis and design. For example, for the weight value After the weight of the point is adjusted to 0.3, the surface fitting error is reduced by 10%, indicating that the adjustment of the weight enhances the influence of the point on the local morphology of the surface and optimizes the matching effect of the parameterized surface.

[0100] See also Figure 7 , the steps to establish the rotation and translation relationship are as follows:

[0101] S411: extracting the three-dimensional coordinates of the control points in the building surface based on the building parametric surface structure, adjusting the control point coordinates and evaluating the errors through operations of segmenting the surface, extracting feature points and fitting the control point sequence, and generating the three-dimensional coordinate data of the control points;

[0102] First, extract the 3D coordinates corresponding to each point in the parameterized surface to generate an initial point set containing the model point cloud data. Second, load the reference point cloud data and use the KD tree structure to quickly establish the point cloud index relationship and calculate the initial neighboring point pairs between the model point cloud and the reference point cloud. According to the control point weights, mark the key point area and give priority to selecting points with higher weights for registration. For example, points with high weights are usually distributed in corners or boundary areas with obvious features. These points can be highlighted by weighting functions to highlight their registration importance. In the process of global preliminary alignment, the rigid transformation method is used to estimate the rotation matrix and translation vector, and they are applied to the model point cloud to make it as close to the reference point cloud as possible.

[0103] S412: Based on the three-dimensional coordinate data of the control point, the formula is used:

[0104] ;

[0105] Calculate the midpoint of the model point cloud With the reference point cloud midpoint The Euclidean distance between , get the Euclidean distance in the key point area;

[0106] in, is the midpoint of the model point cloud The three-dimensional coordinate values ​​are extracted from the parametric surface of the building model or the model point cloud. The point cloud file is usually in Format storage, is the midpoint of the reference point cloud The three-dimensional coordinate values ​​are directly extracted from the reference point cloud data. The reference point cloud usually comes from the point cloud file generated by a scanner or measuring equipment. The corresponding point pairs between the points in the model point cloud and the points in the reference point cloud are matched by the nearest neighbor search algorithm (such as KD tree structure). The closest point to the reference point cloud pair.

[0107] For example, if the model point cloud keypoints: , corresponding points of the reference point cloud: , point to point For example:

[0108] ;

[0109] ;

[0110] Calculate the Euclidean distance of another pair of points, pair 2: :

[0111] ;

[0112] Point 3: :

[0113] ;

[0114] The analysis results show that for point pair 1, the error is large, indicating that the initial alignment deviation is large. The errors of point pairs 2 and 3 are small and can be used as the initial reference area for rotation and translation relationship fitting.

[0115] S413: Based on the Euclidean distance of the key point area, a preliminary spatial geometric relationship is established, the position is adjusted by the difference in the regional centroid, and the error is gradually extended to the adjacent area for iterative optimization to generate the globally adjusted model point cloud coordinate data;

[0116] According to the calculated Euclidean distance results, it is assumed that the point pairs in the key point area Contains the following point sets: Model point cloud key points: ; Corresponding points of reference point cloud: The Euclidean distance results are: Corresponding point 1: , corresponding to point 2: , corresponding point 3: Select the Euclidean distance less than a certain threshold (such as ) as the reference area, that is, point pair 2 . Establish the rotation and translation relationship and calculate the centroid of the model point cloud reference area:

[0117] ;

[0118] ;

[0119] Reference point cloud fiducial area centroid:

[0120] ;

[0121] ;

[0122] in, is the number of point pairs within the reference region, are the average position coordinates of the reference area points, and are the centroids of the reference areas of the model point cloud and the reference point cloud;

[0123] Point vector after removing the centroid:

[0124] Model point cloud vector :

[0125] ;

[0126] Reference point cloud vector :

[0127] ;

[0128] When using a single reference point, the rotation matrix is ​​the identity matrix:

[0129] ;

[0130] in, is the rotation matrix from the model point cloud to the reference point cloud, is the identity matrix;

[0131] Translation Vector Calculated by the difference of the centroids of two points:

[0132] ;

[0133] Apply rotation and translation relationships:

[0134] Apply a rotation and translation relationship to all model points:

[0135] ;

[0136] in, is the coordinate of the model point cloud after alignment, is the original coordinate point set of the model point cloud;

[0137] For example, for the point :

[0138] ;

[0139] Based on the preliminary transformation results, the Euclidean distance between the transformed point cloud and the reference point cloud is recalculated, and the reference range is extended to other point pairs (such as ), and optimize the rotation and translation parameters by the least squares method. Repeat the above steps to gradually reduce the global error until the error converges. Finally, the overall aligned model point cloud coordinates are output to generate the adjusted BIM building surface coordinate data.

[0140] See also Figure 8 , the steps for obtaining the optimized BIM building surface coordinate data are as follows:

[0141] S421: Based on the globally adjusted model point cloud coordinate data, by comparing the distance between each point cloud point and the nearest point in the reference point cloud, the overall error level is evaluated, and the point cloud area with errors is marked to obtain the point cloud error analysis result;

[0142] The area where the rotation and translation relationship is established first is used as the constraint reference. Combined with the point pair Euclidean distance results calculated in paragraph 2, point pairs with smaller errors in the key point area are selected as the reference area, such as and A set of point pairs. After the reference area defines the preliminary rotation matrix and translation vector, the transformation relationship is applied to all points of the model point cloud to generate a preliminary aligned model point cloud. The calculation of the global point cloud error is achieved by comparing the distance between each point cloud point and its corresponding reference point, that is, for each point in the model point cloud, find the closest point in the reference point cloud as the matching point, record the distance values ​​of all point pairs, and perform statistical processing on these distance values, such as calculating their mean and standard deviation, to evaluate the overall error level. For point cloud areas with large errors, mark their adjacent ranges and include them in subsequent optimization targets, further expand the reference area, and repeat the above process until the reference area covers all point cloud data.

[0143] S422: Based on the point cloud error analysis results, combined with the spatial geometric relationship and local smoothness characteristics of adjacent points, the overall transformation matrix is ​​updated point by point, and the error distribution is re-iterated until the overall error converges to the error threshold range, generating optimized BIM building surface coordinate data;

[0144] First, select the point cloud area in the extended reference range, obtain the global error distribution of these points, analyze the error value distribution point by point, and select the point pair with the largest error as the optimization target. For each optimization target point pair, use the spatial geometric relationship and local smoothness characteristics of adjacent points to calculate the optimal rotation matrix and translation vector with the reference point cloud, update the overall transformation matrix point by point, and complete an iteration. After each iteration, recalculate the error distribution between the model point cloud and the reference point cloud, and repeat the above process until the overall error converges to the error threshold range (such as the error of all point pairs is less than 1mm). Finally, output the optimized model point cloud 3D coordinate data.

[0145] The automatic coordinate conversion system between CAD and BIM models based on coordinate mapping is used to execute the automatic coordinate conversion method between CAD and BIM models based on coordinate mapping. The system includes:

[0146] The 2D to 3D mapping module constructs an initial 2D triangular mesh based on the 2D coordinates of the CAD building inputted from the architectural drawings, extracts the key geometric feature points of the building, maps the 2D mesh to the 3D coordinate space in combination with the building's floor height parameters and corner information, and generates the initial 3D point cloud data of the building;

[0147] The point cloud data analysis module analyzes the distribution law and change characteristics of the point cloud data based on the initial building 3D point cloud data, reconstructs the overall point cloud surface by fitting, and readjusts the structure and density distribution of the local grid for abnormal areas such as building corners, irregular facades, and sudden changes in storey height to obtain optimized building surface model data;

[0148] The surface control point adjustment module extracts the control point coordinates of the surface in the building surface model data based on the optimized building surface model data, and initializes the control point weights according to the gradient and curvature characteristics of the building surface. For the abnormal building form area, the control point weights are adjusted to generate the building parametric surface structure.

[0149] The key point area selection module is based on the parametric surface structure of the building. It selects the key point area according to the weight of the control point, establishes the rotation and translation relationship, and takes the area where the rotation and translation relationship is established first as the constraint benchmark to obtain the selected key point area;

[0150] Based on the selected key point area, the iterative optimization alignment module gradually expands the benchmark range to other point cloud areas, performs iterative optimization alignment, and generates optimized BIM building surface coordinate data.

[0151] The above are only preferred embodiments of the present invention and are not intended to limit the present invention in other forms. Any technician familiar with the profession may use the technical contents disclosed above to change or modify them into equivalent embodiments with equivalent changes and apply them to other fields. However, any simple modification, equivalent change and modification made to the above embodiments based on the technical essence of the present invention without departing from the technical solution of the present invention still falls within the protection scope of the technical solution of the present invention.

Claims

1. A method for automatic conversion of CAD and BIM model coordinates based on coordinate mapping, characterized in that: The following steps are involved: Extract the CAD building 2D coordinates inputted with reference to the building drawings, construct the initial 2D triangular mesh, extract the key geometric feature points of the building, combine the building's floor height parameters and corner information, map the 2D mesh to the 3D coordinate space, and generate the initial 3D point cloud data of the building; Based on the initial building three-dimensional point cloud data, the distribution law and change characteristics of the point cloud data are analyzed, the overall point cloud surface is fitted and reconstructed, and the building facade surface model is generated. For building corners, special-shaped facades and abnormal areas with sudden changes in storey height, the structure and density distribution of the local grid are readjusted, and optimized building surface model data is output; The steps for obtaining the optimized building surface model data are specifically as follows: Based on the data in the curved surface model of the building facade, points in the building corners, special-shaped facades and sudden height changes are extracted, the connection relationship between the points and adjacent grids, as well as the connection length and angle value are analyzed to determine the structural characteristics, the points and grid information in the abnormal area are classified and marked, and the basic feature data of the abnormal area is established; Based on the basic feature data of the abnormal area, the connection relationship of the mesh vertices and the mesh structure of the special-shaped facade are adjusted to generate smooth mesh vertices in the area of ​​sudden height changes, and the overall quality is verified after reconnecting the mesh to obtain optimized building surface model data; Based on the optimized building surface model data, the control point coordinates of the surface in the building surface model data are extracted, and the control point weights are initialized according to the gradient and curvature characteristics of the building surface. For the abnormal building form area, the control point weights are adjusted to generate the building parameterized surface structure; Based on the parametric surface structure of the building, key point areas are selected according to the control point weights, and rotation and translation relationships are established. The areas where rotation and translation relationships are established first are used as constraint benchmarks, and the benchmark range is gradually expanded to other point cloud areas. Iterative optimization alignment is performed to generate optimized BIM building surface coordinate data.

2. The method for automatic conversion of CAD and BIM model coordinates based on coordinate mapping according to claim 1, characterized in that: The steps for extracting the key geometric feature points of the building are specifically as follows: Based on the two-dimensional coordinate information in the architectural drawings, all vertex coordinates are extracted and stored as structured data. By constructing a triangulated mesh that satisfies the maximum and minimum angle optimization, the side length of the mesh and the angle of the triangle are obtained to generate mesh topological structure data. Based on the grid topology data, by statistically analyzing the side lengths and extracting adjacency relationships, marking boundary points and extracting key geometric feature points, the feature point set is sorted in connection order to obtain key point data of the building.

3. The method for automatic conversion of CAD and BIM model coordinates based on coordinate mapping according to claim 2 is characterized in that: The steps for obtaining the initial building three-dimensional point cloud data are specifically as follows: Based on the key point data of the building, the two-dimensional coordinates are associated with the floor height parameters of the building, and the corresponding height values ​​are obtained by linear superposition. At the same time, the corner information is combined to obtain the change of the corner of each floor, and the coordinate transformation is performed to generate three-dimensional space coordinate data; The sparse area points in the three-dimensional space coordinate data are captured, and the point density information is extracted. Supplementary points are added to the sparse area and the boundary area by interpolation, and after re-normalization, the initial building three-dimensional point cloud data is generated.

4. The method for automatic conversion of CAD and BIM model coordinates based on coordinate mapping according to claim 3 is characterized in that: The acquisition steps of fitting and reconstructing the whole point cloud surface are specifically as follows: Based on the initial building 3D point cloud data, the formula is adopted: ; Calculate the gradient vector , generate gradient vector data; in, represents the distribution of points in three-dimensional space, :Respectively represent The rate of change in the x, y, and z directions, Represents the coordinate position of a point in three-dimensional space; Based on the gradient vector data, the distribution law and change characteristics of the point cloud data are analyzed, the feature information of the key area is extracted, the overall point cloud surface is fitted and reconstructed, and the building facade surface model is generated.

5. The method for automatic conversion of CAD and BIM model coordinates based on coordinate mapping according to claim 1, characterized in that: The steps for obtaining the architectural parametric surface structure are specifically as follows: Based on the optimized building surface model data, the surface area is evenly divided, geometric feature points on the surface are extracted as initial control points, and the positions of the control points are adjusted to generate control point coordinate data; Based on the control point coordinate data, the formula is adopted: ; Calculate the The weight of the control point , get the control point weight information; in, It is The curvature value of the control point, It is The modulus of the gradient vector at each control point; Based on the control point weight information, the control point area is weighted, the local fitting effect is optimized by redistributing the weights, and the overall surface is dynamically optimized to generate a parametric architectural surface structure.

6. The method for automatic conversion of CAD and BIM model coordinates based on coordinate mapping according to claim 5, characterized in that: The steps for establishing the rotation and translation relationship are specifically as follows: Based on the architectural parametric surface structure, extract the three-dimensional coordinates of the control points in the architectural surface, adjust the coordinates of the control points and evaluate the errors by segmenting the surface, extracting the feature points and fitting the control point sequence, and generate the three-dimensional coordinate data of the control points; Based on the three-dimensional coordinate data of the control point, the formula is adopted: ; Calculate the midpoint of the model point cloud With the reference point cloud midpoint The Euclidean distance between , get the Euclidean distance in the key point area; in, is the midpoint of the model point cloud The three-dimensional coordinate values ​​of is the midpoint of the reference point cloud The three-dimensional coordinate values ​​of It is the corresponding point pair composed of the points in the model point cloud and the points in the reference point cloud; Based on the Euclidean distance of the key point area, a preliminary spatial geometric relationship is established, the position is adjusted by the difference in regional centroids, and the error is gradually extended to adjacent areas for iterative optimization to generate globally adjusted model point cloud coordinate data.

7. The method for automatic conversion of CAD and BIM model coordinates based on coordinate mapping according to claim 6, characterized in that: The steps for obtaining the optimized BIM building surface coordinate data are specifically as follows: Based on the globally adjusted model point cloud coordinate data, by comparing the distance between each point cloud point and the nearest point in the reference point cloud, the overall error level is evaluated, and the point cloud area with errors is marked to obtain the point cloud error analysis result; Based on the point cloud error analysis results, combined with the spatial geometric relationship and local smoothness characteristics of adjacent points, the overall transformation matrix is ​​updated point by point, and the error distribution is re-iterated until the overall error converges to the error threshold range, thereby generating optimized BIM building surface coordinate data.

8. The CAD and BIM model coordinate automatic conversion system based on coordinate mapping is characterized by: The system comprises: The 2D to 3D mapping module constructs an initial 2D triangular mesh based on the 2D coordinates of the CAD building inputted from the architectural drawings, extracts the key geometric feature points of the building, maps the 2D mesh to the 3D coordinate space in combination with the building's floor height parameters and corner information, and generates the initial 3D point cloud data of the building; The point cloud data analysis module analyzes the distribution law and change characteristics of the point cloud data based on the initial building three-dimensional point cloud data, fits and reconstructs the overall point cloud surface, generates a building facade surface model, and readjusts the structure and density distribution of the local grid for building corners, special-shaped facades and abnormal areas with sudden changes in storey height to obtain optimized building surface model data; The steps for obtaining the optimized building surface model data are specifically as follows: Based on the data in the curved surface model of the building facade, points in the building corners, special-shaped facades and sudden height changes are extracted, the connection relationship between the points and adjacent grids, as well as the connection length and angle value are analyzed to determine the structural characteristics, the points and grid information in the abnormal area are classified and marked, and the basic feature data of the abnormal area is established; Based on the basic feature data of the abnormal area, the connection relationship of the mesh vertices and the mesh structure of the special-shaped facade are adjusted to generate smooth mesh vertices in the area of ​​sudden height changes, and the overall quality is verified after reconnecting the mesh to obtain optimized building surface model data; The surface control point adjustment module extracts the control point coordinates of the surface in the building surface model data based on the optimized building surface model data, and initializes the control point weights according to the building surface gradient and curvature characteristics, and adjusts the control point weights for abnormal building form areas to generate a parametric building surface structure; The key point area selection module selects the key point area based on the parametric surface structure of the building according to the control point weight, establishes the rotation and translation relationship, and takes the area where the rotation and translation relationship is established first as the constraint reference to obtain the selected key point area; The iterative optimization alignment module gradually expands the reference range to other point cloud areas based on the selected key point areas, performs iterative optimization alignment, and generates optimized BIM building surface coordinate data.

Citation Information

Patent Citations

  • NURBS curved surface finite element plate shell mesh generation method and computer implementation system

    CN110796735A

  • Free-form surface structure integrated form creating method based on isogeometric analysis method

    CN114491769A