A similar CAD part searching method, system, device, medium and product

CN122489788BActive Publication Date: 2026-10-16SHANGHAI AGILINES INFORMATION TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202610975643.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-07-02
Publication Date
2026-10-16
Estimated Expiration
2046-07-02

AI Technical Summary

Technical Problem

[0003]本申请的目的是提供一种相似CAD零件查找方法、系统、设备、介质及产品,以解决现有CAD零件相似度查找方法计算量大、精度低、对零件放置姿态敏感的问题

Benefits of technology

[0019] This application generates a candidate part set by obtaining the bounding box size of the target part and matching the corresponding leaf nodes in a pre-built part size classification tree. This rapidly compresses the entire search space to a specific size range, eliminating a large number of irrelevant parts from the source, thus exponentially reducing the computational basis for subsequent fine comparisons. It adaptively calculates the number of mesh divisions to match the geometric features of the parts, divides the mesh into subspaces, and calculates the sum of the volumes of the BVH leaf nodes in each subspace to generate a mesh-volume mapping vector. Based on this, it calculates the spatial distribution similarity, accurately characterizing the three-dimensional spatial topology and subtle structural density differences of the internal geometric entities of the parts. This completely solves the problem of "similar in form but different in substance" misjudgment caused by traditional methods that rely solely on the outer contour. By using high-weighted spatial divisions… The similarity of the cloth is weighted and fused with the similarity of size ratio, number of vertices, number of nodes, and node volume according to preset weights, realizing a comprehensive quantitative evaluation of macroscopic size and microscopic topological features. This avoids the scoring bias caused by a single indicator and further ensures the objectivity and discriminativeness of the similarity results. Finally, by performing multi-pose comparison on the target part and candidate parts and taking the maximum value of the comprehensive similarity score of each pose as the final output, the association between the pose stored in the part database and the similarity calculation results is completely decoupled. This ensures that the highest matching score can be stably output regardless of the original angle of the part. Thus, in large-scale CAD part retrieval, a high-efficiency initial screening, high-precision feature expression, and strong pose robustness output are organically unified.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122489788B_ABST
    Figure CN122489788B_ABST
Patent Text Reader

Abstract

The application discloses a similar CAD part searching method, system, device, medium and product, relates to the technical field of CAD data processing and three-dimensional model retrieval, and comprises the following steps: acquiring the size of a target part bounding box, and matching to generate a candidate set in a part size classification tree; constructing a part BVH tree, adaptively calculating the number of grid divisions, dividing grid subspaces, counting the sum of BVH leaf node volumes in each grid to generate a mapping vector, and calculating a spatial distribution similarity; fusing the similarity, a size ratio, a vertex number, a node number and a volume similarity according to preset weights to obtain a comprehensive score; performing multi-pose comparison, and taking the maximum value of each pose score as the final result output. Through size pre-screening, BVH spatial distribution representation and multi-pose optimization, efficient, accurate and anti-pose interference retrieval of a large-scale part library is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer-aided design (CAD) data processing and 3D model retrieval technology, and in particular to a method, system, device, medium and product for finding similar CAD parts. Background Technology

[0002] In CAD parts management and manufacturing Bill of Materials (BOM) management, it is often necessary to quickly locate parts with similar geometric structures to the target part from a massive parts library. Traditional similarity search methods suffer from the following technical bottlenecks: First, low computational efficiency. Existing technologies mostly employ precise comparison based on Constructive Solid Geometry (CSG) Boolean operations or brute-force mesh generation, requiring the target part to be compared with each part in the library one by one using 3D geometric subtraction. The complexity of CSG Boolean operations is positively correlated with the number of triangular faces. Actual industrial models often contain tens of thousands to millions of faces, and a single comparison takes several seconds to tens of seconds, which cannot meet the needs of large-scale real-time retrieval. Second, insufficient accuracy in similarity calculation. Traditional coarse screening based on bounding box dimensions only utilizes one-dimensional information of the outer contour, resulting in low screening accuracy; point cloud comparison based on vertex sampling is difficult to capture internal topological differences in parts, and cannot effectively distinguish parts with similar external dimensions but different internal cavities, reinforcing ribs, and other structures. Third, high attitude sensitivity. Parts are often stored in 3D databases with arbitrary rotation or flipping postures. Existing methods lack posture invariance processing mechanisms, which leads to the same part being misjudged as having low similarity due to different placement angles. Summary of the Invention

[0003] The purpose of this application is to provide a method, system, device, medium, and product for finding similar CAD parts, in order to solve the problems of large computational load, low accuracy, and sensitivity to the placement posture of parts in existing CAD part similarity search methods.

[0004] To achieve the above objectives, this application provides the following solution.

[0005] Firstly, this application provides a method for finding similar CAD parts, including the following steps.

[0006] S1. Obtain the bounding box size information of the target part, and match the corresponding leaf node in the pre-built part size classification tree according to the bounding box size information to generate a candidate part set.

[0007] S2, Based on the candidate part set, construct BVH trees for the target part and each candidate part respectively, adaptively calculate the number of mesh divisions to divide the mesh subspace, and count the sum of the volumes of the BVH leaf nodes in each mesh subspace to generate a mesh-volume mapping vector, and calculate the spatial distribution similarity based on the mesh-volume mapping vector.

[0008] S3. Based on the spatial distribution similarity, combined with size ratio similarity, vertex number similarity, node number similarity, and node volume similarity, a weighted fusion is performed according to preset weights to calculate the comprehensive similarity score.

[0009] S4. Based on the comprehensive similarity score, perform multi-pose comparison between the target part and each candidate part, and determine the final similarity score based on the maximum value among the pose comparison results, so as to output the CAD part that is most similar to the target part.

[0010] Secondly, this application provides a similar CAD parts search system, including the following modules.

[0011] The candidate part set generation module is used to obtain the bounding box size information of the target part, and match the corresponding leaf node in the pre-built part size classification tree according to the bounding box size information to generate a candidate part set.

[0012] The spatial distribution similarity calculation module is used to construct BVH trees for the target part and each candidate part according to the candidate part set, adaptively calculate the number of grid divisions to divide the grid subspace, and count the sum of the volumes of the BVH leaf nodes in each grid subspace to generate a grid-volume mapping vector. The spatial distribution similarity is calculated based on the grid-volume mapping vector.

[0013] The comprehensive similarity score calculation module is used to calculate the comprehensive similarity score by weighting and fusing the spatial distribution similarity with the size ratio similarity, vertex number similarity, node number similarity and node volume similarity according to preset weights.

[0014] The most similar CAD part output module is used to perform multi-pose comparison between the target part and each candidate part based on the comprehensive similarity score, and determine the final similarity score based on the maximum value in each pose comparison result, so as to output the CAD part that is most similar to the target part.

[0015] Thirdly, this application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described method for finding similar CAD parts.

[0016] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described method for finding similar CAD parts.

[0017] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method for finding similar CAD parts.

[0018] According to the specific embodiments provided in this application, this application has the following technical effects.

[0019] This application generates a candidate part set by obtaining the bounding box size of the target part and matching the corresponding leaf nodes in a pre-built part size classification tree. This rapidly compresses the entire search space to a specific size range, eliminating a large number of irrelevant parts from the source, thus exponentially reducing the computational basis for subsequent fine comparisons. It adaptively calculates the number of mesh divisions to match the geometric features of the parts, divides the mesh into subspaces, and calculates the sum of the volumes of the BVH leaf nodes in each subspace to generate a mesh-volume mapping vector. Based on this, it calculates the spatial distribution similarity, accurately characterizing the three-dimensional spatial topology and subtle structural density differences of the internal geometric entities of the parts. This completely solves the problem of "similar in form but different in substance" misjudgment caused by traditional methods that rely solely on the outer contour. By using high-weighted spatial divisions… The similarity of the cloth is weighted and fused with the similarity of size ratio, number of vertices, number of nodes, and node volume according to preset weights, realizing a comprehensive quantitative evaluation of macroscopic size and microscopic topological features. This avoids the scoring bias caused by a single indicator and further ensures the objectivity and discriminativeness of the similarity results. Finally, by performing multi-pose comparison on the target part and candidate parts and taking the maximum value of the comprehensive similarity score of each pose as the final output, the association between the pose stored in the part database and the similarity calculation results is completely decoupled. This ensures that the highest matching score can be stably output regardless of the original angle of the part. Thus, in large-scale CAD part retrieval, a high-efficiency initial screening, high-precision feature expression, and strong pose robustness output are organically unified. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 This is a flowchart illustrating a method for finding similar CAD parts according to an embodiment of this application.

[0022] Figure 2This is a schematic diagram of the core algorithm of a similar CAD parts search method provided in an embodiment of this application.

[0023] Figure 3 This is an overall structural diagram of a similar CAD parts search system provided in another embodiment of this application.

[0024] Figure 4 This is a schematic diagram of the connection relationship of the cache query module provided in an embodiment of this application.

[0025] Figure 5 This is a schematic diagram showing the connection relationship of a part size classification module provided in an embodiment of this application.

[0026] Figure 6 This is a schematic diagram of the connection relationship of the BVH building blocks provided in an embodiment of this application.

[0027] Figure 7 This is a schematic diagram showing the connection relationship of a spatial distribution calculation module provided in an embodiment of this application.

[0028] Figure 8 This is a schematic diagram of the connection relationship of a multi-pose comparison module provided in an embodiment of this application.

[0029] Figure 9 This is an overview diagram of the data flow provided for one embodiment of this application.

[0030] Figure 10 Example image for part similarity retrieval. Detailed Implementation

[0031] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0032] To make the objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0033] like Figure 1 As shown in the figure, this application provides a method for finding similar CAD parts, including: S1. Obtain the bounding box size information of the target part, and match the corresponding leaf node in the pre-built part size classification tree according to the bounding box size information to generate a candidate part set.

[0034] S2, Based on the candidate part set, construct BVH trees for the target part and each candidate part respectively, adaptively calculate the number of mesh divisions to divide the mesh subspace, and count the sum of the volumes of the BVH leaf nodes in each mesh subspace to generate a mesh-volume mapping vector, and calculate the spatial distribution similarity based on the mesh-volume mapping vector.

[0035] S3. Based on the spatial distribution similarity, combined with size ratio similarity, vertex number similarity, node number similarity, and node volume similarity, a weighted fusion is performed according to preset weights to calculate the comprehensive similarity score.

[0036] S4. Based on the comprehensive similarity score, perform multi-pose comparison between the target part and each candidate part, and determine the final similarity score based on the maximum value among the pose comparison results, so as to output the CAD part that is most similar to the target part.

[0037] like Figure 2 As shown, by comparing the BVH tree of the CAD part with the BOX partition of the CAD part, spatial distribution calculation is performed to generate statistical data on the spatial distribution of BVH nodes. Specifically, the spatial distribution calculation involves statistically analyzing the position of the BOX partition into which the center point of each BVH node falls.

[0038] In an exemplary embodiment, S1 specifically includes: S11, extract the bounding box size information of each candidate part from the database, and construct the root node and internal nodes of the part size classification tree; the size information includes length, width and height.

[0039] S12, when the number of candidate parts in a node exceeds a preset threshold, the node is dynamically split to generate a leaf node; the node includes a root node and internal nodes.

[0040] S13, based on the bounding box size information of the target part, perform overlapping matching of the size range and preset tolerance of the internal nodes, locate the matching leaf nodes, and generate the candidate part set.

[0041] Furthermore, S1 is the first layer of filtering: obtaining the bounding box size information (length, width, and height) of the target part; quickly locating candidate part nodes in a pre-built part size classification tree based on the bounding box size; and narrowing the search range from all parts to a specific size range. This part size classification tree recursively divides the three-dimensional size space, classifies and stores parts according to size, and achieves rapid location of parts with similar sizes, providing efficient pre-screening for subsequent similarity comparison. Each node stores the size range of the part (±20% tolerance). When searching, the target size is input, and nodes with overlapping ranges are searched in the tree.

[0042] S1 uses coarse-grained size features to quickly narrow down the search scope and filter out a large number of irrelevant parts with significant size differences.

[0043] Specifically, for all parts in the parts database, the length, width, and height of their minimum bounding boxes are extracted. Based on this dimensional information, a multi-level parts size classification tree is constructed.

[0044] The root node contains all parts in the database, covering the entire size range.

[0045] Internal nodes: Divide the part according to a preset size range. For example, split according to a range of length, width, or height. To improve tolerance, a certain dimensional tolerance is allowed during partitioning, such as ±20%.

[0046] Leaf nodes: Store the specific part identifier and its precise size range.

[0047] Dynamic splitting: When the number of parts stored in any node exceeds a preset threshold, the node will automatically split into child nodes to maintain the balance of the tree and query efficiency.

[0048] Query and Filtering: When a target part is entered as a query, its bounding box size is first calculated. Then, based on this size, a fast index is performed in a multi-level part size classification tree to locate one or more leaf nodes that may contain similar parts. Through this step, only the parts contained in these leaf nodes are selected as candidate sets and enter the next round of fine comparison, thereby narrowing the search scope from the entire database to a specific size range.

[0049] In an exemplary embodiment, S2 specifically includes: S21, extract the bounding box size information of all leaf nodes of the BVH tree, sum up the dimensions of each axis and divide by the total number of leaf nodes to generate the average size of all leaf nodes of the BVH tree for each candidate part in the X-axis, Y-axis and Z-axis.

[0050] S22, based on the average size and the bounding box size information of the target part, calculate the number of theoretical grids in three axes, and round the minimum value of the three theoretical grids to obtain the number of grid divisions.

[0051] S23, according to the number of grid divisions, the candidate part bounding box is uniformly divided into N×N×N grid subspaces along the three axes. All leaf nodes of the BVH tree are traversed to calculate the center point coordinates of each leaf node and map them to the corresponding grid subspace index. The sum of the volumes of all BVH leaf nodes falling into the same grid subspace is counted to generate a three-dimensional volume distribution matrix; N is the number of grid divisions.

[0052] S24, the three-dimensional volume distribution matrix is ​​flattened into a one-dimensional array according to a preset fixed traversal order to obtain the grid-volume mapping vector, which is used as the input benchmark for calculating the spatial distribution similarity.

[0053] In one exemplary embodiment, the number of theoretical grids for the three axes is: N x =L bbox / L avg N y =W bbox / W avg N z =H bbox / H avg Where, N x N represents the theoretical grid number along the X-axis. y N represents the theoretical mesh number along the Y-axis. z L is the theoretical grid number along the Z-axis; bbox W bbox and H bbox The length, width, and height of the target part's enclosure; L avg W avg and H avg The average dimensions of all leaf nodes in the BVH tree for each candidate part in the X, Y, and Z axes.

[0054] Furthermore, S2 is the second layer of screening: constructing a BVH (hierarchical bounding box) tree of the three-dimensional mesh model for the candidate parts; extracting the spatial distribution features of the leaf nodes of the BVH tree to generate a mesh-volume mapping vector; and calculating the similarity between the mapping vectors of the target part and the candidate parts as the spatial distribution similarity.

[0055] S2 performs a detailed geometric structure comparison on the candidate parts that have passed the initial screening.

[0056] Specifically, a BVH tree is constructed: for the target part and each candidate part, a Bounding Volume Hierarchy (BVH) tree of its 3D mesh model is constructed. The BVH tree can effectively represent the geometric hierarchy of the part.

[0057] Adaptive calculation of mesh size N: To match the mesh size with the geometric features of the part, this application uses an adaptive method to calculate the value of N. The adaptive mesh size calculation is based on the mesh resolution parameter calculated from BVH tree statistical information. This parameter is used to determine the optimal mesh granularity when comparing the candidate part with the target part for similarity. For example, if the final mesh granularity is calculated to be 10 through adaptive calculation, then the bounding box of the part is divided into an average of 10×10×10 sub-bounding boxes.

[0058] For each part, calculate the average dimension of all leaf nodes of its BVH tree in each axis.

[0059] L avg =Σ(L i ) / n W avg =Σ(W i ) / n H avg =Σ(H i ) / n Where n is the number of BVH leaf nodes, L i W is the length of the i-th leaf node. i H is the width of the i-th leaf node. i Let L be the height of the i-th leaf node. avg W avg and H avg The average dimensions of all leaf nodes in the BVH tree for each candidate part in the X, Y, and Z axes.

[0060] Calculate the number of grid divisions.

[0061] N x = L bbox / L avg Ny = W bbox / W avg N z = H bbox / H avg N = round(min(N x N y N z )) Where: N x N represents the theoretical grid number along the X-axis. y N represents the theoretical mesh number along the Y-axis. z L is the theoretical grid number along the Z-axis; bbox W bbox and H bboxThe bounding box of the target part is defined by its length, width, and height; N is the minimum of these three values, rounded to the nearest integer to ensure the mesh is neither too large nor too small. S2 has the following advantages: 1. Adaptive: Different parts automatically use different N values; 2. Reasonable: Makes BVH leaf nodes match the size of mesh cells; 3. Avoids extremes: N will not be too large (thousands) or too small (<3).

[0062] Spatial meshing and feature extraction: The minimum bounding box of each part is uniformly divided into N×N×N grid subspaces (grids) along the three axes of X, Y, and Z. For example, it is divided into 10x10x10=1000 subspaces.

[0063] Traverse all leaf nodes of the part's BVH tree. For each leaf node, calculate the index of the grid subspace where its center point is located.

[0064] Calculate the sum of the volumes of all BVH leaf nodes falling within each grid subspace.

[0065] Constructing a mapping vector and calculating similarity: Based on the statistical results above, a one-dimensional "mesh-volume" mapping vector is constructed for each part. This vector has dimensions N×N×N, and the value of each component corresponds to the cumulative volume of all BVH leaf nodes within a mesh subspace. This vector accurately describes the spatial distribution of the geometric entities inside the part.

[0066] The similarity between the "mesh-volume" mapping vectors of the target part and the candidate part is calculated by using vector similarity calculation methods (such as cosine similarity) to obtain the spatial distribution similarity.

[0067] In an exemplary embodiment, S3 specifically includes: Based on the three-axis dimensions of the target part and the candidate part, a proportional vector is constructed, and the cosine value of the two proportional vectors is calculated to obtain the similarity of the dimensions.

[0068] Based on the number of vertices, the number of BVH leaf nodes, and the total volume of BVH leaf nodes of the target part and the candidate parts, the ratio of the minimum value to the maximum value is calculated to obtain the vertex number similarity, node number similarity, and node volume similarity.

[0069] The spatial distribution similarity, size ratio similarity, vertex number similarity, node number similarity, and node volume similarity are weighted and summed according to preset weights to obtain the comprehensive similarity score.

[0070] Furthermore, S3 involves multi-dimensional fusion: integrating similarity in size proportions, number of vertices, number of nodes, node volume, and spatial distribution; and calculating the overall similarity using preset weights. To more comprehensively and accurately assess the similarity between parts, S3 integrates features from multiple dimensions.

[0071] Calculate multi-dimensional feature similarity: In addition to the spatial distribution similarity calculated in S2, the similarity of the following dimensions is also calculated in parallel: Size ratio similarity: Compare the similarity of the target part and the candidate part in terms of size ratio (such as length / width, length / height) in the X, Y, and Z axes.

[0072] Vertex count similarity: Compare the similarity in the number of vertices between two 3D mesh models of parts.

[0073] Node count similarity: Compare the similarity of the total number of leaf nodes in the two BVH trees.

[0074] Node total volume similarity: Compare the similarity of the sum of the volumes of all leaf nodes in the BVH trees of two parts.

[0075] Weighted fusion: The spatial distribution similarity obtained in step S2 and the similarities of other dimensions calculated in this step are summed according to preset weights to obtain a comprehensive similarity score. The core innovation, "spatial distribution similarity," is given a high weight.

[0076] Overall similarity score = w1 × spatial distribution similarity + w2 × size ratio similarity + w3 × vertex number similarity + w4 × node number similarity + w5 node volume similarity; Wherein, w1 to w5 are the preset weights of spatial distribution similarity, size ratio similarity, vertex number similarity, node number similarity and node volume similarity, respectively. In this embodiment, w1=0.6, w2=0.1, w3=0.1, w4=0.1 and w5=0.1.

[0077] In an exemplary embodiment, S4 specifically includes: S41, keep the target part's posture fixed, and sequentially perform the original posture, bounding box center alignment posture, and 180-degree rotation posture transformation along the X-axis, Y-axis, and Z-axis on the candidate parts.

[0078] S42, repeat step S2 based on the transformed posture to recalculate the mesh-volume mapping vector of the candidate part, and repeat step S3 based on the updated mesh-volume mapping vector to obtain the comprehensive similarity score under each posture.

[0079] S43, compare the comprehensive similarity scores under each posture, and select the maximum value as the final similarity score.

[0080] S44, the candidate part corresponding to the final similarity score is taken as the CAD part that is most similar to the target part.

[0081] Furthermore, S4 is a multi-pose comparison: the target part and the candidate part are compared in multiple poses; the maximum value among all pose comparison results is taken as the final similarity.

[0082] To eliminate the interference of arbitrary poses of parts stored in the database on the similarity calculation results, S4 introduces a multi-pose comparison mechanism.

[0083] Attitude Transformation and Comparison: For the target part and candidate parts, the similarity calculation process in steps S2 and S3 is repeatedly executed under various preset relative attitudes. This application adopts a multi-attitude comparison strategy of "keeping the target part stationary and only transforming the attitude of the candidate parts".

[0084] The attitude change only affects the S2 / S3 parameters of the candidate part. When S2 changes, the candidate part's BVH is reconstructed using the transformation matrix; the "mesh-volume mapping vector" is recalculated.

[0085] S3 Change: Spatial distribution similarity of candidate parts, inherited from S2, the candidate mapping vector has changed.

[0086] These postures include, but are not limited to: Original pose comparison: The original pose of the part in the database is used directly for calculation.

[0087] Bounding box center alignment comparison: Align the centers of the bounding boxes of the two parts before performing calculations.

[0088] X / Y / Z axis flipping comparison: After flipping one of the parts by 180 degrees along the X, Y, and Z axes of its own bounding box, the calculation is performed.

[0089] Optimal result selection: A set of comprehensive similarity scores will be obtained across all pose comparison modes. The maximum value among these scores will be taken as the final similarity score between the two parts.

[0090] 1. Size and proportion similarity: Let the target part size be (Lx1, Ly1, Lz1); the candidate part size be (Lx2, Ly2, Lz2); the scale vector p1 = [Lx1 / Ly1, Lx1 / Lz1, Ly1 / Lz1]; the scale vector p2 = [Lx2 / Ly2, Lx2 / Lz2, Ly2 / Lz2]; the size scale similarity = cos(θ) = (p1·p2) / (|p1|×|p2|).

[0091] Where (Lx1, Ly1, Lz1): the X, Y, and Z axial dimensions (length, width, and height) of the target part, in mm; (Lx2, Ly2, Lz2): the X, Y, and Z axial dimensions (length, width, and height) of the candidate part, in mm.

[0092] 2. Vertex similarity: Vertex similarity = min(V1, V2) / max(V1, V2); where V1 = number of vertices of the target part; V2 = number of vertices of the candidate part.

[0093] 3. Node count similarity (BVH leaf node count similarity): N1 = Number of leaf nodes of the target part BVH; N2 = Number of leaf nodes of the candidate part BVH; Node similarity = min(N1, N2) / max(N1, N2).

[0094] 4. Total Node Volume Similarity (Total Volume Similarity of BVH Leaf Nodes): Vol1 = Total Volume of BVH Leaf Nodes of Target Part; Vol2 = Total Volume of BVH Leaf Nodes of Candidate Part; Node Volume Similarity = min(Vol1, Vol2) / max(Vol1, Vol2).

[0095] 5. Spatial distribution similarity (cosine similarity): Spatial distribution similarity = |A·B| / (|A|×|B|), where A and B are the component values ​​in the grid-volume mapping vector.

[0096] Example: Leaf node distribution of target part BVH: A = [0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0].

[0097] Candidate part BVH leaf node distribution: B = [0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0].

[0098] Cosine similarity: A·B = 12×10 + 25×22 + 8×9 = 120 + 550 + 72 = 742.

[0099] .

[0100] .

[0101] Cosine similarity = 742 / (28.86 × 25.78) = 742 / 744.6 ≈ 0.997.

[0102] This application provides a similar CAD parts search system, including: The candidate part set generation module is used to obtain the bounding box size information of the target part, and match the corresponding leaf node in the pre-built part size classification tree according to the bounding box size information to generate a candidate part set.

[0103] The spatial distribution similarity calculation module is used to construct BVH trees for the target part and each candidate part according to the candidate part set, adaptively calculate the number of grid divisions to divide the grid subspace, and count the sum of the volumes of the BVH leaf nodes in each grid subspace to generate a grid-volume mapping vector. The spatial distribution similarity is calculated based on the grid-volume mapping vector.

[0104] The comprehensive similarity score calculation module is used to calculate the comprehensive similarity score by weighting and fusing the spatial distribution similarity with the size ratio similarity, vertex number similarity, node number similarity and node volume similarity according to preset weights.

[0105] The most similar CAD part output module is used to perform multi-pose comparison between the target part and each candidate part based on the comprehensive similarity score, and determine the final similarity score based on the maximum value in each pose comparison result, so as to output the CAD part that is most similar to the target part.

[0106] In another exemplary embodiment, such as Figure 3 As shown, the similar CAD parts search system provided in this application can also be divided into: a cache query module, a parts size classification module, a BVH construction module, a spatial distribution calculation module, a multi-dimensional similarity fusion module, and a multi-pose comparison module.

[0107] The caching module includes a cache key generation unit, a cache hit checker, and a cache storage unit. If a cache hit occurs, the cache result is returned; if a cache miss occurs, an empty signal is output.

[0108] The structure of the cache query module is shown in Table 1, and the connection relationships are as follows: Figure 4 As shown.

[0109] Table 1

[0110] The part size classification module includes a size tree storage unit, a size calculation unit, and a node splitting controller.

[0111] The structural composition of the parts size classification module is shown in Table 2, and the connection relationships are as follows: Figure 5 As shown.

[0112] Table 2

[0113] The BVH building module includes a BVH tree generation unit, a leaf node extraction unit, and a volume calculation unit.

[0114] The structural composition of the BVH building block is shown in Table 3, and the connection relationships are as follows: Figure 6 As shown.

[0115] Table 3

[0116] The spatial distribution calculation module includes a network partitioning unit, a distribution statistics unit, and a similarity calculation unit.

[0117] The structural composition of the spatial distribution calculation module is shown in Table 4, and the connection relationships are as follows: Figure 7 As shown.

[0118] Table 4

[0119] The multi-dimensional similarity fusion module includes a feature receiving unit and a weighted calculation unit.

[0120] The structural composition of the multi-dimensional similarity fusion module is shown in Table 5.

[0121] Table 5

[0122] Weight allocation: Size ratio similarity weight: 10%; Vertex number similarity weight: 10%; Node number similarity weight: 10%; Node volume similarity weight: 10%; Spatial distribution similarity weight: 60%.

[0123] The multi-pose comparison module includes a pose transformation unit, a comparison execution unit, and a maximum value selection unit.

[0124] The structural composition of the multi-pose comparison module is shown in Table 6, and the connection relationships are as follows: Figure 8 As shown.

[0125] Table 6

[0126] Data flow overview as follows Figure 9 As shown, it includes the following steps.

[0127] Input: Target part.

[0128] Step 1: Cache query. If no match is found, proceed to Step 2; if a match is found, proceed to Step 7.

[0129] Step 2: Size Classification and Filtering. After pre-selecting the parts for comparison, proceed to Step 3.

[0130] Step 3: BVH tree construction.

[0131] Step 4: Spatial distribution calculation.

[0132] Step 5: Multi-dimensional integration.

[0133] Step 6: Multi-pose comparison.

[0134] Step 7: Sort the results.

[0135] Output: List of similar parts.

[0136] Figure 10 An example diagram for part similarity retrieval demonstrates the effectiveness of this application in quickly finding similarity between parts in a parts library. The characters below each part (e.g., AS21BS_001_JG01_UN210_211..., AS21BS_001_JG01_UN222_2..., etc.) represent the name of the corresponding part. The right-hand box is the similar parts search bar; "Similar Parts (37)" indicates that 37 existing parts with similar names and structures have been retrieved. The similarity value and comparison method are the comparison postures described in this application, and "Compare" is a software function button. This example shows that this application can quickly filter out parts with similar structures to the target part from a parts library containing 1000 parts, achieving efficient part similarity retrieval. It achieves efficient part retrieval and reuse, solving the problems of low efficiency and reliance on manual screening in traditional part retrieval.

[0137] This application describes a batch similarity comparison of all CAD parts for two automotive products. The core data from this comparison includes: 7469 pairs of parts were compared, with an average similarity of 58.3%, of which 472 parts were highly similar (≥90%). Part pairs are displayed in descending order of similarity, labeled with part number, similarity percentage, and spatial pose transformation type (e.g., normal, flipY). Thumbnails visually represent the 3D models of corresponding parts from both products. This application can automatically perform batch similarity comparisons of parts across products, outputting a comparison report containing statistical results and details, enabling rapid identification and analysis of part reuse between products.

[0138] This application has the following advantages: 1. Significantly improved screening efficiency: By using a part size classification tree, the search range is reduced to one-tenth or even one-hundredth of the original, and subsequent BVH comparison only requires processing a small number of candidate parts.

[0139] 2. More accurate similarity calculation: The spatial distribution features of BVH nodes can effectively capture subtle shape differences between parts and distinguish parts that look similar but have different internal structures.

[0140] 3. Strong attitude robustness: The multi-attitude comparison mechanism ensures that no matter how the part is placed, a truly similar part can be found.

[0141] 4. Good scalability: The part size classification tree supports incremental addition of parts without rebuilding the entire index.

[0142] In an exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments. The computer device can be a server or a terminal. The computer device includes a processor, a memory, an input / output interface (I / O), and a communication interface. The processor, memory, and I / O interface are connected via a system bus, and the communication interface is connected to the system bus via the I / O interface. The processor of the computer device provides computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device stores data to be processed. The I / O interface of the computer device is used for exchanging information between the processor and external devices. The communication interface of the computer device is used for communicating with an external terminal via a network connection. When the computer program is executed by the processor, it implements the above-described methods.

[0143] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.

[0144] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.

[0145] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0146] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by hardware related to computer program instructions. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).

[0147] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0148] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0149] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for finding similar CAD parts, characterized in that, include: S1, Obtain the bounding box size information of the target part, and match the corresponding leaf node in the pre-built part size classification tree according to the bounding box size information to generate a candidate part set; S2, based on the candidate part set, construct BVH trees for the target part and each candidate part respectively, adaptively calculate the number of mesh divisions to divide the mesh subspace, and count the sum of the volumes of the BVH leaf nodes in each mesh subspace to generate a mesh-volume mapping vector. Calculate the spatial distribution similarity based on the mesh-volume mapping vector, specifically including: S21, extract the bounding box size information of all leaf nodes of the BVH tree, sum up the dimensions of each axis and divide by the total number of leaf nodes to generate the average dimensions of all leaf nodes of the BVH tree for each candidate part in the X-axis, Y-axis and Z-axis. S22, based on the average size and the bounding box size information of the target part, calculate the number of theoretical grids in three axes, and round the minimum value of the three theoretical grids to obtain the number of grid divisions; S23, according to the number of grid divisions, the candidate part bounding box is uniformly divided into N×N×N grid subspaces along the three axes. All leaf nodes of the BVH tree are traversed to calculate the center point coordinates of each leaf node and map them to the corresponding grid subspace index. The sum of the volumes of all BVH leaf nodes falling into the same grid subspace is counted to generate a three-dimensional volume distribution matrix; N is the number of grid divisions. S24, the three-dimensional volume distribution matrix is ​​flattened into a one-dimensional array according to a preset fixed traversal order to obtain the grid-volume mapping vector, which is used as the input benchmark for calculating the spatial distribution similarity; S3. Based on the spatial distribution similarity, combined with size ratio similarity, vertex number similarity, node number similarity and node volume similarity, a weighted fusion is performed according to a preset weight to calculate the comprehensive similarity score. S4. Based on the comprehensive similarity score, perform multi-pose comparison between the target part and each candidate part, and determine the final similarity score based on the maximum value among the pose comparison results, so as to output the CAD part that is most similar to the target part.

2. The method for finding similar CAD parts according to claim 1, characterized in that, S1 specifically includes: S11, extract the bounding box size information of each candidate part from the database, and construct the root node and internal nodes of the part size classification tree; the size information includes length, width and height; S12, when the number of candidate parts in a node exceeds a preset threshold, the node is dynamically split to generate a leaf node; the node includes a root node and internal nodes. S13, based on the bounding box size information of the target part, perform overlapping matching of the size range and preset tolerance of the internal nodes, locate the matching leaf nodes, and generate the candidate part set.

3. The method for finding similar CAD parts according to claim 2, characterized in that, The theoretical mesh number for the three axes is: N x =L bbox / L avg N y =W bbox / W avg N z =H bbox / H avg Where, N x N represents the theoretical grid number along the X-axis. y N represents the theoretical mesh number along the Y-axis. z L is the theoretical grid number along the Z-axis; bbox W bbox and H bbox The length, width, and height of the target part's enclosure; L avg W avg and H avg The average dimensions of all leaf nodes in the BVH tree for each candidate part in the X, Y, and Z axes.

4. The method for finding similar CAD parts according to claim 2, characterized in that, S3 specifically includes: S31, construct a proportional vector based on the three-axis dimensions of the target part and the candidate part, calculate the cosine value of the two proportional vectors, and obtain the size proportional similarity. S32, based on the number of vertices, the number of BVH leaf nodes, and the total volume of BVH leaf nodes of the target part and the candidate parts, calculate the ratio of the minimum value to the maximum value to obtain the vertex number similarity, node number similarity, and node volume similarity. S33, the spatial distribution similarity, size ratio similarity, vertex number similarity, node number similarity, and node volume similarity are weighted and summed according to preset weights to obtain the comprehensive similarity score.

5. The method for finding similar CAD parts according to claim 1, characterized in that, S4 specifically includes: S41, keep the target part's posture fixed, and sequentially perform the original posture, bounding box center alignment posture, and 180-degree rotation posture transformation along the X-axis, Y-axis, and Z-axis on the candidate parts; S42, repeat S2 according to the transformed posture, recalculate the mesh-volume mapping vector of the candidate part, and repeat S3 according to the updated mesh-volume mapping vector to obtain the comprehensive similarity score under each posture; S43, compare the comprehensive similarity scores under each posture, and select the maximum value as the final similarity score; S44, the candidate part corresponding to the final similarity score is taken as the CAD part that is most similar to the target part.

6. A similar CAD parts search system, characterized in that, The method for finding similar CAD parts according to any one of claims 1-5 includes: The candidate part set generation module is used to obtain the bounding box size information of the target part, and match the corresponding leaf node in the pre-built part size classification tree according to the bounding box size information to generate a candidate part set. The spatial distribution similarity calculation module is used to construct BVH trees for the target part and each candidate part according to the candidate part set, adaptively calculate the number of grid divisions to divide the grid subspace, and count the sum of the volumes of the BVH leaf nodes in each grid subspace to generate a grid-volume mapping vector, and calculate the spatial distribution similarity based on the grid-volume mapping vector. The comprehensive similarity score calculation module is used to calculate the comprehensive similarity score by combining the spatial distribution similarity with the size ratio similarity, vertex number similarity, node number similarity and node volume similarity according to preset weights. The most similar CAD part output module is used to perform multi-pose comparison between the target part and each candidate part based on the comprehensive similarity score, and determine the final similarity score based on the maximum value in each pose comparison result, so as to output the CAD part that is most similar to the target part.

7. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the similar CAD part search method according to any one of claims 1-5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the method for finding similar CAD parts as described in any one of claims 1-5.

9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the method for finding similar CAD parts as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Part type identification method and device, computer equipment and storage medium

    CN119862294A

  • Large-size part online in-place quality inspection system and method based on three-dimensional point cloud

    CN121724901A

  • Part cost data determination method and device, computer readable storage medium and computer program product

    CN122175658A