A Machining Feature Recognition Method for MBD Model Based on AAG

Through the processing feature recognition method of the MBD model based on AAG, the problem of inaccurate and low efficiency in the prior art identification results is solved, and the automatic identification of processing features in the MBD model and the correlation between process information is realized, and more accurate process design is supported.

CN114925475BActive Publication Date: 2025-05-27WUHAN ANHUAI RESOURCE RECYCLING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210625017.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-02
Publication Date
2025-05-27
Estimated Expiration
2042-06-02

AI Technical Summary

Technical Problem

The existing processing feature recognition methods are not comprehensive enough to express the model information, lack the recognition of convex features, the recognition results are not accurate enough and have low efficiency, and the relevant process information is not considered, which affects the subsequent process design.

Method used

Using the processing feature recognition method of the MBD model based on AAG, the AAG of the model is extracted, the AAG is constructed, the feature sub-graph is decomposed, and it is matched with the predefined features to realize the identification of processing features and the correlation of process information.

Benefits of technology

Automatic identification and extraction of processing features in MBD models is realized, the accuracy and efficiency of recognition results are improved, and the processing features are correlated with relevant process information to support more accurate process design.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114925475B_ABST
    Figure CN114925475B_ABST
Patent Text Reader

Abstract

The present invention relates to a method for identifying machining features of an MBD model based on AAG, which means: based on the MBD model established in Creo software, extracting the information of the MBD model, constructing the AAG of the MBD model, obtaining its feature subgraphs by decomposing the AAG, and matching the feature subgraphs with predefined features to achieve the identification of machining features. In the MBD-based model, in addition to including the model structure and dimensions, surface roughness and geometric tolerances are also defined. The machining feature identification based on the MBD model in the present invention can automatically identify and extract the machining features in the model and associate the machining features with process information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method for identifying machining features of a three-dimensional model established in Creo, and particularly to an automatic machining feature identification method for an MBD model based on AAG. Background Art

[0002] Existing machining feature identification methods include graph-based methods, volume decomposition-based methods, rule-based methods, etc. The graph-based method constructs the model AAG by obtaining the geometric and topological relationships of the model surfaces and edges, and uses subgraph matching to identify machining features; the volume decomposition-based method intersects all the surfaces of the CAD model, decomposes the cutting volume of the part into convex unit volumes, then combines the convex unit volumes into feature units through processing, and finally matches the combined units with predefined features to obtain the corresponding feature types; the rule-based method needs to formulate predefined rules for each type of feature to be identified, and identifies by judging whether the rules are met.

[0003] In the above existing methods, the expression of model information is not comprehensive enough, the identification of convex features is lacking, the identification results are not accurate enough and the efficiency is low, and the identification results only express the feature types without considering the relevant process information, which is not conducive to subsequent process design. For two models with exactly the same topological structure and geometric dimensions, if the roughness degrees and tolerance grades of their feature surfaces are quite different, their machining processes may be completely different, resulting in deviations in the identification results.

[0004] The machining feature identification based on AAG refers to constructing the model AAG according to the model geometric and topological information, decomposing it, and realizing the identification of machining features through matching with predefined features. Summary of the Invention

[0005] Aiming at the deficiencies of the prior art, the present invention provides an automatic machining feature identification method for an MBD model based on AAG.

[0006] The object of the present invention is to provide an automatic machining feature identification method for an MBD model based on AAG, so as to realize the automatic identification and extraction of machining features in the MBD model established by using Creo modeling software. The technical problem to be solved by the present invention to achieve the above object is to extract the information of the MBD model, construct the AAG expression of the model, decompose the AAG to obtain the feature subgraph, and match the feature subgraph with the predefined features to realize the identification of machining features.

[0007] Term Explanation:

[0008] 1. MBD, Model Based Definition (MBD), bridges the gap between the direct use of 3D models for manufacturing. In fact, MBD is a 3D-based product digital annotation technology that uses a 3D digital model to fully describe the product's digital information.

[0009] 2. AAG, Attributed Adjacency Graph (AAG), is a data structure that extends the attributes expressed by nodes and node connections based on the graph.

[0010] 3. Creo software is a three-dimensional digital design and analysis software for mechanical products launched by PTC of the United States. Its main functions include three-dimensional parametric modeling of products, analysis of the model's kinematics, dynamics, heat, magnetic field, etc., as well as CNC machining programming of parts.

[0011] 4. AAM, Attribute Adjacency Matrix (AAM), a storage method for attribute adjacency graphs, is used in this patent to store feature subgraphs after AAG decomposition.

[0012] 5. Decomposition base refers to the surface of a 3D model that contains one or more inner contours. The inner contour refers to a closed loop formed by edges connected end to end inside the model surface. Figure 1 As shown, the top surface f of the hexahedron contains an inner contour composed of four model edges, and the f surface is a decomposed base surface in the three-dimensional model.

[0013] 6. Feature base surface refers to a plane in a three-dimensional model that is concave and has no entity in the three-dimensional model along the normal direction of the plane. Figure 2 The bottom surface of the middle keyway is a concave plane and there is no entity of the model along its normal direction. This surface is the characteristic base surface of this three-dimensional model.

[0014] 7. Joint base surface: refers to two unconnected model surfaces that need to be processed as the same surface in actual processing. The conditions that need to be met are: the two model surfaces have the same equation expression and at least one is a concave surface. Figure 3 Surfaces f3 and f4 in , satisfying the above definition, are the joint base surfaces of the model.

[0015] 8. Maximum concave connected subgraph: In the AAG model, the maximum concave connected subgraph of a node is the maximum connected graph that can be obtained by extending outward along the node lines with concave attributes starting from this node.

[0016] The technical solution of the present invention is:

[0017] A method for identifying machining features of an MBD model based on AAG refers to: based on the MBD model established in Creo software, extracting the information of the MBD model, constructing the AAG of the MBD model, obtaining its feature subgraphs by decomposing the AAG, and matching the feature subgraphs with predefined features to achieve the identification of machining features.

[0018] Preferably according to the present invention, according to the information of the MBD model, automatically identify the machining features in the model and associate them with process information, including the following steps:

[0019] Step 1: Extract the information of the MBD model;

[0020] The information of the MBD model includes the geometric topology information and annotation information of the MBD model; the geometric topology information includes two aspects: one is the connection relationship between faces and edges, manifested in the concavity and convexity of faces and edges, the adjacent faces of the face, and the adjacent faces of the edge; the other is the geometric data of faces and edges, the geometric data of the face is the ID of the face, the type of the face, and the contour information on the face, and the geometric data of the edge is the ID of the edge and the type of the edge; the annotation information includes tolerance information and roughness information, the tolerance information includes the tolerance symbol, tolerance type, tolerance value, and the ID of the associated geometric element, whether there is a datum requirement for the tolerance, and the ID of the datum plane, and the roughness information includes the roughness value and the ID of the associated face of the roughness annotation;

[0021] Step 2: Construct the AAG of the MBD model;

[0022] According to the information of the MBD model, define the nodes in the AAG and the attributes of the node connections, and construct the AAG of the MBD model;

[0023] Step 3: Decompose the AAG to obtain its feature subgraphs;

[0024] Through the AAG decomposition algorithm based on the model face, starting from the attributes of the model face, search for the nodes with the attributes of the decomposition base face in the AAG, classify and extract the subgraphs of the concave and convex features according to the concave and convex attributes of the edges forming the inner contour, and judge whether there are still concave feature subgraphs in the convex feature subgraph; then delete the nodes corresponding to non-machining faces in the remaining AAG, and extract the largest concave connected subgraph of the nodes with the attributes of the feature base face; through the subgraph reconstruction algorithm based on the combined base face, realize the merging of the subgraphs of the segmented features;

[0025] Step 4: Match the feature subgraphs with predefined features;

[0026] Represent the feature subgraphs with AAM, and through the feature matching algorithm based on AAM, identify the machining features in the model and obtain their types;

[0027] Step 5: Processing of the machining feature recognition results;

[0028] Obtain the feature surface of the machining feature, the integer type variable TAD of the tool approaching direction, the roughness, and the tolerance information, construct a data structure for storing the recognition results, and uniformly store the machining feature and the process information related to the machining feature.

[0029] Preferably according to the present invention, in step 1, the process of extracting the information of the MBD model is as follows:

[0030] First, define the structure data Surface_data, Edge_data, Contour_data, Surffinish_data, and Gtol_data. Surface_data includes surface_id, surf_type, surface_at, in_contour, surffinish_value, and gtol_data, which are used to store the ID of the surface, the type of the surface, the concavity and convexity of the surface, the inner contour attribute of the surface, the roughness value of the surface, and the tolerance data of the surface; Edge_data includes edge_id, edge_type, edge_at, adj_surf_id, and edge_in, which are used to store the ID of the edge, the type of the edge, the concavity and convexity of the edge, the ID of the adjacent surface of the edge, and the inner contour attribute of the edge; Contour_data includes contour_type and c_edge_id, which are used to store the type of the contour and the ID of the constituent edge of the contour; Surffinish_data includes sur_symbol, sur_value, and sur_asso_element, which store the symbol, value, and roughness associated element ID of the roughness; The members of Gtol_data include gtol_symbol, gtol_type, gtol_value, gtol_asso_element, and reference_id, which are used to store the symbol, type, value, associated geometric element ID, and datum plane ID of the tolerance;

[0031] Then, define an array of MBD model information structures to store the information of the extracted MBD model. The array of MBD model information structures includes an array of model surface information structures surface[] defined by Surface_data, an array of model edge information structures edge[] defined by Edge_data, an array of contour information structures contour[] defined by Contour_data, an array of surface roughness information structures surffinish[] defined by Surffinish_data, and an array of tolerance information structures gtol[] defined by Gtol_data.

[0032] Through the secondary development tool Creo TOOLKIT of Creo software, develop an application program to read the internal data structure of the Creo model, extract the information of the MBD model, and store it into the defined array of MBD model information structure bodies.

[0033] Further preferably, the method for extracting the geometric topology information of the MBD model is as follows:

[0034] Obtain the MBD model handle through the function ProMdlCurrentGet, and use the MBD model handle as the input parameter of the traversal function. First, call ProSolidSurfaceVisit to traverse the faces of the MBD model, output the array of face handles, use the elements of the face handle array as input parameters, and call the function to sequentially obtain the ID of the face, the type of the face, the concavity and convexity of the face, and the adjacent face ID of the MBD model; then, call ProSurfaceContourVisit to traverse the contours on the face, judge the contour type and obtain the ID of the contour composition edge; finally, call ProContourEdgeVisit to obtain the array of edge handles, use it as the input parameter of the function, and sequentially call the function to obtain the ID of the edge, the type of the edge, the concavity and convexity of the edge, and the adjacent face ID of the edge.

[0035] Further preferably, the method for extracting the annotation information of the MBD model is as follows:

[0036] Obtain the array of roughness handles by calling ProSolidSurffinishVisit, use the elements of the roughness handle array as the input parameters of the function, and call the function to obtain the roughness symbol, roughness value, and roughness associated element ID; call ProMdlGtolVisit to traverse the tolerances of the MBD model, obtain its array of handles and use the elements of the handle array as the input parameters of the function, and call the function to obtain the tolerance symbol, tolerance type, tolerance value, and the ID of the associated geometric element, and the ID of the reference plane.

[0037] According to the preference of the present invention, in step 2, constructing the AAG of the MBD model includes the following steps:

[0038] 201: Define the attributes of the nodes and the node connections in the AAG;

[0039] The nodes in the AAG correspond to the faces in the MBD model, and the node connections in the AAG correspond to the edges in the MBD model; their definitions are as follows:

[0040] The attributes of the nodes in the AAG include the type of the face, the concavity and convexity of the face, the decomposition base plane, the feature base plane, and the combined base plane;

[0041] Type of face: Use an integer variable to identify the type attribute of the face, which is divided into plane, cylindrical surface, conical surface, and other curved surfaces;

[0042] Concavity of the surface: Use an integer variable to identify the concavity of the surface;

[0043] Decomposition base surface: Use a boolean variable to identify the decomposition base surface attribute of the surface. If the surface is a decomposition base surface, it is identified as True; otherwise, it is identified as False;

[0044] Characteristic base surface: Use a boolean variable to identify the characteristic base surface attribute of the surface. If the surface is a characteristic base surface, it is identified as True; otherwise, it is identified as False;

[0045] Combined base surface: Use an integer variable to identify the combined base surface attribute of the surface. If two surfaces are combined base surfaces, the combined base surface attributes of the two surfaces are identified as the same integer value;

[0046] The attributes of the node connections in the AAG include the type of the edge, the concavity of the edge, and the inner contour edge;

[0047] Type of the edge: Use an integer variable to identify the type of the edge, which is divided into a straight edge, an arc edge, and other curved edges;

[0048] Concavity of the edge: Use an integer variable to identify the concavity of the edge, which is divided into a concave edge, a convex edge, and a smooth edge;

[0049] Inner contour edge: Use a boolean variable to identify the inner contour edge attribute of the edge;

[0050] 202: Construct the AAG of the MBD model;

[0051] Establish the AAG by searching the information of the MBD model extracted in step 1. The steps are as follows:

[0052] First, construct the data structure Node for storing AAG nodes and the data structure Line for storing node connections. The structure Node includes surface_id, adj_line, node_type, node_at, d_face, f_face, and c_face, which store the ID of the face, the node connections connected to the node, the type attribute of the node, the concavity / convexity attribute of the node, the decomposed base face attribute of the node, the characteristic base face attribute of the node, and the combined base face attribute of the node respectively. The structure Line includes edge_id, node1, node2, line_type, line_at, and in_contour, which are used to store the ID of the edge, the first node connected by the node connection, the second node connected by the node connection, the type attribute of the node connection, the concavity / convexity attribute of the node connection, and the inner contour attribute of the node connection respectively. Define the structure array node[] of data type Node and the structure array line[] of type Line respectively. The first node connected by the node connection and the second node connected by the node connection refer to the two end nodes of the node connection.

[0053] Secondly, initially construct the AAG: Let node[].surface_id be equal to surface[].surface_id, and let line[].edge_id be equal to edge[].edge_id.

[0054] Thirdly, determine the connection relationship between nodes and node connections according to the topological relationship between the model faces and edges: Obtain the ID of the edge on the model face represented by the element in node[]. If a certain element in line[] contains this ID, write the corresponding node[] into line[].node1 or line[].node2, and write line[] into node[].adj_line.

[0055] Finally, add other member information for each element of the arrays node[] and line[]; including:

[0056] ① Determine other information of node[], specifically: obtain the type of the surface according to node[].surface_id. If the surface is a plane, then node[i].node_type = 1; if the surface is a cylindrical surface, then node[i].node_type = 2; if the surface is a conical surface, then node[i].node_type = 3; if the surface is other curved surfaces, then node[i].node_type = 4; obtain the concavity and convexity of the surface according to node[].surface_id. If the surface is a concave surface, then node[i].node_at = -1; if the surface is a convex surface, then node[i].node_at = 1; if the surface with ID node[].surface_id is the decomposition base surface, then node[i].d_face = true, otherwise node[i].d_face = false; if the surface with ID node[].surface_id is the feature base surface, then node[i].f_face = true, otherwise node[i].f_face = false; if the surfaces with IDs node[i].surface_id and node[j].surface_id are the combined base surfaces, then node[i].c_face = node[j].c_face = k, where k is an integer;

[0057] ② Determine other information of line[], specifically: if the edges with ID line[i].edge_id are straight edges, circular arc edges, and other types of edges respectively, then line[i].line_type = 1, line[i].line_type = 2, line[i].line_type = 3 respectively; if the edges with ID line[i].edge_id are concave edges, smooth edges, and convex edges respectively, then line[i].line_at = -1, line[i].line_at = 0, line[i].line_at = 1 respectively; if the edge with ID line[i].edge_id is an inner contour edge, then line[i].in_contour = true, otherwise line[i].in_contour = false.

[0058] Preferably according to the present invention, in step 3, the steps are as follows:

[0059] 301. Decompose AAG

[0060] Based on the structure array node[], according to the connection relationship between nodes and the attribute information of the decomposition base surface, feature base surface, and combined base surface, split it into multiple sub - parts, obtain the node connections through the nodes included in the sub - parts, and finally output the node connections and nodes corresponding to each sub - part;

[0061] More preferably, the specific implementation process of decomposing AAG is as follows:

[0062] First, traverse node[], if the decomposition base surface attribute of the elements therein is true, then traverse the node connections connected to this node. If the node connection has an inner contour attribute and a concave edge attribute, mark this node as -1 and delete this node connection; if the node connection has an inner contour attribute and a convex edge attribute, mark this node as 1 and delete this node connection;

[0063] Then, traverse the array node[] again. If the node is marked as -1, obtain the node[] and line[] connected to this node, and delete the line[] with a concave edge attribute, and write the result into the arrays node1[][] and line1[][]; if the node is marked as 1, obtain the node[] and line[] connected to this node and write them into the arrays node1[][] and line1[][] respectively;

[0064] Again, delete the elements already extracted from line[] and node[], and traverse node[] again. If node[] has a convex surface attribute, then delete the line[] connected to it;

[0065] Finally, traverse node[] again. If node[] has a characteristic base surface attribute, extract the line[] connected to node[] and other node[] connected to the line[], and write the result into node1[][] and line1[][].

[0066] 302. Reconstruct the characteristic subgraph

[0067] In step 301, the arrays line[] and node[] storing AAG information are decomposed into multiple sub-parts, and node1[][] and line1[][] are used to store the nodes and node connections included in each sub-part respectively. Search for nodes with the same combined base surface attribute in node1[][] and merge the sub-parts where they are located to achieve the reconstruction of the characteristic subgraph.

[0068] More preferably, the specific implementation process of reconstructing the characteristic subgraph is as follows:

[0069] Traverse the array node[][]. If a certain array element node[i][k] has the combined base surface attribute, continue to search in the array node[][] for the element node1[j][m] that has the same combined base surface attribute as the array element node[i][k], and write the member data information of node1[j][m] into node1[i][k], and update line1[][] and node1[][] to get line2[m][] and node2[m][].

[0070] Preferably according to the present invention, in step 4, converting the feature sub-graph into AAM to achieve feature matching includes the following steps:

[0071] 401: Establish AAM

[0072] AAM is represented by a two-dimensional array M[n][n], and its structure is shown in formula (I):

[0073]

[0074] In formula (I), n is the number of nodes of the feature sub-graph; m ij represents the concavity and convexity attribute and type attribute of the node connection line, and m ii represents the concavity and convexity attribute, type attribute and feature base surface attribute of the node;

[0075] The value-taking rule of the elements in the matrix M[n][n] is defined as follows:

[0076] The array element m is represented by a three-digit positive integer ii , denoted as m ii =abc, and its value is shown in formulas (II), (III), and (IV).

[0077]

[0078]

[0079]

[0080] The array element m is represented by a two-digit positive integer ij , denoted as m ij =de, and its value is shown in formulas (V) and (VI).

[0081]

[0082]

[0083] 402: Matching of AAM

[0084] First, determine whether the characteristic subgraph AAM is the same as the predefined AAM order;

[0085] Then, determine whether the set formed by the diagonal elements of the characteristic subgraph AAM is equal to that of the predefined AAM;

[0086] Finally, determine whether the sets formed by the elements of each row of the characteristic subgraph AAM are similar to those of the predefined AAM; whether the sets formed by the elements of each row are similar means that there is a one-to-one mapping relationship between the set formed by the elements of each row of the characteristic subgraph AAM and the set formed by the elements of each row of the predefined AAM;

[0087] If the characteristic subgraph AAM has the same order as the predefined AAM, the sets formed by the diagonal elements are equal, and the sets formed by the elements of each row of the AAM are similar, then the matching is successful; otherwise, the matching is unsuccessful.

[0088] According to the preference of the present invention, in step 5, the processing method is as follows:

[0089] Construct a structure Featrue_data to describe the machining features and their related information, and define a structure array featrue[] of the structure Featrue_data to store the machining features;

[0090] The specific members of the structure Featrue_data include: a string-type variable featrue_id and featrue_type; a Surface_data-type variable surface; an int-type variable TAD for the tool approach direction; a double-type variable Ra; and a Gtol_data-type variable gtol, which store the ID, type, feature surface, tool approach direction, roughness, and geometric tolerance of the machining feature respectively; among them, the int-type variable TAD for the tool approach direction takes values from 1 to 6, representing the six directions of +x, -x, +y, -y, +z, and -z respectively.

[0091] A computer device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps of the above-mentioned machining feature recognition method based on the AAG-based MBD model are implemented.

[0092] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned machining feature recognition method based on the AAG-based MBD model are implemented.

[0093] The beneficial effects of the present invention are:

[0094] In the present invention, for the machining feature recognition of the MBD model based on AAG, by extracting the geometric topology information of the model surfaces and edges, constructing the model AAG, and expanding the expression content of the AAG, the AAG can express the model more accurately. According to certain algorithm rules, the model AAG is decomposed, and the machining features are matched through AAM to identify the types of machining features. By processing the recognition results, other information of the machining features is obtained, and the association between the machining features and the process information is realized. Brief Description of the Drawings

[0095] Figure 1 Schematic diagram of the decomposition base surface;

[0096] Figure 2 Schematic diagram of the feature base surface;

[0097] Figure 3 Schematic diagram of the combined base surface;

[0098] Figure 4 Schematic diagram of the MBD model in the embodiment of the present invention;

[0099] Figure 5 Schematic diagram of the surface of the MBD model in the embodiment of the present invention;

[0100] Figure 6 Schematic flow chart of the machining feature recognition method for the MBD model based on AAG. Detailed Embodiments

[0101] The present invention will be further defined below in conjunction with the drawings in the specification and the embodiments, but not limited thereto.

[0102] Embodiment 1

[0103] A machining feature recognition method for the MBD model based on AAG means: based on the MBD model established in Creo software, extracting the information of the MBD model, constructing the AAG of the MBD model, obtaining its feature subgraphs by decomposing the AAG, and matching the feature subgraphs with predefined features to realize the recognition of machining features. In addition to the model structure and dimensions, the MBD-based model also defines surface roughness and geometric tolerances.

[0104] Embodiment 2

[0105] A machining feature recognition method for the MBD model based on AAG according to Embodiment 1, which is different in that: according to the information of the MBD model, the machining features in the model are automatically recognized and associated with the process information, as Figure 6 shown, including the following steps:

[0106] Step 1: Extract the information of the MBD model;

[0107] The information of the MBD model includes the geometric topology information and annotation information of the MBD model; the geometric topology information includes two aspects: one is the connection relationship between faces and edges, which is manifested in the concavity and convexity of faces and edges, the adjacent faces of the face, and the adjacent faces of the edge; the other is the geometric data of faces and edges. The geometric data of a face is the ID of the face, the type of the face, and the contour information on the face. The geometric data of an edge is the ID of the edge and the type of the edge; the annotation information includes tolerance information and roughness information. The tolerance information includes the tolerance symbol, tolerance type, tolerance value, and the ID of the associated geometric element, whether there is a datum requirement for the tolerance, and the ID of the datum plane. The roughness information includes the roughness value and the ID of the associated face of the roughness annotation;

[0108] Step 2: Construct the AAG of the MBD model;

[0109] According to the information of the MBD model, define the nodes in the AAG and the attributes of the node connections, and construct the AAG of the MBD model;

[0110] Step 3: Decompose the AAG to obtain its characteristic subgraphs;

[0111] Through the AAG decomposition algorithm based on the model face, starting from the attributes of the model face, search for the nodes with the attributes of the decomposition base face in the AAG. According to the concavity and convexity attributes of the edges forming the inner contour, extract the subgraphs of the concave and convex features by category, and judge whether there are still concave feature subgraphs in the convex feature subgraph; then delete the nodes corresponding to the non-machined faces in the remaining AAG, and extract the maximum concave connected subgraph of the nodes with the attributes of the characteristic base face; through the subgraph reconstruction algorithm based on the combined base face, realize the merging of the subgraphs of the segmented features;

[0112] Step 4: Match the characteristic subgraphs with the predefined features;

[0113] Represent the characteristic subgraphs with AAM. Through the feature matching algorithm based on AAM, identify the machining features in the model and obtain their types;

[0114] Step 5: Process the recognition results of the machining features;

[0115] Obtain the feature faces of the machining features, the int type variable TAD of the tool approach direction, the roughness, and the tolerance information, construct a data structure for storing the recognition results, and uniformly store the machining features and the process information related to the machining features. The int type variable TAD of the tool approach direction is stored using an integer variable.

[0116] Embodiment 3

[0117] According to the method for identifying machining features of an MBD model based on AAG described in Embodiment 1, the difference lies in:

[0118] In Step 1, the process of extracting the information of the MBD model is as follows:

[0119] First, define the structure data Surface_data, Edge_data, Contour_data, Surffinish_data, and Gtol_data. Surface_data includes surface_id, surf_type, surface_at, in_contour, surffinish_value, and gtol_data, which are used to store the ID of the surface, the type of the surface, the concavity and convexity of the surface, the inner contour attribute of the surface, the roughness value of the surface, and the tolerance data of the surface, respectively; Edge_data includes edge_id, edge_type, edge_at, adj_surf_id, and edge_in, which are used to store the ID of the edge, the type of the edge, the concavity and convexity of the edge, the ID of the adjacent surface of the edge, and the inner contour attribute of the edge, respectively; Contour_data includes contour_type and c_edge_id, which are used to store the type of the contour and the ID of the constituent edge of the contour, respectively; Surffinish_data includes sur_symbol, sur_value, and sur_asso_element, which store the symbol of the roughness, the value, and the ID of the roughness associated element, respectively; The members of Gtol_data include gtol_symbol, gtol_type, gtol_value, gtol_asso_element, and reference_id, which are used to store the symbol of the tolerance, the type, the value, the ID of the associated geometric element, and the ID of the reference plane, respectively.

[0120] Then, define an array of MBD model information structures to store the information of the extracted MBD model. The array of MBD model information structures includes an array of model surface information structures surface[] defined by Surface_data, an array of model edge information structures edge[] defined by Edge_data, an array of contour information structures contour[] defined by Contour_data, an array of surface roughness information structures surffinish[] defined by Surffinish_data, and an array of tolerance information structures gtol[] defined by Gtol_data.

[0121] The definitions of each structure array are shown in Table 1.

[0122] Table 1

[0123]

[0124] Through the secondary development tool Creo TOOLKIT of Creo software, develop an application program to read the internal data structure of the Creo model, extract the information of the MBD model, and store it in the defined array of MBD model information structure bodies.

[0125] The method for extracting the geometric topology information of the MBD model is as follows:

[0126] Obtain the MBD model handle through the function ProMdlCurrentGet, and use the MBD model handle as the input parameter of the traversal function. First, call ProSolidSurfaceVisit to traverse the faces of the MBD model, output the array of face handles, use the elements of the face handle array as input parameters, and call the function to obtain the ID of the face, the type of the face, the concavity and convexity of the face, and the adjacent face ID of the MBD model in sequence; then, call ProSurfaceContourVisit to traverse the contours on the face, judge the contour type and obtain the ID of the contour composition edges; finally, call ProContourEdgeVisit to obtain the array of edge handles, use it as the input parameter of the function, and call the function to obtain the ID of the edge, the type of the edge, the concavity and convexity of the edge, and the adjacent face ID of the edge in sequence.

[0127] The method for extracting the annotation information of the MBD model is as follows:

[0128] Obtain the array of roughness handles by calling ProSolidSurffinishVisit, use the elements of the roughness handle array as the input parameters of the function, and call the function to obtain the roughness symbol, roughness value, and roughness associated element ID; call ProMdlGtolVisit to traverse the tolerances of the MBD model, obtain its handle array and use the elements of the handle array as the input parameters of the function, and call the function to obtain the tolerance symbol, tolerance type, tolerance value, and the ID of the associated geometric element, and the ID of the datum plane.

[0129] Its process is shown in the following pseudocode:

[0130]

[0131]

[0132]

[0133] Specifically, the MBD model in this embodiment is as Figure 4 shown, the surface of the MBD model is as Figure 5 shown, and the results are shown in Table 2 - Table 5. Table 2 is the data of the model faces, Table 3 is the data of the model edges, Table 4 is the roughness information, and Table 5 is the tolerance information.

[0134] Table 2

[0135]

[0136]

[0137] Table 3

[0138]

[0139]

[0140] Table 4

[0141]

[0142]

[0143] Table 5

[0144]

[0145] In step 2, constructing the AAG of the MBD model includes the following steps:

[0146] 201: Define the nodes in the AAG and the attributes of the node connections;

[0147] The nodes in the AAG correspond to the faces in the MBD model, and the node connections in the AAG correspond to the edges in the MBD model; their definitions are as follows:

[0148] The attributes of the nodes in the AAG include the type of the face, the concavity and convexity of the face, the decomposed base plane, the feature base plane, and the combined base plane;

[0149] Type of face: Use an integer variable to identify the type attribute of the face, which is divided into a plane, a cylindrical surface, a conical surface, and other curved surfaces;

[0150] Concavity and convexity of face: Use an integer variable to identify the concavity and convexity of the face;

[0151] Decomposed base plane: Use a boolean variable to identify the decomposed base plane attribute of the face. If the face is a decomposed base plane, it is identified as True; otherwise, it is identified as False;

[0152] Feature base plane: Use a boolean variable to identify the feature base plane attribute of the face. If the face is a feature base plane, it is identified as True; otherwise, it is identified as False;

[0153] Combined base plane: Use an integer variable to identify the combined base plane attribute of the face. If two faces are combined base planes, the combined base plane attributes of the two faces are identified as the same integer value;

[0154] The definition of the attribute values of each attribute of the node is shown in Table 6.

[0155] Table 6

[0156]

[0157] The attributes of the node connections in the AAG include the type of the edge, the convexity / concavity of the edge, and the inner contour edge;

[0158] Type of the edge: An integer variable is used to identify the type of the edge, which is divided into straight edge, arc edge, and other curve edges;

[0159] Convexity / concavity of the edge: An integer variable is used to identify the convexity / concavity of the edge, which is divided into concave edge, convex edge, and smooth edge;

[0160] Inner contour edge: A boolean variable is used to identify the attribute of the inner contour edge of the edge;

[0161] The attribute value definitions of the attributes of the node connections are shown in Table 7.

[0162] Table 7

[0163]

[0164] 202: Construct the AAG of the MBD model;

[0165] By searching the information of the MBD model extracted in step 1, establish the AAG; The present invention uses a structure array to express the AAG node information, node connection information, and their attribute information. The steps for establishing the model AAG are as follows:

[0166] (1) By accessing the structure array surface[] of the model surface information and the structure array edge[] of the model edge information, obtain the B-Rep, which represents the geometric topology information of the model;

[0167] (2) Establish a data structure Node for storing the nodes in the AAG and a data structure Line for storing the attributes of the node connections. Based on this, define a structure array node[] of data type Node and a structure array line[] of type Line respectively;

[0168] (3) Determine the model surfaces represented by the structure array node[] and the model edges represented by the structure array line[], and determine the connection relationship between the structure array node[] and the structure array line[] based on the topological relationship between the model surfaces and the model edges;

[0169] (4) Based on the information stored in the structure array surface[] of the model surface information, according to the relevant attribute definitions of the model surfaces, add corresponding attributes to the structure array node[]; Based on the information stored in the structure array edge[] of the model edge information, according to the relevant attribute definitions of the model edges, add corresponding attributes to the structure array line[].

[0170] The specific process is as follows:

[0171] First, construct a data structure Node for storing AAG nodes and a data structure Line for storing node connections. The structure Node includes surface_id, adj_line, node_type, node_at, d_face, f_face, and c_face, which are used to store the ID of the face, the node connections connected to the node, the type attribute of the node, the concavity and convexity attribute of the node, the decomposed base face attribute of the node, the characteristic base face attribute of the node, and the combined base face attribute of the node, respectively. The structure Line includes edge_id, node1, node2, line_type, line_at, and in_contour, which are used to store the ID of the edge, the first node connected by the node connection, the second node connected by the node connection, the type attribute of the node connection, the concavity and convexity attribute of the node connection, and the inner contour attribute of the node connection, respectively. Define a structure array node[] of data type Node and a structure array line[] of type Line. The first node connected by the node connection and the second node connected by the node connection refer to the two end nodes of the node connection.

[0172] Second, initially construct the AAG: set node[].surface_id equal to surface[].surface_id, and set line[].edge_id equal to edge[].edge_id.

[0173] Third, determine the connection relationship between nodes and node connections according to the topological relationship between the model faces and edges: obtain the ID of the edge on the model face represented by the element in node[], and if a certain element in line[] contains this ID, write the corresponding node[] into line[].node1 or line[].node2, and write line[] into node[].adj_line.

[0174] Finally, add other member information for each element of the arrays node[] and line[]; including:

[0175] ① Determine other information of node[], specifically: obtain the type of the surface according to node[].surface_id. If the surface is a plane, then node[i].node_type = 1; if the surface is a cylindrical surface, then node[i].node_type = 2; if the surface is a conical surface, then node[i].node_type = 3; if the surface is other curved surfaces, then node[i].node_type = 4. Obtain the concavity and convexity of the surface according to node[].surface_id. If the surface is a concave surface, then node[i].node_at = -1; if the surface is a convex surface, then node[i].node_at = 1. If the surface with ID node[].surface_id is the decomposition base surface, then node[i].d_face = true; otherwise, node[i].d_face = false. If the surface with ID node[].surface_id is the feature base surface, then node[i].f_face = true; otherwise, node[i].f_face = false. If the surfaces with IDs node[i].surface_id and node[j].surface_id are the combined base surfaces, then node[i].c_face = node[j].c_face = k, where k is an integer.

[0176] ② Determine other information of line[], specifically: if the edge with ID line[i].edge_id is a straight edge, an arc edge, or an edge of other types, then line[i].line_type = 1, line[i].line_type = 2, and line[i].line_type = 3 respectively. If the edge with ID line[i].edge_id is a concave edge, a smooth edge, or a convex edge, then line[i].line_at = -1, line[i].line_at = 0, and line[i].line_at = 1 respectively. If the edge with ID line[i].edge_id is an inner contour edge, then line[i].in_contour = true; otherwise, line[i].in_contour = false.

[0177] The process is shown in the following pseudo-code:

[0178]

[0179]

[0180]

[0181] Specifically, in this embodiment, the node data of AAG and the node connection data of AAG are shown in Table 8 and Table 9.

[0182] Table 8

[0183]

[0184]

[0185] Table 9

[0186]

[0187]

[0188]

[0189] In step 3, the following steps are included:

[0190] 301. Decompose AAG

[0191] Based on the structure array node[], according to the connection relationship between nodes and the attribute information of the decomposition base surface, feature base surface, and combined base surface, it is split into multiple sub-parts. The node connections are obtained through the nodes included in the sub-parts, and finally the node connections and nodes corresponding to each sub-part are output;

[0192] The specific implementation process of decomposing AAG is as follows:

[0193] First, traverse node[]. If the decomposition base surface attribute of the elements in it is true, then traverse the node connections connected to this node. If the node connection has an inner contour attribute and a concave edge attribute, mark this node as -1 and delete this node connection; if the node connection has an inner contour attribute and a convex edge attribute, mark this node as 1 and delete this node connection;

[0194] Then, traverse the array node[] again. If the node is marked as -1, obtain the node[] and line[] connected to this node, and delete the line[] with a concave edge attribute, and write the result into the arrays node1[][] and line1[][]; if the node is marked as 1, obtain the node[] and line[] connected to this node, and write them into the arrays node1[][] and line1[][] respectively;

[0195] Again, delete the elements already extracted from line[] and node[], traverse node[] again. If node[] has a convex surface attribute, then delete the line[] connected to it;

[0196] Finally, traverse node[] again. If node[] has the characteristic base plane attribute, extract line[] that has a connection relationship with node[] and other node[] that is connected to line[], and write the results into node1[][] and line1[][].

[0197] Its process is shown in the following pseudo-code:

[0198]

[0199]

[0200] 302. Reconstruct the feature sub-graph

[0201] Due to feature intersection, some features are split. After AAG decomposition, the split features are decomposed into two feature sub-graphs, and then the feature sub-graphs are reconstructed. In step 301, the arrays line[] and node[] that store AAG information are decomposed into multiple sub-parts, and node1[][] and line1[][] are used to store the nodes and node connections included in each sub-part respectively. Search for nodes with the same combined base plane attribute in node1[][], and merge the sub-parts where they are located to achieve the reconstruction of the feature sub-graph.

[0202] The specific implementation process of reconstructing the feature sub-graph is as follows:

[0203] Traverse the array node[][]. If a certain array element node[i][k] has the combined base plane attribute, continue to search for the element node1[j][m] in the array node[][] that has the same combined base plane attribute as the array element node[i][k], and write the member data information of node1[j][m] into node1[i][k], and update line1[][] and node1[][] to get line2[m][] and node2[m][].

[0204] Its process is shown in the following pseudo-code:

[0205]

[0206] Specifically, the node data of each sub-part and the node connection data results of each sub-part in this embodiment are shown in Tables 10 and 11.

[0207] Table 10

[0208]

[0209]

[0210] Table 11

[0211]

[0212] In step 4, the feature sub - graph is transformed into an AAM to achieve feature matching, and the steps are as follows:

[0213] 401: Establish an AAM

[0214] The AAM is represented by a two - dimensional array M[n][n], and its structure is shown in formula (I):

[0215]

[0216] In formula (I), n is the number of nodes of the feature sub - graph; m ij represents the concave - convex attribute and type attribute of the node connection line, and its data are obtained by accessing line2[m][].line_type and line2[m][].line_at respectively, where i≠j, 1≤i≤n, 1≤j≤n; line2[][].line_type is a member of the structure array line2[][], and the type of line2[][] is Line; m ii represents the concave - convex attribute, type attribute and feature base - surface attribute of the node; its data are obtained by accessing node2[][].node_at, node2[][].node_type and node2[][].node_f_face respectively. Among them, node2[][] and line2[][] are structure arrays defined based on the structures Node and Line, which are used to store the relevant information of nodes and node connection lines respectively;

[0217] The value - taking rule of the elements in the matrix M[n][n] is defined as follows:

[0218] The array element m is represented by a three - digit positive integer ii , denoted as m ii =abc, and its value is shown in formulas (II), (III), (IV).

[0219]

[0220]

[0221]

[0222] The array element m is represented by a two - digit positive integer ij , denoted as m ij =de, and its value is shown in formulas (V), (VI).

[0223]

[0224]

[0225] The AAM establishment process is as shown in the following pseudocode:

[0226]

[0227]

[0228] First, determine whether the feature subgraph AAM is the same as the predefined AAM order;

[0229] Then, determine whether the set composed of the diagonal elements of the feature subgraph AAM is equal to that of the predefined AAM;

[0230] Finally, determine whether the sets composed of the elements of each row of the feature subgraph AAM are similar to those of the predefined AAM; whether the sets composed of the elements of each row are similar means that there is a one-to-one mapping relationship between the set composed of the elements of each row of the feature subgraph AAM and the set composed of the elements of each row of the predefined AAM;

[0231] If the feature subgraph AAM has the same order as the predefined AAM, the sets composed of the diagonal elements are equal, and the sets composed of the elements of each row of the AAM are similar, then the matching is successful; otherwise, the matching is unsuccessful.

[0232] Its process is as shown in the following pseudocode:

[0233]

[0234]

[0235] Specifically in this embodiment, the AAM is represented by a two-dimensional array M[n, n], where n represents the number of nodes. According to the nodes node2[][] and the node connections line2[][] of each subpart obtained by decomposition, the AAM of the corresponding feature subgraph generated in this embodiment is as follows:

[0236]

[0237] M 1 =

[220] M 2 =

[220]

[0238]

[0239]

[0240]

[0241]

[0242] By matching each AAM with a predefined AAM, the type of machining feature it represents is identified, which are: M 6 , M G is a cavity feature, M 1 , M 2 is a through-hole feature, M3, M 4 is a through-groove feature, M A ~M 8 is a cylindrical boss, M 16 is a blind-hole feature.

[0243] In step 5, to better apply the recognition result to the process design, it is processed. The processing method is as follows:

[0244] Construct a structure Featrue_data to describe the machining feature and its related information, and define a structure array featrue[] of type Featrue_data to store the machining features;

[0245] The specific members of the structure Featrue_data include: a string-type variable featrue_id and featrue_type; a Surface_data-type variable surface; an int-type variable TAD for the tool approach direction; a double-type variable Ra; a Gtol_data-type variable gtol, which store the ID, type, feature surface, tool approach direction, roughness, and geometric tolerance of the machining feature respectively; among them, the int-type variable TAD for the tool approach direction takes values from 1 to 6, representing six directions of +x, -x, +y, -y, +z, -z respectively. Through the constructed data structure, the machining feature is associated with the MBD model information, enriching the information expressed by the machining feature.

[0246] Its algorithm flow is shown in the following pseudo-code:

[0247]

[0248] Specifically in this embodiment, a total of 11 recognized machining features are stored in the structure array featrue[], and the results are shown in Table 12.

[0249] Table 12

[0250]

[0251]

[0252] Example 4

[0253] A computer device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps of the machining feature recognition method of the AAG-based MBD model described in any one of Embodiments 1-3 are implemented.

[0254] Embodiment 5

[0255] A computer-readable storage medium stores a computer program thereon. When the computer program is executed by a processor, the steps of the machining feature recognition method of the AAG-based MBD model described in any one of Embodiments 1-3 are implemented.

Claims

1. A method for identifying machining features of an MBD model based on AAG, characterized in that, it means: based on the MBD model established in Creo software, extracting the information of the MBD model, constructing the AAG of the MBD model, and obtaining its feature subgraphs by decomposing the AAG, matching the feature subgraphs with predefined features to achieve the identification of machining features; automatically identifying the machining features in the model according to the information of the MBD model and associating them with process information, including the following steps: Step 1: Extract the information of the MBD model; The information of the MBD model includes the geometric topology information and annotation information of the MBD model; the geometric topology information includes two aspects: one is the connection relationship between faces and edges, manifested in the concavity and convexity of faces and edges, adjacent faces of faces, and adjacent faces of edges; the other is the geometric data of faces and edges, the geometric data of faces are the ID of the face, the type of the face, and the contour information on the face, and the geometric data of edges are the ID of the edge and the type of the edge; the annotation information includes tolerance information and roughness information, the tolerance information includes tolerance symbol, tolerance type, tolerance value, and the ID of the associated geometric element, whether there is a datum requirement for the tolerance, and the ID of the datum plane, and the roughness information includes the roughness value and the ID of the associated face of the roughness annotation; Step 2: Construct the AAG of the MBD model; According to the information of the MBD model, defining the attributes of the nodes and the connections between nodes in the AAG to construct the AAG of the MBD model; Step 3: Decompose the AAG to obtain its feature subgraphs; Through the AAG decomposition algorithm based on the model face, starting from the attributes of the model face, searching for the nodes with the attributes of the decomposition base face in the AAG, classifying and extracting the subgraphs of concave and convex features according to the concavity and convexity attributes of the inner contour composed edges, and judging whether there are still concave feature subgraphs in the convex feature subgraphs; then deleting the nodes corresponding to non-machining faces in the remaining AAG, and extracting the largest concave connection subgraph of the nodes with the attributes of the feature base face; through the subgraph reconstruction algorithm based on the combined base face, realizing the merging of the subgraphs of segmented features; Step 4: Match the feature subgraphs with predefined features; Representing the feature subgraphs with AAM, identifying the machining features in the model through the feature matching algorithm based on AAM and obtaining their types; Step 5: Processing the recognition results of machining features; Obtaining the feature faces of the machining features, the int type variable TAD of the tool approach direction, roughness, and tolerance information, constructing a data structure for storing the recognition results, and uniformly storing the machining features and the process information related to the machining features.

2. The method for identifying machining features of an MBD model based on AAG according to claim 1, characterized in that, in Step 1, the process of extracting the information of the MBD model is as follows: First, define the structure data Surface_data, Edge_data, Contour_data, Surffinish_data, and Gtol_data. Surface_data includes surface_id, surf_type, surface_at, in_contour, surffinish_value, and gtol_data, which are used to store the ID of the surface, the type of the surface, the concavity and convexity of the surface, the inner contour attribute of the surface, the roughness value of the surface, and the tolerance data of the surface, respectively; Edge_data includes edge_id, edge_type, edge_at, adj_surf_id, and edge_in, which are used to store the ID of the edge, the type of the edge, the concavity and convexity of the edge, the ID of the adjacent surface of the edge, and the inner contour attribute of the edge, respectively; Contour_data includes contour_type and c_edge_id, which are used to store the type of the contour and the ID of the constituent edge of the contour, respectively; Surffinish_data includes sur_symbol, sur_value, and sur_asso_element, which store the symbol, value, and roughness association element ID of the roughness, respectively; The members of Gtol_data include gtol_symbol, gtol_type, gtol_value, gtol_asso_element, and reference_id, which are used to store the symbol, type, value, associated geometric element ID, and datum plane ID of the tolerance, respectively; Then, define an array of MBD model information structure to store the information of the extracted MBD model. The array of MBD model information structure includes an array of model surface information structure surface[] defined by Surface_data, an array of model edge information structure edge[] defined by Edge_data, an array of contour information structure contour[] defined by Contour_data, an array of surface roughness information structure surffinish[] defined by Surffinish_data, and an array of tolerance information structure gtol[] defined by Gtol_data; Through the secondary development tool Creo TOOLKIT of Creo software, develop an application program to read the internal data structure of the Creo model, extract the information of the MBD model, and store it in the defined array of MBD model information structure.

3. According to the method for identifying machining features of an MBD model based on AAG described in claim 2, characterized in that the method for extracting the geometric topology information of the MBD model is: Obtain the MBD model handle through the function ProMdlCurrentGet, and use the MBD model handle as the input parameter of the traversal function. First, call ProSolidSurfaceVisit to traverse the faces of the MBD model, output the handle array of the faces, and use the elements of the handle array of the faces as input parameters to call the function to obtain the ID of the face, the type of the face, the concavity and convexity of the face, and the ID of the adjacent face in the MBD model in sequence; then, call ProSurfaceContourVisit to traverse the contours on the face, judge the contour type and obtain the ID of the contour constituent edges; finally, call ProContourEdgeVisit to obtain the handle array of the edges, use it as the input parameter of the function, and call the function to obtain the ID of the edge, the type of the edge, the concavity and convexity of the edge, and the ID of the adjacent face of the edge in sequence.

4. A method for identifying machining features of an MBD model based on AAG according to claim 2, wherein, the method for extracting annotation information of the MBD model is: Obtain the handle array of roughness by calling ProSolidSurffinishVisit, use the elements of the handle array of roughness as the input parameters of the function, and call the function to obtain the roughness symbol, roughness value, and roughness associated element ID; call ProMdlGtolVisit to traverse the tolerances of the MBD model, obtain its handle array and use the elements of the handle array as the input parameters of the function, and call the function to obtain the tolerance symbol, tolerance type, tolerance value, and the ID of the associated geometric element, and the ID of the datum plane.

5. A method for identifying machining features of an MBD model based on AAG according to claim 1, wherein, in step 2, constructing the AAG of the MBD model includes the following steps: 201: Define the nodes in the AAG and the attributes of the node connections; The nodes in the AAG correspond to the faces in the MBD model, and the node connections in the AAG correspond to the edges in the MBD model; the definitions are as follows: The attributes of the nodes in the AAG include the type of the face, the concavity and convexity of the face, the decomposition base plane, the feature base plane, and the combined base plane; Type of face: Use an integer variable to identify the type attribute of the face, which is divided into plane, cylindrical surface, conical surface, and other curved surfaces; Concavity and convexity of face: Use an integer variable to identify the concavity and convexity of the face; Decomposition base plane: Use a boolean variable to identify the decomposition base plane attribute of the face. If the face is the decomposition base plane, it is identified as True; otherwise, it is identified as False; Feature base plane: Use a boolean variable to identify the feature base plane attribute of the face. If the face is the feature base plane, it is identified as True; otherwise, it is identified as False; Combined base plane: Use an integer variable to identify the combined base plane attribute of the face. If two faces are combined base planes, the combined base plane attributes of the two faces are identified as the same integer value; The attributes of the node connections in the AAG include the type of the edge, the convexity and concavity of the edge, and the inner contour edge; Type of edge: Use an integer variable to identify the type of the edge, which is divided into straight edge, circular arc edge, and other curved edges; Convexity and concavity of edge: Use an integer variable to identify the convexity and concavity of the edge, which is divided into concave edge, convex edge, and smooth edge; Inner contour edge: Use a boolean variable to identify the inner contour edge attribute of the edge; 202: Construct the AAG of the MBD model; By searching the information of the MBD model extracted in step 1, establish the AAG; The steps are as follows: First, construct a data structure Node for storing AAG nodes and a data structure Line for storing node connections. The structure Node includes surface_id, adj_line, node_type, node_at, d_face, f_face, and c_face, which store the ID of the face, the node connection line connected to the node, the type attribute of the node, the concavity and convexity attribute of the node, the decomposed base surface attribute of the node, the feature base surface attribute of the node, and the combined base surface attribute of the node respectively; The structure Line includes edge_id, node1, node2, line_type, line_at, and in_contour, which are used to store the ID of the edge, the first node connected by the node connection line, the second node connected by the node connection line, the type attribute of the node connection line, the concavity and convexity attribute of the node connection line, and the inner contour attribute of the node connection line respectively; Define a structure array node[] of type Node and a structure array line[] of type Line respectively; The first node connected by the node connection line and the second node connected by the node connection line refer to the two end nodes of the node connection line. Second, preliminarily construct the AAG: Let node[].surface_id be equal to surface[].surface_id, and let line[].edge_id be equal to edge[].edge_id; Third, determine the connection relationship between nodes and node connection lines according to the topological relationship between the model face and the edge: Obtain the ID of the edge on the model face represented by the elements in node[], and if a certain element in line[] contains this ID, write the corresponding node[] into line[].node1 or line[].node2, and write line[] into node[].adj_line; Finally, add other member information of each element of the arrays node[] and line[]; including: ① Determine other information of node[], specifically: obtain the type of the surface according to node[].surface_id. If the surface is a plane, then node[i].node_type = 1; if the surface is a cylindrical surface, then node[i].node_type = 2; if the surface is a conical surface, then node[i].node_type = 3; if the surface is other curved surfaces, then node[i].node_type = 4; obtain the concavity and convexity of the surface according to node[].surface_id. If the surface is a concave surface, then node[i].node_at = -1; if the surface is a convex surface, then node[i].node_at = 1; if the surface with ID node[].surface_id is the decomposition base surface, then node[i].d_face = true, otherwise node[i].d_face = false; if the surface with ID node[].surface_id is the feature base surface, then node[i].f_face = true, otherwise node[i].f_face = false; if the surfaces with IDs node[i].surface_id and node[j].surface_id are combined base surfaces, then node[i].c_face = node[j].c_face = k, where k is an integer. ② Determine other information of line[], specifically: if the edges with ID line[i].edge_id are straight edges, circular arc edges, and other types of edges respectively, then they correspond to line[i].line_type = 1, line[i].line_type = 2, and line[i].line_type = 3 respectively; if the edges with ID line[i].edge_id are concave edges, smooth edges, and convex edges respectively, then they correspond to line[i].line_at = -1, line[i].line_at = 0, and line[i].line_at = 1 respectively; if the edge with ID line[i].edge_id is an inner contour edge, then line[i].in_contour = true, otherwise line[i].in_contour = false.

6. A method for machining feature recognition of an MBD model based on AAG according to claim 1, characterized in that, in step 3, the following steps are included:

301. Decompose AAG Based on the structure array node[], according to the connection relationship between nodes and the attribute information of the decomposition base surface, feature base surface, and combined base surface, split it into multiple sub-parts, obtain the node connections through the nodes included in the sub-parts, and finally output the node connections and nodes corresponding to each sub-part; 302. Reconstruct the feature sub-graph In step 301, the arrays line[] and node[] storing AAG information are decomposed into multiple sub-parts, and the nodes and node connections included in each sub-part are stored in node1[][] and line1[][] respectively. Nodes with the same combined base surface attribute are searched in node1[][], and the sub-parts where they are located are merged to achieve the reconstruction of the feature sub-graph.

7. A method for machining feature recognition of an MBD model based on AAG according to claim 6, wherein, in step 3, the specific implementation process of decomposing AAG is as follows: First, traverse node[]. If the decomposition base surface attribute of the element therein is true, then traverse the node connections connected to this node. If the node connection has an inner contour attribute and a concave edge attribute, mark this node as -1 and delete this node connection; if the node connection has an inner contour attribute and a convex edge attribute, mark this node as 1 and delete this node connection; Then, traverse the array node[] again. If the node is marked as -1, obtain the node[] and line[] connected to this node, and delete the line[] with a concave edge attribute, and write the result into the arrays node1[][] and line1[][]; if the node is marked as 1, obtain the node[] and line[] connected to this node, and write them into the arrays node1[][] and line1[][] respectively; Again, delete the elements already extracted from line[] and node[], and traverse node[] again. If node[] has a convex surface attribute, then delete the line[] connected to it; Finally, traverse node[] again. If node[] has a feature base surface attribute, extract the line[] connected to node[] and other node[] connected to the line[], and write the result into node1[][] and line1[][]; The specific implementation process of reconstructing the feature sub-graph is as follows: Traverse the array node[][]. If a certain array element node[i][k] has a combined base surface attribute, then continue to search in the array node[][] for an element node1[j][m] with the same combined base surface attribute as this array element node[i][k], and write the member data information of node1[j][m] into node1[i][k], and update line1[][] and node1[][] to get line2[m][] and node2[m][].

8. A method for machining feature recognition of an MBD model based on AAG according to claim 1, wherein, in step 4, converting the feature sub-graph into AAM to achieve feature matching, including the following steps: 401: Establish AAM AAM is represented by a two-dimensional array M[n][n], and its structure is as shown in formula (I): In formula (I), n is the number of nodes of the n-feature subgraph; m ij represents the concavity / convexity attribute and type attribute of the node connection line, m ii represents the concavity / convexity attribute, type attribute, and characteristic base surface attribute of the node; The value-taking rule of the elements in the matrix M[n][n] is defined as follows: The array element m is represented by a three-digit positive integer ii , denoted as m ii = abc, and its values are shown in formulas (II), (III), and (IV): The array element m is represented by a two-digit positive integer ij , denoted as m ij = de, and its value is shown in formulas (V) and (VI): 402: Matching of AAM First, judge whether the order of the feature sub-graph AAM is the same as the predefined AAM order; Then, determine whether the sets formed by the diagonal elements of the feature subgraph AAM and the predefined AAM are equal; Finally, determine whether the sets formed by each row element of the feature subgraph AAM and the predefined AAM are similar; whether the sets formed by each row element are similar means that there is a one-to-one mapping relationship between the set formed by each row element of the feature subgraph AAM and the set formed by each row element of the predefined AAM; If the orders of the feature subgraph AAM and the predefined AAM are the same, the sets formed by the diagonal elements are equal, and the sets formed by each row element of the AAM are similar, then the matching is successful; otherwise, the matching is unsuccessful.

9. A method for identifying machining features of an MBD model based on AAG according to claim 1, characterized in that, in step 4 and step 5, the processing method is: Construct a structure Featrue_data to describe the machining features and their related information, and define a structure array featrue[] of the structure Featrue_data to store the machining features; The specific members of the structure Featrue_data include: a string type variable featrue_id and featrue_type; a Surface_data type variable surface; an integer type variable TAD for the tool approach direction; a double type variable Ra; a Gtol_data type variable gtol, which store the ID, type, feature surface, tool approach direction, roughness, and geometric tolerance of the machining feature respectively; among them, the integer type variable TAD for the tool approach direction takes values from 1 to 6, representing six directions of +x, -x, +y, -y, +z, -z respectively.

10. A computer device, including a memory and a processor, the memory stores a computer program, characterized in that, when the processor executes the computer program, it implements the steps of the method for identifying machining features of the MBD model based on AAG according to any one of claims 1-9.

11. A computer-readable storage medium, on which a computer program is stored, characterized in that, when the computer program is executed by the processor, it implements the steps of the method for identifying machining features of the MBD model based on AAG according to any one of claims 1-9.