Three-dimensional CAD model feature recognition method

By combining topological entropy-driven feature complexity quantification with GNN models, the problem of poor adaptability of 3D CAD model feature recognition methods to complex topological structures is solved, achieving high-accuracy feature recognition and automated processing, thereby improving manufacturing efficiency and quality.

CN120874571APending Publication Date: 2025-10-31NANJING UNIV OF AERONAUTICS & ASTRONAUTICS +1
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202510995484.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-18
Publication Date
2025-10-31

AI Technical Summary

Technical Problem

Existing 3D CAD model feature recognition methods are poorly adaptable to complex topological structures and lack process semantic association, resulting in low recognition accuracy and difficulty in meeting the needs of automated manufacturing.

Method used

A topological entropy-driven feature complexity quantification method is adopted, which combines the Rete algorithm and graph neural network (GNN). By generating an attribute graph structure with face-edge-vertex relationships, the topological entropy value is dynamically calculated to classify the feature complexity level. The process semantic rule base is then used to match and classify the GNN model to identify features.

Benefits of technology

It significantly improves the accuracy and automation of feature recognition, effectively handles complex topological structures, achieves bidirectional matching between geometric topology and processing semantics, and enhances the efficiency and quality of product design and manufacturing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120874571A_ABST
    Figure CN120874571A_ABST
Patent Text Reader

Abstract

The invention discloses a three-dimensional CAD model feature recognition method. The method comprises the following steps: analyzing boundary representation data of a CAD model and constructing a topological graph structure; the feature complexity is quantified by calculating a topological entropy value; in combination with a predefined process semantic rule base and a graph neural network model, realizing association identification of geometric features and processing semantics; and outputting the parameterized feature tree and supporting CAM system integration. The technical problems that a traditional feature recognition method is poor in adaptability to a complex topological structure and lacks process semantic association are solved, and the recognition accuracy and the automation degree are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer-aided design and computer-aided manufacturing integration, and specifically to a method for feature recognition of three-dimensional CAD models. Background Technology

[0002] In modern manufacturing, 3D CAD models have become a crucial data carrier in product design and manufacturing processes. Feature recognition, as an important part of CAD technology, aims to automatically extract engineering-significant features from CAD models, such as holes, slots, and bosses, for subsequent process planning, CNC programming, and manufacturing analysis. However, existing feature recognition methods have many limitations.

[0003] Traditional feature recognition methods are primarily based on geometric reasoning or rule matching. Geometric reasoning-based methods identify features by analyzing and reasoning about the geometry of CAD models. However, for CAD models with complex topologies, due to the diversity and complexity of their geometry, these methods often struggle to accurately and comprehensively identify features, exhibiting poor adaptability. Rule matching-based methods rely on predefined rule bases for feature recognition; however, these methods lack effective association with process semantics and fail to fully consider process information during manufacturing, resulting in low recognition accuracy in practical applications and failing to meet the demands of automated manufacturing. As the manufacturing industry moves towards intelligence and automation, there is an urgent need for a CAD model feature recognition method that can effectively handle complex topologies and possess process semantic association capabilities to improve feature recognition accuracy and automation levels, thereby enhancing the efficiency and quality of product design and manufacturing. Summary of the Invention

[0004] The purpose of this invention is to provide a method for feature recognition of three-dimensional CAD models, so as to solve the technical problems of poor adaptability to complex topological structures and lack of process semantic association of traditional feature recognition methods, and significantly improve the recognition accuracy and automation.

[0005] To achieve the above-mentioned technical objectives, the technical solution adopted by the present invention is as follows:

[0006] A method for feature recognition of a 3D CAD model, the method comprising the following steps:

[0007] S1, preprocesses the received 3D CAD model and performs format conversion;

[0008] S2, parses the topological relationships of the CAD model and generates an attribute graph structure relating faces, edges, and vertices;

[0009] S3. Based on the attribute graph structure, subgraphs are divided for local region extraction. For each face, a k-neighborhood subgraph is extracted. The topological entropy of each subgraph is dynamically calculated and features are coarsely classified. The complexity level of features is divided according to the entropy value and the required processing accuracy. The features are classified into deterministic features corresponding to regular geometry and non-deterministic features corresponding to composite geometry.

[0010] S4. For deterministic features, the Rete algorithm is used to match them with a predefined process semantic rule library, and feature parameters with semantic labels are output.

[0011] S5. For nondeterministic features, a Graph Neural Network (GNN) model is built. This GNN model includes an input layer, a GNN layer, and an output layer. The input layer receives the node feature matrix and adjacency matrix of the high-entropy subgraph corresponding to the nondeterministic features. The node feature matrix contains the processed vector representation of the nondeterministic features of the nodes, and the adjacency matrix represents the connection relationships between nodes in the graph. The GNN layer adaptively assigns weights to neighboring nodes through an attention mechanism to capture the local and global features of the high-entropy subgraph. The output layer uses a fully connected layer to map the output of the GNN layer to the number of classification categories, and then uses a softmax function to output the probabilistic classification result for each category.

[0012] S6 performs multimodal detection and correction for geometric, topological, and semantic conflicts;

[0013] S7 generates and outputs a parameterized feature tree.

[0014] Step S2 further includes:

[0015] S21, Establish topological adjacency:

[0016] Traverse all edges and establish a bidirectional mapping from edges to vertices. Record the starting and ending vertices of each edge, and record the edge list to which each vertex belongs. parse the boundary rings of faces and establish the containment relationship between faces and edges. Record all boundary edges of each face and record the faces adjacent to each edge.

[0017] S22, Generate property graph:

[0018] Traverse all vertices and faces, adding vertex and face nodes; establish vertex-edge-face connections, associating vertices with their respective edges and edges with their respective faces, completing the connections between vertices and edges, and between faces and edges. Calculate the connection weight w based on the shared edge length and the included angle between two faces, and connect faces to each other. The connection weight w is:

[0019]

[0020] Where α is the weighting coefficient, θ is the angle between the two surfaces, ranging from [0,π], L sharedL is the length of the shared edge. max This represents the maximum length of all shared edges in the current model.

[0021] Step S3 further includes:

[0022] S31, divide the image into sub-images and extract local regions for each face f. i Extract the k-neighborhood subgraph G i k , where i represents the face number;

[0023] S32, calculate the betweenness centrality C of the edge e used to represent the proportion of edges traversed in all shortest paths. B (e):

[0024]

[0025] Where s and t represent any pair of vertices in the subgraph, V represents the set of all vertices in the subgraph, and σ st σ represents the total number of shortest paths from node s to t. st (e) represents the number of shortest paths that pass through the edges;

[0026] The obtained betweenness centrality is normalized to adjust the betweenness values ​​to a uniform scale range:

[0027]

[0028] Where E is the set of all edges in subgraph G;

[0029] S3, Calculate the subgraph entropy value H(G) i k ), represented as:

[0030]

[0031] in, Let P(e) be the set of edges representing the subgraph, indicating the connectivity of geometric elements. P(e) is the importance probability of an edge in the subgraph, calculated using normalized betweenness centrality.

[0032]

[0033] Where ε is a smoothing factor to avoid zero probability;

[0034] S34, Set a dynamic threshold T according to the processing requirements; where roughing, conventional processing, and precision processing correspond to dynamic thresholds T1, T2, and T3 respectively, with T1 being the smallest to ignore minor details, T2 being the next smallest to balance accuracy and efficiency, and T3 being the largest to strictly distinguish minute features.

[0035] S35. Select the appropriate dynamic threshold according to the processing requirements of different processing stages, and use the selected threshold for coarse feature classification. When the entropy value H of the sub-graph is less than the dynamic threshold T, the feature corresponding to the sub-graph belongs to the low-entropy feature and is classified into the deterministic feature of the corresponding regular geometry. When the entropy value H of the sub-graph is greater than or equal to the dynamic threshold T, the feature corresponding to the sub-graph belongs to the high-entropy feature and is classified into the non-deterministic feature of the corresponding composite geometry.

[0036] Step S4 further includes:

[0037] S41, abstract the representation of rules and facts based on the predefined process semantic rule library, where facts are defined as triples, including entity, attribute and value, and rules represent the feature matching conditions of facts;

[0038] S42, Construct the Rete network. The Rete network is divided into two parts: Alpha network and Beta network. The Alpha network is used to match low-level geometric attributes including points, lines, and surfaces. Each geometric attribute corresponds to an Alpha node, and the output is a set of geometric features. The Beta network is responsible for combining high-order features. It connects the outputs of multiple Alpha nodes through Join nodes, dynamically maintains partial matching results, and outputs composite features and their parameters.

[0039] When a new geometric attribute enters the Alpha network, it triggers single-condition matching, and then passes the matching result to the Beta network to identify composite features and update the partial matching state. When all the conditions of the rule are met, an activation rule instance is generated, added to the conflict set, the interpretation that best matches the design intent is selected, priorities are defined, and the highest-order feature is selected at the terminal node according to priority.

[0040] Furthermore, in step S5, the process by which the GNN layer adaptively assigns weights to neighboring nodes through an attention mechanism to capture local and global features of the high-entropy subgraph includes the following steps:

[0041] Calculate the attention coefficient of each node to its neighboring nodes:

[0042] e ij =LeakyReLU(a T [Wh i ||Wh j ])

[0043] Among them, e ij h is the attention coefficient of node i to its neighbor node j. LeakyReLU is the corrected linear unit with leakage. i h j are the feature vectors of node i and node j, respectively; W is the learnable weight matrix; a is the parameter vector of the attention mechanism; and || represents the concatenation operation.

[0044] Attention coefficient α ij Normalize:

[0045]

[0046] Where M(i) is the set of neighboring nodes of node i;

[0047] Update node characteristics:

[0048] h′ i =σ(∑ j∈M(i) α ij Wh j )

[0049] Where σ is the activation function, h i ′ represents the updated node feature.

[0050] Step S6 further includes:

[0051] S61 performs multimodal detection for geometric, topological, and semantic conflicts, and generates a conflict report table that records the conflict type, location, and severity score based on the impact of the conflict on subsequent model processing. Specifically, it detects geometric conflicts by determining whether there are overlapping regions between entities through spatial geometric calculations; it detects topological conflicts by checking whether the connection of edges conforms to the manifold definition; and it detects semantic conflicts by matching feature parameters with process semantics.

[0052] S62 performs hierarchical corrections for different conflicts: for geometric conflicts, it separates objects along the minimum translation distance and automatically performs difference and union operations to eliminate overlaps; for topological conflicts, it splits non-manifold edges into multiple edges, fills cracks, or deletes overhangs; for semantic conflicts, it calls the constraint solver to adjust parameters.

[0053] S63. Repeat steps S61 and S62 to perform closed-loop verification until the conflict is eliminated.

[0054] Step S7 further includes:

[0055] S71, create a root node as the starting point of the feature tree. The root node represents the basic features of the entire CAD model or part.

[0056] S72: Following the creation order of features, select features one by one, first determine the parent node of the feature, and then insert it into the feature tree as a child node of the parent node. At the same time, establish various relationships between features, complete the generation of the feature tree, and output the parameterized feature tree. Among them, the parent-child relationship is automatically established when inserting the child node; the adjacent relationship, intersection relationship, and constraint relationship are established through corresponding geometric calculations and logical judgments; when the parameters of the feature change, update the attribute information of the feature node and recalculate the relationship between features to complete the feature node update.

[0057] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0058] First, the method for feature recognition of 3D CAD models in this invention quantifies the feature complexity driven by topological entropy. It proposes to dynamically quantify the feature complexity by calculating the topological entropy value, which breaks through the limitation of traditional methods based on fixed rules or thresholds having poor adaptability to complex structures. This enables the algorithm to automatically distinguish features of different complexities, such as simple holes and irregular cavities, and provides an adaptive judgment basis for subsequent recognition.

[0059] Second, the method for feature recognition of three-dimensional CAD models in this invention constructs a semantic rule base containing processing technology knowledge and deeply integrates it with a GNN network model. The semantic rule base provides process constraints and performs logical verification, while the GNN model is responsible for learning high-order association patterns in the topology graph. Through the collaborative reasoning of the process semantic rule base and the graph neural network, bidirectional matching between geometric topology and processing semantics is achieved, and manufacturable features are identified rather than simple geometric shapes. Attached Figure Description

[0060] Figure 1 This is a flowchart of a method for feature recognition of a three-dimensional CAD model according to the present invention;

[0061] Figure 2 This is a flowchart illustrating the dynamic calculation of topological entropy and coarse feature classification in a method for feature recognition of a 3D CAD model according to the present invention.

[0062] Figure 3 This is a Rete network framework diagram of a method for feature recognition of a 3D CAD model according to the present invention;

[0063] Figure 4 This is an entropy-weighted GNN architecture diagram of a method for feature recognition of three-dimensional CAD models according to the present invention. Detailed Implementation

[0064] The embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.

[0065] This invention discloses a method for feature recognition of a three-dimensional CAD model, the method comprising the following steps:

[0066] S1, preprocesses the received 3D CAD model and performs format conversion;

[0067] S2, parses the topological relationships of the CAD model and generates an attribute graph structure relating faces, edges, and vertices;

[0068] S3. Based on the attribute graph structure, subgraphs are divided for local region extraction. For each face, a k-neighborhood subgraph is extracted. The topological entropy of each subgraph is dynamically calculated and features are coarsely classified. The complexity level of features is divided according to the entropy value and the required processing accuracy. The features are classified into deterministic features corresponding to regular geometry and non-deterministic features corresponding to composite geometry.

[0069] S4. For deterministic features, the Rete algorithm is used to match them with a predefined process semantic rule library, and feature parameters with semantic labels are output.

[0070] S5. For nondeterministic features, a Graph Neural Network (GNN) model is built. This GNN model includes an input layer, a GNN layer, and an output layer. The input layer receives the node feature matrix and adjacency matrix of the high-entropy subgraph corresponding to the nondeterministic features. The node feature matrix contains the processed vector representation of the nondeterministic features of the nodes, and the adjacency matrix represents the connection relationships between nodes in the graph. The GNN layer adaptively assigns weights to neighboring nodes through an attention mechanism to capture the local and global features of the high-entropy subgraph. The output layer uses a fully connected layer to map the output of the GNN layer to the number of classification categories, and then uses a softmax function to output the probabilistic classification result for each category.

[0071] S6 performs multimodal detection and correction for geometric, topological, and semantic conflicts;

[0072] S7 generates and outputs a parameterized feature tree.

[0073] like Figure 1 As shown, the specific steps of the three-dimensional CAD model feature recognition method of the present invention are as follows:

[0074] S1: Receives CAD models, performs data preprocessing and format conversion. First, the model data is cleaned to remove any redundant information and erroneous data. For example, some CAD models may have duplicate vertices or incorrect face definitions during the conversion process. Then, a format conversion algorithm is used to convert the CAD model data into an internal data structure that is easy to process later, ensuring that the data can be efficiently parsed and manipulated in subsequent steps.

[0075] S2: Analyze the topological relationships of the CAD model to generate a graph structure relating faces, edges, and vertices. The specific steps for analyzing the topological relationships and generating the graph structure are as follows:

[0076] S21. Establishing Topological Adjacency Relationships. Traverse all edges and establish a bidirectional mapping from edges to vertices. Record the starting and ending vertices of each edge, and record the edge list to which each vertex belongs. Analyze the boundary rings of faces and establish the inclusion relationship between faces and edges. Record all boundary edges of each face, and record the adjacent faces of each edge. For example, in a CAD model of a mechanical part, if an edge connects vertex A and vertex B, the data structure will record the starting vertex A and ending vertex B, and the edge list to which vertices A and B belong will also contain this edge. For a face, if a face consists of edge 1, edge 2, and edge 3, then the face will record these three boundary edges, and these three edges will also record the face as its adjacent face.

[0077] S22. Generation of the attribute graph. Traverse all vertices and faces, adding vertex nodes and face nodes. Establish vertex-edge-face connections, associating vertices with their respective edges and edges with their respective faces, completing the connections between vertices and edges, and between faces and edges. Calculate the connection weight w based on the shared edge length and the included angle between two faces to achieve face-to-face connections. The connection weight w can be expressed as:

[0078]

[0079] Where α is the weighting coefficient, θ is the angle between the two surfaces, ranging from [0,π], L shared L is the length of the shared edge. max This represents the maximum length of all shared edges in the current model.

[0080] In step S3, the process of dynamically calculating topological entropy and performing coarse feature classification is as follows: Figure 2 As shown, the specific steps are as follows:

[0081] S31. Divide the image into sub-images and extract local regions for each face f. i Extract the k-neighborhood subgraph G i k , where i represents the face number;

[0082] S32. Calculate and normalize the edge betweenness centrality. The betweenness centrality C of edge e. B (e) represents the proportion of edges traversed in all shortest paths, which can be expressed as:

[0083]

[0084] Where s and t represent any pair of vertices in the graph, V represents the set of all vertices in the graph, and σ stσ represents the total number of shortest paths from node s to t. st (e) represents the number of shortest paths traversing edges. To ensure the comparability and interpretability of betweenness centrality in graphs of different sizes or structures, the betweenness centrality values ​​obtained above are normalized to adjust the betweenness values ​​to a uniform scale range.

[0085] Inside:

[0086]

[0087] Here, E is the set of all edges in the subgraph G.

[0088] S33. Calculate the subgraph entropy value H(G) i k ), can be represented as:

[0089]

[0090] in, Let P(e) be the set of edges representing the subgraph, indicating the connectivity of geometric elements. P(e) is the importance probability of an edge in the subgraph, calculated using normalized betweenness centrality.

[0091]

[0092] Where ε is a smoothing factor to avoid zero probability, it is usually taken as 10. -5 .

[0093] S34. Set a dynamic threshold T according to the processing requirements. Roughing, conventional processing and precision processing correspond to dynamic thresholds T1, T2 and T3 respectively. Among them, T1 is the smallest to ignore minor details, T2 is the next smallest to balance accuracy and efficiency, and T3 is the largest to strictly distinguish minute features.

[0094] S35. Select the appropriate dynamic threshold according to the processing requirements of different processing stages, and use the selected threshold for coarse feature classification. When H < T, the feature belongs to low entropy feature, classifies it into regular geometry, and calls the rule engine for fast matching; when H ≥ T, the feature belongs to high entropy feature, classifies it into composite geometry, and inputs it into the GNN model for deep classification.

[0095] In step S4, the specific steps for high-efficiency matching of process semantic rules based on the Rete algorithm are as follows:

[0096] S41. Abstract Representation Rules and Facts: Facts are defined in the form of triples (e.g., (cylinder, diameter, 50mm)), including entity, attribute, and value. Rules represent feature matching conditions (e.g., "If an entity is a cylinder with a diameter between 30-80mm, it may be a shaft part feature").

[0097] S42. Constructing the Rete Network: The Rete network consists of two parts: an Alpha network and a Beta network. The Alpha network is responsible for matching low-level geometric attributes, such as the basic attributes of points, lines, and surfaces. Each geometric attribute corresponds to an Alpha node, outputting a set of geometric features. The Beta network is responsible for combining high-order features. It connects the outputs of multiple Alpha nodes through Join nodes, dynamically maintaining partial matching results and outputting composite features and their parameters, such as... Figure 3 As shown.

[0098] S43. Incremental Matching and Conflict Resolution: When a new geometric attribute enters the Alpha network, single-condition matching is triggered. The matching result is then passed to the Beta network to identify composite features and update the partial matching state. When all conditions of the rule are met, an activation rule instance is generated, added to the conflict set, the interpretation that best matches the design intent is selected, priorities are defined, and the highest-order feature is selected at the terminal node according to priority.

[0099] In step S5, the specific steps for high-entropy subgraph classification based on the GNN model are as follows:

[0100] S51. Building a GNN Model: A GNN model is built based on the GAT network. The GAT network consists of an input layer, a GNN layer, and an output layer. The GNN layer adaptively allocates the weights of neighboring nodes through an attention mechanism, thereby better capturing local and global information of the graph. The entropy-weighted GNN architecture diagram is shown below. Figure 4 As shown.

[0101] The input layer takes the node feature matrix and adjacency matrix of the high-entropy subgraph as input to the model. The node feature matrix contains the vector representation of the nondeterministic features of the nodes after processing. For example, nondeterministic features such as size tolerance are converted into vectors containing information such as tolerance range and mean. The adjacency matrix represents the connection relationship between nodes in the graph.

[0102] The GNN layer first calculates the attention coefficient of each node to its neighboring nodes:

[0103] e ij =LeakyReLU(a T [Wh i ||Wh j ])

[0104] Wherein, LeakyReLU is a modified linear unit with leakage, h i h j are the feature vectors of node i and node j, respectively; W is the learnable weight matrix; a is the parameter vector of the attention mechanism; and || represents the concatenation operation.

[0105] Then, the attention coefficient is normalized:

[0106]

[0107] Where M(i) is the set of neighboring nodes of node i.

[0108] Finally, update the node features:

[0109] h′ i =σ(∑ j∈M(i) α ij Wh j )

[0110] Where σ is the activation function.

[0111] The output layer uses a fully connected layer to map the output of the GNN layer to the number of categories to be classified, and then uses a softmax function to convert the output into a probability distribution.

[0112] S52. Training the GNN Model: First, define the loss function, using the cross-entropy loss function to measure the difference between the model's predicted probability distribution and the true labels. The cross-entropy loss function can effectively handle multi-class classification problems, and its formula is:

[0113]

[0114] Where N is the number of samples, y ij is the true label (0 or 1) of the i-th sample in the j-th category, and C is the number of categories.

[0115] Then, the Adam optimizer is selected to automatically adjust the learning rate of each parameter during training. Finally, the model is trained iteratively on the training set. Each iteration includes forward propagation, loss calculation, backpropagation, and parameter update to complete the training of the model.

[0116] S53. Output probabilistic classification results: Use the trained model to classify the high-entropy subgraph of the new 3D CAD model. The output of the model is the probability distribution corresponding to each category.

[0117] In step S6, the specific steps for feature conflict detection and correction are as follows:

[0118] S61. Perform multimodal detection for geometric conflicts (such as two entities overlapping in space), topological conflicts (such as non-manifold edges, cracks, overhangs, etc.), and semantic conflicts (such as mismatch between feature parameters and process semantics). For example, when detecting geometric conflicts, determine whether there are overlapping regions between entities through spatial geometric calculations; when detecting topological conflicts, check whether the connection of edges conforms to the manifold definition, etc. Generate a conflict report table, recording in detail the conflict type, location, and severity score based on the impact of the conflict on subsequent model processing.

[0119] S62. Perform hierarchical corrections for different conflicts. For example, for geometric conflicts, separate overlapping objects by calculating the minimum translation distance and automatically perform Boolean operations such as difference and union to eliminate overlapping parts; for topological conflicts, split non-manifold edges into multiple edges that conform to topological rules, fill cracks or delete overhangs; for semantic conflicts, call the constraint solver and adjust relevant feature parameters according to process semantic rules.

[0120] S63. Perform closed-loop verification and rerun the conflict detection process to ensure that the conflict is eliminated.

[0121] In step S7, the specific steps for generating and outputting the parameterized feature tree are as follows:

[0122] S71. Feature Tree Initialization: Create a root node as the starting point of the feature tree. The root node typically represents the entire CAD model or a basic feature. If the CAD model is a complete mechanical assembly, the root node can represent the assembly; if it is a single part model, the root node can represent the basic feature of that part, such as a rectangular blank.

[0123] S72. Feature Addition: Add each feature to the feature tree in the order it was created. When adding a feature, you need to determine the parent node of the feature. For example, if you create a hole feature on a cuboid, the cuboid is the parent node of the hole, and the hole feature is inserted as a child node under the cuboid node.

[0124] S73. Establishing Feature Relationships: During the process of adding features, various relationships between features are established simultaneously. For parent-child relationships, they are automatically established when inserting child nodes; for adjacency, intersection, and constraint relationships, for example, an adjacency relationship is established between two adjacent faces, the intersection relationship between intersecting features is determined through geometric calculations, and the constraint relationship between features is set according to design requirements.

[0125] S74. Update Feature Nodes: When the parameters of a feature change, the attribute information of the feature nodes needs to be updated, and the relationships between features need to be recalculated to ensure that the feature tree can accurately reflect the latest state of the CAD model. Finally, a complete parametric feature tree is output.

[0126] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.

[0127] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A method for feature recognition of a three-dimensional CAD model, characterized in that, The method includes the following steps: S1, preprocesses the received 3D CAD model and performs format conversion; S2, parses the topological relationships of the CAD model and generates an attribute graph structure relating faces, edges, and vertices; S3. Based on the attribute graph structure, subgraphs are divided for local region extraction. For each face, a k-neighborhood subgraph is extracted. The topological entropy of each subgraph is dynamically calculated and features are coarsely classified. The complexity level of features is divided according to the entropy value and the required processing accuracy. The features are classified into deterministic features corresponding to regular geometry and non-deterministic features corresponding to composite geometry. S4. For deterministic features, the Rete algorithm is used to match them with a predefined process semantic rule library, and feature parameters with semantic labels are output. S5. For nondeterministic features, a Graph Neural Network (GNN) model is built. This GNN model includes an input layer, a GNN layer, and an output layer. The input layer receives the node feature matrix and adjacency matrix of the high-entropy subgraph corresponding to the nondeterministic features. The node feature matrix contains the processed vector representation of the nondeterministic features of the nodes, and the adjacency matrix represents the connection relationships between nodes in the graph. The GNN layer adaptively assigns weights to neighboring nodes through an attention mechanism to capture the local and global features of the high-entropy subgraph. The output layer uses a fully connected layer to map the output of the GNN layer to the number of classification categories, and then uses a softmax function to output the probabilistic classification result for each category. S6 performs multimodal detection and correction for geometric, topological, and semantic conflicts; S7 generates and outputs a parameterized feature tree.

2. The method for feature recognition of a three-dimensional CAD model according to claim 1, characterized in that, Step S2 further includes: S21, Establish topological adjacency: Traverse all edges and establish a bidirectional mapping from edges to vertices. Record the starting and ending vertices of each edge, and record the edge list to which each vertex belongs. parse the boundary rings of faces and establish the containment relationship between faces and edges. Record all boundary edges of each face and record the faces adjacent to each edge. S22, Generate property graph: Traverse all vertices and faces, adding vertex and face nodes; establish vertex-edge-face connections, associating vertices with their respective edges and edges with their respective faces, completing the connections between vertices and edges, and between faces and edges. Calculate the connection weight w based on the shared edge length and the included angle between two faces, and connect faces to each other. The connection weight w is: Where α is the weighting coefficient, and θ is the angle between the two surfaces, ranging from [0, π]. shared For the length of the shared edge, : max This represents the maximum length of all shared edges in the current model.

3. The method for feature recognition of a three-dimensional CAD model according to claim 1, characterized in that, Step S3 further includes: S31, divide the image into sub-images and extract local regions for each face f. i Extracting k-neighborhood subgraphs i represents the face number; S32, calculate the betweenness centrality C of the edge e used to represent the proportion of edges traversed in all shortest paths. B (e): Where s and t represent any pair of vertices in the subgraph, V represents the set of all vertices in the subgraph, and σ st σ represents the total number of shortest paths from node s to t. st (e) represents the number of shortest paths that pass through the edges; The obtained betweenness centrality is normalized to adjust the betweenness values ​​to a uniform scale range: Where E is the set of all edges in subgraph G; S3, Calculate the subgraph entropy value Represented as: in, The set of edges representing the subgraph indicates the connectivity of geometric elements; P(e) is the importance probability of an edge in the subgraph, calculated using normalized betweenness centrality. Where ε is a smoothing factor to avoid zero probability; S34, set a dynamic threshold T according to the processing requirements, where roughing, conventional processing and precision processing correspond to dynamic thresholds T1, T2 and T3 respectively. The minimum value of T1 is used to ignore minor details, the next minimum value of T2 is used to balance accuracy and efficiency, and the maximum value of T3 is used to strictly distinguish minute features. S35. Select the appropriate dynamic threshold according to the processing requirements of different processing stages, and use the selected dynamic threshold to perform coarse feature classification. When the entropy value H of the sub-graph is less than the dynamic threshold T, the feature corresponding to the sub-graph belongs to the low-entropy feature and is classified into the deterministic feature of the corresponding regular geometry. When the entropy value H of the sub-graph is greater than or equal to the dynamic threshold T, the feature corresponding to the sub-graph belongs to the high-entropy feature and is classified into the non-deterministic feature of the corresponding composite geometry.

4. The method for feature recognition of a three-dimensional CAD model according to claim 1, characterized in that, Step S4 further includes: S41, abstract the representation of rules and facts based on the predefined process semantic rule library, where facts are defined as triples, including entity, attribute and value, and rules represent the feature matching conditions of facts; S42, Construct the Rete network. The Rete network is divided into two parts: Alpha network and Beta network. The Alpha network is used to match low-level geometric attributes including points, lines, and surfaces. Each geometric attribute corresponds to an Alpha node, and the output is a set of geometric features. The Beta network is responsible for combining high-order features. It connects the outputs of multiple Alpha nodes through Join nodes, dynamically maintains partial matching results, and outputs composite features and their parameters. When a new geometric attribute enters the Alpha network, it triggers single-condition matching, and then passes the matching result to the Beta network to identify composite features and update the partial matching state. When all the conditions of the rule are met, an activation rule instance is generated, added to the conflict set, the interpretation that best matches the design intent is selected, priorities are defined, and the highest-order feature is selected at the terminal node according to priority.

5. The method for feature recognition of a three-dimensional CAD model according to claim 1, characterized in that, In step S5, the process by which the GNN layer adaptively assigns weights to neighboring nodes through an attention mechanism to capture local and global features of the high-entropy subgraph includes the following steps: Calculate the attention coefficient of each node to its neighboring nodes: e ij =LeakyReLU(a T [Wh i ||Wh j ]) Among them, e ij h is the attention coefficient of node i to its neighbor node j. LeakyReLU is the corrected linear unit with leakage. i h j are the feature vectors of node i and node j, respectively; W is the learnable weight matrix; a is the parameter vector of the attention mechanism; and || represents the concatenation operation. Attention coefficient α ij Normalize: Where M(i) is the set of neighboring nodes of node i; Update node characteristics: h′ i =σ(∑ j∈M(i) a ij Wh j ) Where σ is the activation function, h′ i These are the updated node features.

6. The method for feature recognition of a three-dimensional CAD model according to claim 1, characterized in that, Step S6 further includes: S61 performs multimodal detection for geometric, topological, and semantic conflicts, and generates a conflict report table that records the conflict type, location, and severity score based on the impact of the conflict on subsequent model processing. Specifically, it detects geometric conflicts by determining whether there are overlapping regions between entities through spatial geometric calculations; it detects topological conflicts by checking whether the connection of edges conforms to the manifold definition; and it detects semantic conflicts by matching feature parameters with process semantics. S62 performs hierarchical corrections for different conflicts: for geometric conflicts, it separates objects along the minimum translation distance and automatically performs difference and union operations to eliminate overlaps; for topological conflicts, it splits non-manifold edges into multiple edges, fills cracks, or deletes overhangs; for semantic conflicts, it calls the constraint solver to adjust parameters. S63. Repeat steps S61 and S62 to perform closed-loop verification until the conflict is eliminated.

7. The method for feature recognition of a three-dimensional CAD model according to claim 1, characterized in that, Step S7 further includes: S71, create a root node as the starting point of the feature tree. The root node represents the basic features of the entire CAD model or part. S72: Following the creation order of features, select features one by one, first determine the parent node of the feature, and then insert it into the feature tree as a child node of the parent node. At the same time, establish various relationships between features, complete the generation of the feature tree, and output the parameterized feature tree. Among them, the parent-child relationship is automatically established when inserting the child node; the adjacent relationship, intersection relationship, and constraint relationship are established through corresponding geometric calculations and logical judgments; when the parameters of the feature change, update the attribute information of the feature node and recalculate the relationship between features to complete the feature node update.

Citation Information

Cited By

  • Machine sorting method, system and device based on vector drawing semantic analysis and medium

    CN121820202A

  • A machine sorting method, system, device, and medium based on vector paper semantic parsing.

    CN121820202B

  • A three-dimensional part PMI automatic labeling method based on a graph neural network

    CN122435226A