A method and system for geometric topology-based three-dimensional model version comparison
By using equal-step sampling and manifold clustering algorithms to process 3D model point cloud data, and combining the initial coordinate system and three-plane matching method to achieve model alignment, this method solves the shortcomings of existing 3D model comparison methods in terms of spatial benchmark unification and difference identification, and achieves high-precision and reliable version comparison results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-02
- Publication Date
- 2026-04-14
AI Technical Summary
Existing 3D model comparison methods lack effective means to ensure spatial benchmark consistency during model alignment, leading to deviations in comparison results. They are not detailed and comprehensive enough when comparing differences, making it difficult to accurately identify subtle geometric and topological changes between model versions, and thus failing to meet the high precision and high reliability requirements of mechanical CAD part model design.
A uniform step sampling mechanism and manifold clustering algorithm are used to process the point cloud data of the 3D model in an equal manner. The model alignment is achieved by combining the initial coordinate system and the three-face matching method. The spatial reference is ensured by updating the coordinate system. The surface identifiers and summary information are extracted based on the unified coordinate system and compared and matched. The principle of minimizing global differences and geometric feature screening are used for accurate comparison.
It enables efficient and accurate identification of geometric and topological differences between 3D model versions, improves the accuracy and engineering practicality of comparison, provides a reliable spatial reference frame, ensures consistency of comparison benchmarks, reduces the risk of mismatch, and provides structured comparison results.
Smart Images

Figure CN121095598B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of 3D model analysis, and more specifically, to a method and system for comparing 3D model versions based on geometric topology. Background Technology
[0002] In the process of designing mechanical CAD part models, designers typically generate multiple versions of the model. To facilitate collaborative review, changes need to be manually recorded and uploaded to a platform. Manual recording relies heavily on the designer's attention and memory, making it prone to omissions and errors, resulting in inaccurate and incomplete version change information, which affects subsequent design reviews and model reuse. Furthermore, manual recording requires a significant investment of time and effort from the designer, who must not only focus on the design itself but also spend time on tedious record-keeping, increasing their workload and reducing overall design efficiency.
[0003] Therefore, the differences between different versions of the model can be obtained by comparing them. However, some existing 3D model comparison methods have many shortcomings: in the model alignment stage, there is a lack of effective means to ensure that the spatial reference of different versions of the model is consistent, which leads to deviations in the comparison results; when comparing differences, they are not detailed and comprehensive enough, and it is difficult to accurately identify the subtle geometric topological changes between model versions, which cannot meet the requirements of high precision and high reliability of version comparison for mechanical CAD part model design.
[0004] There are currently no effective solutions to the problems in the relevant technologies. Summary of the Invention
[0005] In view of this, the present invention provides a method and system for comparing versions of three-dimensional models based on geometric topology to solve the aforementioned problems.
[0006] To solve the above problems, the specific technical solution adopted by the present invention is as follows:
[0007] According to one aspect of the present invention, a method for comparing versions of three-dimensional models based on geometric topology is provided, comprising the following steps:
[0008] S1. Obtain the target 3D model and the original 3D model to be compared. Collect point cloud data of the target 3D model and the original 3D model using an equal step sampling mechanism. Then, use a manifold clustering algorithm to perform equalization processing on the point cloud data of the target 3D model and the original 3D model respectively.
[0009] S2. Establish initial coordinate systems in the target 3D model and the original 3D model after equalization processing, respectively. Using the initial coordinate systems and the three-face matching method, perform model alignment processing on the target 3D model and the original 3D model respectively. Update the initial coordinate system according to the alignment results to obtain the final coordinate system.
[0010] S3. Based on the final coordinate system, extract the face identifiers and summary information of the target 3D model and the original 3D model respectively to obtain the extraction results. Then, compare and match the target 3D model and the original 3D model based on the extraction results to obtain the 3D model version comparison results.
[0011] Preferably, the steps of acquiring the target 3D model and the original 3D model to be compared, collecting point cloud data of the target 3D model and the original 3D model using an equal-step sampling mechanism, and performing equalization processing on the point cloud data of the target 3D model and the original 3D model using a manifold clustering algorithm respectively include the following steps:
[0012] S11. For the acquired target 3D model and the original 3D model, the point cloud data is collected by the equal step sampling mechanism to obtain the target point cloud set and the original point cloud set.
[0013] S12. Calculate the distance density of each data point in the target point cloud set and the average distance density of all data points in the original point cloud set, respectively.
[0014] S13. Based on the distance density of each data point and the average distance density of all data points, the manifold clustering algorithm is used to balance the target point cloud set and the original point cloud set respectively, so as to obtain the balanced target point cloud set and the balanced original point cloud set.
[0015] Preferably, the steps of establishing initial coordinate systems in the target 3D model and the original 3D model after equalization processing, and using the initial coordinate systems in conjunction with the three-face matching method to perform model alignment processing on the target 3D model and the original 3D model, and updating the initial coordinate systems according to the alignment results to obtain the final coordinate system include the following steps:
[0016] S21. Based on the balanced target point cloud set and the balanced original point cloud set, calculate the geometric center of the target 3D model and the original 3D model respectively, and establish the initial coordinate system of the target 3D model and the original 3D model with the geometric center as the origin respectively.
[0017] S22. Based on the initial coordinate system of the target 3D model and the original 3D model, determine the axis direction of the initial coordinate system, and select at least three non-coplanar feature matching surfaces from the target 3D model and the original 3D model respectively.
[0018] S23. Using the initial coordinate system of the original 3D model as the reference coordinate system, and combining the feature matching surface, perform model alignment processing on the target 3D model and the original 3D model.
[0019] S24. Based on the model alignment results, correct the initial coordinate system parameters of the target 3D model and update them to the final coordinate system consistent with the original 3D model's reference coordinate system.
[0020] Preferably, the step of determining the axis direction of the initial coordinate system based on the initial coordinate system of the target 3D model and the original 3D model, and selecting at least three non-coplanar feature matching surfaces from the target 3D model and the original 3D model respectively, includes the following steps:
[0021] S221. Based on the initial coordinate system of the target 3D model and the original 3D model, the covariance matrix is calculated using principal component analysis, and the axis direction of the initial coordinate system is determined.
[0022] S222. Based on the balanced target point cloud set and the balanced original point cloud set, normals are estimated using the improved 3RDP method, and candidate plane sets are selected using the plane segmentation method.
[0023] S223. Based on axial constraints, select at least three non-coplanar feature matching surfaces from the candidate plane set.
[0024] Preferably, the step of estimating normals using the improved 3RDP method based on the balanced target point cloud set and the balanced original point cloud set, and then filtering the candidate plane set using the plane segmentation method, includes the following steps:
[0025] S2221. Preprocess the data points in the balanced target point cloud set and the balanced original point cloud set respectively to obtain the preprocessed balanced target point cloud set and the balanced original point cloud set.
[0026] S2222. For the preprocessed balanced target point cloud set and the balanced original point cloud set, perform initial normal estimation to obtain the initial normal vector set.
[0027] S2223. Based on the initial set of normal vectors, the key regions of the plane are segmented using the plane segmentation method, and the complete boundaries are extracted by combining the improved 3RDP to form a set of candidate planes.
[0028] Preferably, the step of segmenting the key regions of the plane using a plane segmentation method based on the initial normal vector set, and extracting the complete boundary using an improved 3RDP method to form a candidate plane set includes the following steps:
[0029] S22231. For each data point in the preprocessed balanced target point cloud set and the balanced original point cloud set, the neighborhood point set of each data point is determined by a neighborhood search strategy based on the initial normal vector set.
[0030] S22232. Based on the neighborhood point set of each data point, determine the distribution of the normal vectors in the neighborhood, and use the minimum spanning tree to correct the normal direction of the initial normal vectors to obtain the corrected set of normal vectors.
[0031] S22233. Use the corrected set of normal vectors and combine it with the region growing algorithm to segment key regions;
[0032] S22234. Calculate the centroid and principal component vectors of each key region, and construct the reference surface;
[0033] S22235. Project the data points in the key area onto the reference plane, and perform boundary point detection starting from the centroid. Select data points whose distance from the reference plane is greater than a preset threshold to form a candidate plane set.
[0034] Preferably, the step of extracting the face identifiers and summary information of the target 3D model and the original 3D model according to the final coordinate system to obtain the extraction results, and comparing and matching the target 3D model and the original 3D model according to the extraction results to obtain the 3D model version comparison results includes the following steps:
[0035] S31. Based on the final coordinate system, perform surface identification and extract summary information from the target 3D model and the original 3D model respectively;
[0036] S32. Traverse all faces of the target 3D model and perform a uniqueness check on the face identifier of each face. Determine whether there are any identical face identifiers in the current target 3D model. If so, use the principle of minimum global difference to match the most similar face in the original 3D model. Otherwise, proceed to step S33.
[0037] S33. Check if the face identifier of the face in the current target 3D model exists in the original 3D model. If it does not exist, mark the face as a new face. If it exists, check if the face identifier is unique in the original 3D model. If not, use the principle of minimum global difference to match the most similar face in the original 3D model. Otherwise, extract the summary information corresponding to the face identifier in the original 3D model and compare it with the current summary information in the target 3D model to obtain the difference comparison result.
[0038] S34. Based on the difference comparison results, determine whether there is a difference. If there is a difference, mark the face with the difference as the modified face. If there is no difference, mark the face without the difference as the unchanged face. After traversing all faces of the target 3D model, extract the face in the original 3D model that was not matched by the target 3D model and mark it as the deleted face.
[0039] S35. Integrate the newly added faces, modified faces, unchanged faces, and deleted faces to obtain the version comparison results between the target 3D model and the original 3D model.
[0040] Preferably, the process of matching the most similar faces in the original 3D model using the principle of minimizing global differences includes the following steps:
[0041] Obtain the current geometric features in the target 3D model, and based on the current geometric features, filter out a set of candidate faces in the original 3D model;
[0042] For each candidate face in the candidate face set, calculate its comprehensive difference degree with the current face of the target 3D model to obtain the comprehensive difference value between each candidate face and the current face of the target 3D model.
[0043] The face with the smallest overall difference value is selected from the candidate face set as the most similar matching face to the current face in the original 3D model.
[0044] Preferably, the step of extracting the summary information corresponding to the face identifier in the original 3D model and comparing it with the summary information of the current face in the target 3D model to obtain the difference comparison result includes the following steps:
[0045] Extract the summary information corresponding to the face identifier in the original 3D model, and perform data sequence processing on the summary information corresponding to the face identifier in the original 3D model and the summary information in the target 3D model according to the preset conversion rules;
[0046] The serialized original 3D model surface summary information and the target 3D model surface summary information are integrated and aligned.
[0047] By using a point-by-point comparison method, the differences between the integrated and aligned original 3D model surface summary information and the target 3D model surface summary information are calculated to obtain the difference comparison results.
[0048] According to another aspect of the present invention, a three-dimensional model version comparison system based on geometric topology is provided, the system comprising:
[0049] The data acquisition and processing module is used to acquire the target 3D model and the original 3D model to be compared, and to collect the point cloud data of the target 3D model and the original 3D model using an equal step sampling mechanism; and to perform equalization processing on the point cloud data of the target 3D model and the original 3D model using a manifold clustering algorithm respectively.
[0050] The model alignment module is used to establish initial coordinate systems in the target 3D model and the original 3D model after equalization, respectively. Using the initial coordinate system and the three-face matching method, the target 3D model and the original 3D model are aligned. Based on the alignment result, the initial coordinate system is updated to obtain the final coordinate system.
[0051] The model version comparison module is used to extract the face identifiers and summary information of the target 3D model and the original 3D model according to the final coordinate system, obtain the extraction results, and compare and match the target 3D model and the original 3D model according to the extraction results to obtain the 3D model version comparison results.
[0052] The beneficial effects of this invention are as follows:
[0053] 1. This invention uses a uniform step sampling mechanism and manifold clustering algorithm to process 3D model point cloud data in a balanced manner, which effectively improves data quality and consistency, laying the foundation for subsequent comparison. It uses an initial coordinate system combined with a three-face matching method to achieve accurate model alignment, and ensures spatial benchmark uniformity through coordinate system updates. Based on the unified coordinate system, it extracts face identifiers and summary information for comparison and matching, which can efficiently and accurately identify geometric and topological differences between 3D model versions. It has both robustness and practicality and can be widely used in scenarios such as 3D model version management, quality inspection and change tracking.
[0054] 2. This invention constructs an initial coordinate system with the geometric center as the origin, which can ensure the global rationality of the coordinate system origin. By combining principal component analysis with the improved 3RDP method and plane segmentation technology, it automatically selects non-coplanar feature matching surfaces, completes rigid alignment of the model based on the feature matching surfaces, and dynamically corrects the coordinate system parameters. This improves the performance of different versions of 3D models in terms of spatial reference uniformity, geometric feature matching accuracy, and automated processing efficiency, and provides a reliable spatial reference framework for 3D model version comparison.
[0055] 3. This invention extracts surface identifiers and summary information based on a unified coordinate system to ensure consistency of the comparison benchmark; it improves matching robustness through uniqueness checks and the principle of minimum global difference matching; it accurately locates the most similar matching surface by using geometric feature screening and comprehensive difference calculation, reducing the risk of mismatch; finally, through serialization processing and item-by-item comparison, it quantitatively analyzes surface-level differences and classifies and marks change types such as additions, modifications, and deletions, providing structured and interpretable comparison results for 3D model version management, significantly improving the accuracy and engineering practicality of version comparison. Attached Figure Description
[0056] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly described below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings:
[0057] Figure 1 This is a flowchart of a three-dimensional model version comparison method based on geometric topology according to an embodiment of the present invention;
[0058] Figure 2 This is a principle block diagram of a three-dimensional model version comparison system based on geometric topology according to an embodiment of the present invention;
[0059] Figure 3This is a schematic diagram illustrating the representation of a plane in a geometric topology-based three-dimensional model version comparison method according to an embodiment of the present invention.
[0060] Figure 4 This is a schematic diagram illustrating the representation of a cylindrical surface in a geometric topology-based three-dimensional model version comparison method according to an embodiment of the present invention.
[0061] Figure 5 This is a schematic diagram illustrating the representation of a conical surface in a geometric topology-based three-dimensional model version comparison method according to an embodiment of the present invention.
[0062] Figure 6 This is a schematic diagram illustrating the representation of a torus in a geometric topology-based three-dimensional model version comparison method according to an embodiment of the present invention.
[0063] Figure 7 This is a schematic diagram illustrating the representation of a spherical surface in a geometric topology-based three-dimensional model version comparison method according to an embodiment of the present invention.
[0064] Figure 8 This is a schematic diagram of the three-dimensional model version comparison process in a three-dimensional model version comparison method based on geometric topology according to an embodiment of the present invention.
[0065] In the picture:
[0066] 1. Data acquisition and processing module; 2. Model alignment module; 3. Model version comparison module. Detailed Implementation
[0067] To enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this application.
[0068] According to an embodiment of the present invention, a method and system for comparing versions of three-dimensional models based on geometric topology are provided.
[0069] The present invention will now be further described in conjunction with the accompanying drawings and specific embodiments, such as... Figure 1 As shown, according to an embodiment of the present invention, a method for comparing versions of a three-dimensional model based on geometric topology is provided, comprising the following steps:
[0070] S1. Obtain the target 3D model and the original 3D model to be compared. Collect point cloud data of the target 3D model and the original 3D model using an equal step sampling mechanism. Then, use a manifold clustering algorithm to perform equalization processing on the point cloud data of the target 3D model and the original 3D model respectively.
[0071] As a preferred embodiment, the steps of acquiring the target 3D model and the original 3D model to be compared, collecting point cloud data of the target 3D model and the original 3D model using an equal-step sampling mechanism, and performing equalization processing on the point cloud data of the target 3D model and the original 3D model using a manifold clustering algorithm include the following steps:
[0072] S11. For the acquired target 3D model and the original 3D model, the point cloud data is collected by the equal step sampling mechanism to obtain the target point cloud set and the original point cloud set.
[0073] It should be noted that constant-step sampling is a method of collecting data points on the surface of a 3D model at fixed intervals. This is achieved by setting a fixed step size along each coordinate axis of the 3D model, and then uniformly selecting points along the grid lines or a specific path on the model surface at these step sizes. For example, the step size set in the X-axis direction is Δ... x The Y-axis direction is Δ y The Z-axis direction is Δ z Then, starting from a starting point of the model, according to Δ x Δ y Δ z Points are selected sequentially on the model surface at intervals until the entire model surface is covered. For both the acquired target 3D model and the original 3D model, sampling is performed on the model surface starting from a model vertex or a pre-defined reference point, following a set step size. During sampling, the 3D coordinate information of each sampling point is recorded. All points collected from the target 3D model are combined into a target point cloud set, and all points collected from the original 3D model are combined into an original point cloud set.
[0074] S12. Calculate the distance density of each data point in the target point cloud set and the average distance density of all data points in the original point cloud set, respectively.
[0075] Specifically, distance density is a metric used to describe the density of data points surrounding each point in point cloud data. For a given point... p In a point cloud set, its distance density can be calculated by measuring the number of other points within a certain neighborhood of a given point, or the distance between these points and the given point. p The distance relationship is used to determine the distance density. After obtaining the distance density of each data point, the average distance density of all data points in the target point cloud set and the original point cloud set is calculated to obtain the average distance density of all data points.
[0076] S13. Based on the distance density of each data point and the average distance density of all data points, the manifold clustering algorithm is used to balance the target point cloud set and the original point cloud set respectively, so as to obtain the balanced target point cloud set and the balanced original point cloud set.
[0077] It should be noted that manifold clustering is a clustering method based on the data manifold structure. This algorithm analyzes the local geometric relationships and similarities between data points, grouping data points with similar characteristics together. It guides the clustering process by using the distance density and average distance density of each data point as feature information, specifically including the following steps:
[0078] Based on the difference between the distance density of each data point and the average distance density, the data points are divided into different categories or clusters to obtain the clustering results;
[0079] Based on the clustering results, the point cloud set is adjusted by methods such as resampling, interpolation, or deleting some data points to achieve a relatively balanced number of data points in each cluster, or to make the data distribution of the entire point cloud set more uniform, thus obtaining a balanced point cloud set.
[0080] S2. Establish initial coordinate systems in the target 3D model and the original 3D model after equalization processing, respectively. Using the initial coordinate systems and the three-face matching method, perform model alignment processing on the target 3D model and the original 3D model respectively. Update the initial coordinate system according to the alignment results to obtain the final coordinate system.
[0081] In a preferred embodiment, the steps of establishing initial coordinate systems in the target 3D model and the original 3D model after equalization processing, and using the initial coordinate systems in conjunction with the three-face matching method to perform model alignment processing on the target 3D model and the original 3D model, and updating the initial coordinate systems according to the alignment results to obtain the final coordinate system include the following steps:
[0082] S21. Based on the balanced target point cloud set and the balanced original point cloud set, calculate the geometric center of the target 3D model and the original 3D model respectively, and establish the initial coordinate system of the target 3D model and the original 3D model with the geometric center as the origin respectively.
[0083] It's important to note that the geometric center is a key reference point for the 3D model in space, representing its average position within that space. For point cloud data, the geometric center is the location of the average coordinates of all data points. After determining the geometric center, the right-hand rule is used to establish a 3D Cartesian coordinate system.
[0084] S22. Based on the initial coordinate system of the target 3D model and the original 3D model, determine the axis direction of the initial coordinate system, and select at least three non-coplanar feature matching surfaces from the target 3D model and the original 3D model respectively.
[0085] In a preferred embodiment, the step of determining the axis direction of the initial coordinate system based on the initial coordinate system of the target 3D model and the original 3D model, and selecting at least three non-coplanar feature matching surfaces from the target 3D model and the original 3D model respectively, includes the following steps:
[0086] S221. Based on the initial coordinate system of the target 3D model and the original 3D model, the covariance matrix is calculated using principal component analysis, and the axis direction of the initial coordinate system is determined.
[0087] It should be noted that for the equilibrium target point cloud set and the equilibrium original point cloud set of the target 3D model and the original 3D model, their data points are regarded as a data matrix. X t Each row represents the coordinates of a data point. x i , y i , z i Covariance matrix Cov t It is a 3×3 matrix, its elements cov ij It can be calculated using the following formula:
[0088] ;
[0089] In the formula, i , j =1,2,3 respectively correspond to x , y , z coordinate, x i and x j It is the average value of the corresponding coordinates. n This represents the number of samples in the data matrix. k The index variable representing the summation symbol.
[0090] When determining the axis direction, eigenvalue decomposition is performed on the covariance matrix to obtain three eigenvalues. λ t1 ≥ λ t2 ≥ λ t3 and the corresponding feature vector v t1 , vt2 , v t3 The eigenvector corresponding to the largest eigenvalue is used as... X Along the axis, the eigenvector corresponding to the second largest eigenvalue is used as Y Along the axis, the eigenvector corresponding to the smallest eigenvalue is used as... Z The axial direction is determined to establish the initial coordinate system orientation of the target 3D model.
[0091] S222. Based on the balanced target point cloud set and the balanced original point cloud set, normals are estimated using the improved 3RDP method, and candidate plane sets are selected using the plane segmentation method.
[0092] In a preferred embodiment, the step of estimating normals using the improved 3RDP method based on the balanced target point cloud set and the balanced original point cloud set, and then filtering the candidate plane set using the plane segmentation method, includes the following steps:
[0093] S2221. Preprocess the data points in the balanced target point cloud set and the balanced original point cloud set respectively to obtain the preprocessed balanced target point cloud set and the balanced original point cloud set.
[0094] Specifically, preprocessing includes data denoising and data normalization. Noise points in the point cloud are removed by using methods such as statistical filtering or median filtering to achieve data denoising. Data normalization is achieved by scaling the point cloud data according to a certain ratio so that the value range of the point cloud data on each coordinate axis is within a suitable range.
[0095] S2222. For the preprocessed balanced target point cloud set and the balanced original point cloud set, perform initial normal estimation to obtain the initial normal vector set.
[0096] Specifically, for each data point in the preprocessed balanced target point cloud set and the balanced original point cloud set, several neighboring points are randomly selected around it. The coordinates of these neighboring points are used to form a data matrix, and principal component analysis is performed to obtain three eigenvectors. The eigenvector corresponding to the smallest eigenvalue is used as the initial normal vector of the data point.
[0097] S2223. Based on the initial set of normal vectors, the key regions of the plane are segmented using the plane segmentation method, and the complete boundaries are extracted by combining the improved 3RDP to form a set of candidate planes.
[0098] In a preferred embodiment, the step of segmenting the key regions of the plane using a plane segmentation method based on the initial normal vector set, and extracting the complete boundary using an improved 3RDP method to form a candidate plane set includes the following steps:
[0099] S22231. For each data point in the preprocessed balanced target point cloud set and the balanced original point cloud set, the neighborhood point set of each data point is determined by a neighborhood search strategy based on the initial normal vector set.
[0100] It should be noted that, for each data point, when determining the set of neighboring points using the neighborhood search strategy, the nearest neighboring point in the search space is used. K One point, K =30, forming a neighborhood point set. Alternatively, based on a pre-defined fixed radius, a set can be formed with the data point as the center. r Search for all points within the search range.
[0101] S22232. Based on the neighborhood point set of each data point, determine the distribution of the normal vectors in the neighborhood, and use the minimum spanning tree to correct the normal direction of the initial normal vectors to obtain the corrected set of normal vectors.
[0102] Specifically, for each data point, the normal vectors of all points in its neighborhood are calculated. A minimum spanning tree is constructed using the neighborhood points as nodes. The edge weights of the minimum spanning tree are the angle between the normal vectors of the two points or the Euclidean distance. During correction, the point with the smallest angle with the average normal vector of the neighborhood is selected from the minimum spanning tree as the directional reference. The reference direction is propagated layer by layer along the edges of the minimum spanning tree: for each pair of points connected by an edge, the angle between their normal vectors is calculated. If the angle is greater than 90°, the normal vector of one of the points is reversed to make the directions of the two points consistent. This process is iterated until the normal vectors of all points in the neighborhood are consistent with the reference direction. Finally, the correction results of all data points are integrated to obtain a set of normal vectors with a globally unified direction.
[0103] S22233. Use the corrected set of normal vectors and combine it with the region growing algorithm to segment key regions;
[0104] Specifically, after normal vector correction, all data points are marked as unvisited, and one unvisited data point is randomly selected as the initial seed point, marked as visited, and added to the growth queue. The current point is retrieved from the growth queue, and a KDTree search is performed to find all neighboring points within its preset neighborhood. For each neighboring point, two core conditions are simultaneously determined: first, whether the angle between the corrected normal vector of the neighboring point and the current point is less than a set angle threshold; and second, whether the spatial Euclidean distance between the two points is less than a distance threshold. If a neighboring point satisfies both conditions and is in an unvisited state, it is marked as visited and added to the growth queue. The neighborhood search and filtering process continues, using this point as the new growth starting point. When the growth queue is empty, all currently marked points constitute a key region with consistent normal vectors and spatial continuity. New seed points are randomly selected from the remaining unvisited points, and the above growth process is repeated until all data points are visited, ultimately resulting in multiple independent planar key regions.
[0105] S22234. Calculate the centroid and principal component vectors of each key region, and construct the reference surface;
[0106] It should be noted that when calculating the centroid, the geometric center of the region is determined by calculating the average coordinates of all points within the critical region, serving as the spatial anchor point for the datum. Calculating the principal component vectors requires performing principal component analysis on the point set within the region. The datum is constructed using the centroid as the base point and spanned by the two principal component vectors, ensuring that the datum closely matches the actual plane height of the critical region.
[0107] S22235. Project the data points in the key area onto the reference plane, and perform boundary point detection starting from the centroid. Select data points whose distance from the reference plane is greater than a preset threshold to form a candidate plane set.
[0108] S223. Based on axial constraints, select at least three non-coplanar feature matching surfaces from the candidate plane set.
[0109] It should be noted that the constraints are set according to the X, Y, and Z axes of the initial coordinate system: candidate planes whose normal vectors are parallel or perpendicular to a certain coordinate axis are preferred.
[0110] Specifically, from the planes that satisfy the axial constraints, the target is screened by verifying the non-coplanarity of their normal vectors: take any three planes and calculate the mixed product of their normal vectors. If the absolute value of the mixed product is greater than 0.1, it means that the normal vectors of the three planes are not coplanar, and the corresponding planes are also non-coplanar, which can uniquely determine a spatial coordinate system. If there are enough candidate planes, the plane with a larger area and more complete boundary can be further selected as the feature matching surface, and finally ensure that at least three planes that meet the axial constraints and are non-coplanar are selected.
[0111] S23. Using the initial coordinate system of the original 3D model as the reference coordinate system, and combining the feature matching surface, perform model alignment processing on the target 3D model and the original 3D model.
[0112] Specifically, using the initial coordinate system of the original 3D model as a reference, the spatial position and orientation (rotation and translation) of the target 3D model are adjusted to be consistent with the original model through feature matching, thereby achieving spatial alignment between models.
[0113] S24. Based on the model alignment results, correct the initial coordinate system parameters of the target 3D model and update them to the final coordinate system consistent with the original 3D model's reference coordinate system.
[0114] Specifically, based on the model alignment results, the initial coordinate system parameters of the target 3D model are corrected, such as the origin position and coordinate axis direction, so that its final coordinate system is completely consistent with the reference coordinate system of the original model.
[0115] S3. Based on the final coordinate system, extract the face identifiers and summary information of the target 3D model and the original 3D model respectively to obtain the extraction results. Then, compare and match the target 3D model and the original 3D model based on the extraction results to obtain the 3D model version comparison results.
[0116] It should be noted that mechanical CAD part models all use BRep to represent and store their geometric data. Mechanical CAD part models can be simplified as a series of topological surfaces. Therefore, mechanical CAD part 3D model version comparison is to compare and analyze the topological surfaces (referred to as surfaces) of the original model and the target model (new version), and automatically analyze the differences of these surfaces.
[0117] The differences in surfaces include:
[0118] New faces: Compared to the original model, the target model has additional faces.
[0119] Delete faces: Faces deleted from the target model compared to the original model;
[0120] Modified surfaces refer to surfaces in the target model where some information changes compared to the original model.
[0121] The comparison and matching calculation logic is as follows: extract the flag and summary information of the original model; extract the flag and summary information of the target model; for flags that are uniquely matched in the original model and the target model, the matching is successful; for surfaces with the same flag but not unique in the original model and the target model, the maximum match is found by minimizing the global summary information; and the difference information of the surfaces is calculated based on the matching results.
[0122] As a preferred embodiment, such as Figure 8 As shown, the steps of extracting face identifiers and summary information from the target 3D model and the original 3D model according to the final coordinate system to obtain extraction results, and comparing and matching the target 3D model and the original 3D model based on the extraction results to obtain 3D model version comparison results include the following steps:
[0123] S31. Based on the final coordinate system, perform surface identification and extract summary information from the target 3D model and the original 3D model respectively;
[0124] It should be noted that the purpose of the face identifier is to find a one-to-one correspondence between the original model and the target model. If a unique matching identifier exists between the original model and the target model, the face is successfully matched; otherwise, further matching attempts are required. Furthermore, for the sake of versatility, the face identifier is designed as a strictly encoded string.
[0125] The available surface types are: plane, cylindrical, conical, torus, and spherical.
[0126] Different surface types correspond to different surface data, as defined below:
[0127] (1) Plane (PDV_Plane): Plane surface data is represented by the origin, X-axis direction vector, and Y-axis direction vector, such as... Figure 3 As shown, the formula for the parameters of a plane is:
[0128] P(u,v)=O+V X u+V Y v;
[0129] In the formula: P(u,v) represents a point on the plane; O represents the origin of the plane; V X Represents the X-direction of the plane (XVector); V Y Y represents the Y-direction of the plane (YVector); u represents the X-direction parameter of the plane; v represents the Y-direction parameter of the plane.
[0130] The data definitions for the plane are shown in Table 1:
[0131] Table 1 PDV_Plane Data Definition
[0132]
[0133] (2) Cylindrical surface. A cylindrical surface (PDV_Cylinder) is represented by the origin, the X-axis direction vector, the Y-axis direction vector, and the radius, such as... Figure 4 As shown, the formula for the parameters of the cylindrical surface is as follows:
[0134] P(u,v)=O+V X R cosu+V Y R sinu+V Z v;
[0135] In the formula: P(u,v) represents a point on the cylindrical surface; O represents the origin of the cylindrical surface; V X The X-direction (XVector) of the cylindrical surface; V Y The Y-direction (YVector) represents the cylindrical surface; V Z The Z-direction of the cylindrical surface can be represented by V. X and V Y The calculation yields: R represents the radius of the cylinder; u represents the sweep angle of the cylinder; and v represents the height of the cylinder in the Z direction.
[0136] The data definitions for cylindrical surfaces are shown in Table 2:
[0137] Table 2 PDV_Cylinder Data Definition
[0138]
[0139] (3) Conical surface (PDV_Cone), the conical surface is represented by a local coordinate system, radius and half angle, such as Figure 5 As shown; the parameter formulas for the conical surface are as follows:
[0140] P(u,v)=O+V X v tanα cosu+V Y v tanα sinu+V Z v;
[0141] In the formula, P(u,v) represents a point on the cone surface, which is related to the parameters u and v; O represents the origin of the cone surface; V X The X-direction (XVector) of the conical surface; V Y The Y-direction (YVector) represents the conical surface; V Z The Z-direction of the conical surface can be represented by V. X and V Y The calculations show that α represents the semi-angle of the cone; u represents the sweep angle of the cone; and v represents the height of the cone in the Z direction.
[0142] The data definitions for the conical surface are shown in Table 3:
[0143] Table 3 PDV_Cone Data Definition
[0144]
[0145] (4) Circular Torus (PDV_Torus): A circular torus is represented by a local coordinate system, principal radius (R1), and cross-sectional radius (R2), such as... Figure 6 As shown, the parameter formulas for the torus are as follows:
[0146] P(u,v)=O+(V X cosu+V Y sinu) (R1+R2 cosv)+V Z R2 sinv;
[0147] In the formula: P(u,v) represents a point on the torus; O represents the origin of the torus; V X V represents the X-direction of the torus (XVector); VY represents the Y-direction of the torus (YVector); VZ represents the Z-direction of the torus, which can be expressed by V... X and V Y The calculations yield the following: R1 represents the major radius of the torus; R2 represents the minor radius of the torus; u represents the sweep angle of the plane containing the major radius of the torus; and v represents the sweep angle of the plane containing the minor radius of the torus.
[0148] The data definitions for the torus are shown in Table 4:
[0149] Table 4 PDV_Torus Data Definition
[0150]
[0151] (5) Sphere (PDV_Sphere): A sphere is represented by a local coordinate system and a radius, such as... Figure 7 As shown, the formula for the parameters of a sphere is as follows:
[0152] P(u,v)=O+V X R cosv cosu+V Y R cosv sinu+V Z R sinv;
[0153] In the formula: P(u,v) represents a point on the sphere, which is related to the parameters u and v; O represents the origin of the sphere; V X The X-direction (XVector) represents the spherical surface; V Y The Y-direction of the sphere (YVector); V Z The Z-direction of a sphere can be represented by V. X and V Y The calculation yields: R represents the radius of the sphere; u represents the orientation angle of the point on the sphere; and v represents the pitch angle of the point on the sphere.
[0154] The data definitions for a spherical surface are shown in Table 5:
[0155] Table 5 PDV_Sphere Data Definition
[0156]
[0157] In addition, surface content summary extraction: After the surfaces of the original model and the target model are successfully matched, the surface content information needs to be compared one by one to determine whether there are differences and to locate specific differences. The extracted surface content information includes: the maximum UV clipping area of the surface; the area of the surface, in mm. 2 Please retain 2 significant figures; the perimeter of the surface boundary, in mm, should also retain 2 significant figures.
[0158] S32. Traverse all faces of the target 3D model and perform a uniqueness check on the face identifier of each face. Determine whether there are any identical face identifiers in the current target 3D model. If so, use the principle of minimum global difference to match the most similar face in the original 3D model. Otherwise, proceed to step S33.
[0159] S33. Check if the face identifier of the face in the current target 3D model exists in the original 3D model. If it does not exist, mark the face as a new face. If it exists, check if the face identifier is unique in the original 3D model. If not, use the principle of minimum global difference to match the most similar face in the original 3D model. Otherwise, extract the summary information corresponding to the face identifier in the original 3D model and compare it with the current summary information in the target 3D model to obtain the difference comparison result.
[0160] S34. Based on the difference comparison results, determine whether there is a difference. If there is a difference, mark the face with the difference as the modified face. If there is no difference, mark the face without the difference as the unchanged face. After traversing all faces of the target 3D model, extract the face in the original 3D model that was not matched by the target 3D model and mark it as the deleted face.
[0161] S35. Integrate the newly added faces, modified faces, unchanged faces, and deleted faces to obtain the version comparison results between the target 3D model and the original 3D model.
[0162] As a preferred embodiment, matching the most similar face in the original 3D model using the principle of minimum global difference includes the following steps:
[0163] Obtain the current geometric features in the target 3D model, and based on the current geometric features, filter out a set of candidate faces in the original 3D model;
[0164] For each candidate face in the candidate face set, calculate its comprehensive difference degree with the current face of the target 3D model to obtain the comprehensive difference value between each candidate face and the current face of the target 3D model.
[0165] The face with the smallest overall difference value is selected from the candidate face set as the most similar matching face to the current face in the original 3D model.
[0166] In a preferred embodiment, the step of extracting the summary information corresponding to the face identifier in the original 3D model and comparing it with the summary information in the target 3D model to obtain the comparison result includes the following steps:
[0167] Extract the summary information corresponding to the face identifier in the original 3D model, and perform data sequence processing on the summary information corresponding to the face identifier in the original 3D model and the summary information in the target 3D model according to the preset conversion rules;
[0168] The serialized original 3D model surface summary information and the target 3D model surface summary information are integrated and aligned.
[0169] By using a point-by-point comparison method, the differences between the integrated and aligned original 3D model surface summary information and the target 3D model surface summary information are calculated to obtain the difference comparison results.
[0170] like Figure 2 As shown, according to another embodiment of the present invention, a three-dimensional model version comparison system based on geometric topology is provided, the system comprising:
[0171] The data acquisition and processing module 1 is used to acquire the target 3D model and the original 3D model to be compared, and to collect the point cloud data of the target 3D model and the original 3D model using an equal step sampling mechanism; and to perform equalization processing on the point cloud data of the target 3D model and the original 3D model using a manifold clustering algorithm respectively.
[0172] Model alignment module 2 is used to establish initial coordinate systems in the target 3D model and the original 3D model after equalization processing, respectively. Using the initial coordinate system and the three-face matching method, the target 3D model and the original 3D model are aligned. Based on the alignment result, the initial coordinate system is updated to obtain the final coordinate system.
[0173] Model version comparison module 3 is used to extract the face identifiers and summary information of the target 3D model and the original 3D model according to the final coordinate system, obtain the extraction results, and compare and match the target 3D model and the original 3D model according to the extraction results to obtain the 3D model version comparison results.
[0174] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, etc.) containing computer-usable program code.
[0175] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A 3D model version comparison system based on geometric topology, characterized in that, The system includes: The data acquisition and processing module is used to acquire the target 3D model and the original 3D model to be compared, and to collect the point cloud data of the target 3D model and the original 3D model using an equal step sampling mechanism; and to perform equalization processing on the point cloud data of the target 3D model and the original 3D model using a manifold clustering algorithm respectively; the target 3D model and the original 3D model are both mechanical CAD part models; The model alignment module is used to establish initial coordinate systems in the target 3D model and the original 3D model after equalization, respectively. Using the initial coordinate system and the three-face matching method, the target 3D model and the original 3D model are aligned. Based on the alignment result, the initial coordinate system is updated to obtain the final coordinate system. The model version comparison module is used to extract the face identifiers and summary information of the target 3D model and the original 3D model according to the final coordinate system, obtain the extraction results, and compare and match the target 3D model and the original 3D model according to the extraction results to obtain the 3D model version comparison results. The process of establishing initial coordinate systems in both the target 3D model and the original 3D model after equalization, and then using these initial coordinate systems in conjunction with the three-face matching method to perform model alignment processing on both the target 3D model and the original 3D model, and updating the initial coordinate systems based on the alignment results to obtain the final coordinate system includes the following steps: S21. Based on the balanced target point cloud set and the balanced original point cloud set, calculate the geometric center of the target 3D model and the original 3D model respectively, and establish the initial coordinate system of the target 3D model and the original 3D model with the geometric center as the origin respectively. S22. Based on the initial coordinate system of the target 3D model and the original 3D model, determine the axis direction of the initial coordinate system, and select at least three non-coplanar feature matching surfaces from the target 3D model and the original 3D model respectively. S23. Using the initial coordinate system of the original 3D model as the reference coordinate system, and combining the feature matching surface, perform model alignment processing on the target 3D model and the original 3D model. S24. Based on the model alignment results, correct the initial coordinate system parameters of the target 3D model and update them to the final coordinate system consistent with the original 3D model's reference coordinate system. The process of determining the axis directions of the initial coordinate system based on the target 3D model and the original 3D model, and selecting at least three non-coplanar feature matching surfaces from the target 3D model and the original 3D model respectively, includes the following steps: S221. Based on the initial coordinate system of the target 3D model and the original 3D model, the covariance matrix is calculated using principal component analysis, and the axis direction of the initial coordinate system is determined. S222. Based on the balanced target point cloud set and the balanced original point cloud set, normals are estimated using the improved 3RDP method, and candidate plane sets are selected using the plane segmentation method. S223. Based on axial constraints, select at least three non-coplanar feature matching surfaces from the candidate plane set; The process of estimating normals using an improved 3RDP method based on a balanced target point cloud set and a balanced original point cloud set, and then using a plane segmentation method to filter candidate plane sets, includes the following steps: S2221. Preprocess the data points in the balanced target point cloud set and the balanced original point cloud set respectively to obtain the preprocessed balanced target point cloud set and the balanced original point cloud set. S2222. For the preprocessed balanced target point cloud set and the balanced original point cloud set, perform initial normal estimation to obtain the initial normal vector set. S2223. Based on the initial set of normal vectors, the key regions of the plane are segmented using the plane segmentation method, and the complete boundaries are extracted by combining the improved 3RDP to form a set of candidate planes. The process of segmenting key regions of a plane using a plane segmentation method based on an initial set of normal vectors, and extracting complete boundaries using an improved 3RDP method to form a candidate plane set includes the following steps: S22231. For each data point in the preprocessed balanced target point cloud set and the balanced original point cloud set, the neighborhood point set of each data point is determined by a neighborhood search strategy based on the initial normal vector set. S22232. Based on the neighborhood point set of each data point, determine the distribution of the normal vectors in the neighborhood, and use the minimum spanning tree to correct the normal direction of the initial normal vectors to obtain the corrected set of normal vectors. S22233. Use the corrected set of normal vectors and combine it with the region growing algorithm to segment key regions; S22234. Calculate the centroid and principal component vectors of each key region, and construct the reference surface; S22235. Project the data points in the key area onto the reference plane, and perform boundary point detection starting from the centroid. Select data points whose distance from the reference plane is greater than a preset threshold to form a candidate plane set.
2. The 3D model version comparison system based on geometric topology according to claim 1, characterized in that, The process of acquiring the target 3D model and the original 3D model for comparison, collecting point cloud data of the target 3D model and the original 3D model using an equal-step sampling mechanism, and performing equalization processing on the point cloud data of the target 3D model and the original 3D model using a manifold clustering algorithm includes the following steps: S11. For the acquired target 3D model and the original 3D model, the point cloud data is collected by the equal step sampling mechanism to obtain the target point cloud set and the original point cloud set. S12. Calculate the distance density of each data point in the target point cloud set and the average distance density of all data points in the original point cloud set, respectively. S13. Based on the distance density of each data point and the average distance density of all data points, the manifold clustering algorithm is used to balance the target point cloud set and the original point cloud set respectively, so as to obtain the balanced target point cloud set and the balanced original point cloud set.
3. The 3D model version comparison system based on geometric topology according to claim 1, characterized in that, The process of extracting face identifiers and summary information from the target 3D model and the original 3D model based on the final coordinate system to obtain extraction results, and then comparing and matching the target 3D model and the original 3D model based on the extraction results to obtain 3D model version comparison results, includes the following steps: S31. Based on the final coordinate system, perform surface identification and extract summary information from the target 3D model and the original 3D model respectively; S32. Traverse all faces of the target 3D model and perform a uniqueness check on the face identifier of each face. Determine whether there are any identical face identifiers in the current target 3D model. If so, use the principle of minimum global difference to match the most similar face in the original 3D model. Otherwise, proceed to step S33. S33. Check if the face identifier of the face in the current target 3D model exists in the original 3D model. If it does not exist, mark the face as a new face. If it exists, check if the face identifier is unique in the original 3D model. If not, use the principle of minimum global difference to match the most similar face in the original 3D model. Otherwise, extract the summary information corresponding to the face identifier in the original 3D model and compare it with the current summary information in the target 3D model to obtain the difference comparison result. S34. Based on the difference comparison results, determine whether there is a difference. If there is a difference, mark the face with the difference as the modified face. If there is no difference, mark the face without the difference as the unchanged face. After traversing all faces of the target 3D model, extract the face in the original 3D model that was not matched by the target 3D model and mark it as the deleted face. S35. Integrate the newly added faces, modified faces, unchanged faces, and deleted faces to obtain the version comparison results between the target 3D model and the original 3D model.
4. The 3D model version comparison system based on geometric topology according to claim 3, characterized in that, The process of matching the most similar faces in the original 3D model using the principle of minimizing global differences includes the following steps: Obtain the current geometric features in the target 3D model, and based on the current geometric features, filter out a set of candidate faces in the original 3D model; For each candidate face in the candidate face set, calculate its comprehensive difference degree with the current face of the target 3D model to obtain the comprehensive difference value between each candidate face and the current face of the target 3D model. The face with the smallest overall difference value is selected from the candidate face set as the most similar matching face to the current face in the original 3D model.
5. A three-dimensional model version comparison system based on geometric topology according to claim 4, characterized in that, The process of extracting the summary information corresponding to the face identifier in the original 3D model and comparing it with the summary information in the target 3D model to obtain the difference comparison result includes the following steps: Extract the summary information corresponding to the face identifier in the original 3D model, and perform data sequence processing on the summary information corresponding to the face identifier in the original 3D model and the summary information in the target 3D model according to the preset conversion rules; The serialized original 3D model surface summary information and the target 3D model surface summary information are integrated and aligned. By using a point-by-point comparison method, the differences between the integrated and aligned original 3D model surface summary information and the target 3D model surface summary information are calculated to obtain the difference comparison results.
Citation Information
Patent Citations
Ice shape-model curved surface reconstruction method
CN112562086A
Construction method and device of three-dimensional real scene model, equipment and storage medium
CN116721230A