Geometric feature extraction method for digital twin geometric models of manufacturing equipment
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-30
- Publication Date
- 2026-08-14
AI Technical Summary
[0005]但是,上述操作过程后,简化后的三角网格与CAD STEP原始模型文件中的模型格式要求等内容均不同,难以进行有效的评估
Smart Images

Figure CN118485841B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of digital twin geometric model technology, and particularly relates to a method for extracting geometric features of digital twin geometric models of manufacturing equipment. Background Technology
[0002] Based on the functional requirements of the digital twin standard system for digital twin models in motion, physical state simulation and visualization, as well as the technical requirements of 3D graphics rendering technology for geometric models.
[0003] Digital twin geometric models are a part of digital twin technology, primarily used to create digital copies of physical objects to accurately describe their geometric features. The creation of a digital mirror virtual body is a crucial step in the construction of a digital twin, and this creation mainly relies on technologies such as 3D modeling, CAD (computer-aided design), and virtual reality / augmented reality (VR / AR).
[0004] Digital twin geometric models typically use triangular meshes as a representation. However, the CAD geometric models of manufacturing equipment usually adopt the STEP standard. Therefore, when implementing digital twin technology, it is usually necessary to obtain a corresponding triangular mesh model based on the original CAD STEP model file of the manufacturing equipment; at the same time, according to the requirements of lightweight and high fidelity in digital twin geometric models, the triangular mesh model needs to be simplified. If the fidelity of the simplified triangular mesh is insufficient after the above operations, it will affect the effectiveness of subsequent digital twin technology. Therefore, in order to ensure the effectiveness of digital twin technology, it is necessary to evaluate the simplification fidelity of the digital twin geometric model of the manufacturing equipment.
[0005] However, after the above operation, the simplified triangular mesh is different from the model format requirements in the original CAD STEP model file, making it difficult to conduct an effective evaluation.
[0006] Therefore, how to ensure the effectiveness of the simplified fidelity evaluation of digital twin geometric models of manufacturing equipment has become an urgent problem to be solved. Summary of the Invention
[0007] To address the shortcomings of the existing technology, this invention provides a method for extracting geometric features from a digital twin geometric model of manufacturing equipment, which can ensure the effectiveness of the simplified fidelity evaluation of the digital twin geometric model of manufacturing equipment (device).
[0008] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:
[0009] A method for extracting geometric features from a digital twin geometric model of manufacturing equipment includes the following steps:
[0010] S1. Read the STEP universal standard format three-dimensional CAD model of each component of the manufacturing equipment, extract the file information in the CAD model, the file information includes geometric information and topological information; and construct a triangular mesh model corresponding to the CAD model based on the extracted file information.
[0011] S2. Identify and reduce outlier and redundant vertices in the triangular mesh model;
[0012] S3. Use the Half-Edge structure to represent the triangular mesh model, and extract the neighborhood geometric features of the triangular mesh model based on the Half-Edge structure;
[0013] S4. Construct a graph encoder model MeshEncoder to extract shape semantic features based on the neighborhood geometric features of the triangular mesh model; and train the graph encoding model MeshEncoder.
[0014] S5. Using the trained graph encoder model MeshEncoder, process the neighborhood geometric features extracted in step S3 to obtain the shape semantic features of the triangular mesh model.
[0015] S6. Compare and analyze the extracted shape semantic features with the original CAD model to evaluate the fidelity of the simplified digital twin model in terms of geometry and topology.
[0016] Compared with the prior art, the present invention has the following beneficial effects:
[0017] This method first extracts the geometric and topological information from a STEP-formatted CAD model. Using this information, a triangular mesh model corresponding to the original CAD model can be constructed. This step ensures the accuracy and completeness of information transfer from the original CAD model to the triangular mesh model. Then, by identifying and reducing outliers and redundant vertices in the triangular mesh model, the model's complexity is reduced while maintaining its basic shape and topological structure, improving the efficiency of subsequent processing. Next, a Half-Edge structure is used to represent the triangular mesh model, enabling efficient extraction of its neighborhood geometric features, laying the foundation for subsequent shape semantic feature extraction. Then, a trained graph encoding model, MeshEncoder, is used to process the neighborhood geometric features of the triangular mesh model to extract its shape semantic features. The extracted shape semantic features are compared with the original CAD model to evaluate the fidelity of the simplified digital twin model in terms of geometry and topology. This allows for a quantitative assessment of the similarity between the simplified digital twin model and the original CAD model, thus verifying the effectiveness and fidelity of the above technical solution.
[0018] In summary, this method can ensure the effectiveness of the simplified fidelity evaluation of digital twin geometric models of manufacturing equipment (devices).
[0019] Preferably, S1 includes:
[0020] S11. Parse the STEP files of the CAD models of each component of the manufacturing equipment and extract the geometric and topological information from the STEP files; the geometric information includes basic geometric data such as points, lines, and surfaces;
[0021] S12. Construct mesh vertices based on extracted geometric information; traverse the point information in the extracted geometric information, use these point information as mesh vertices of the triangular mesh model, and assign a unique identifier and position coordinates to each vertex;
[0022] S13. Triangulation is performed using topological information; based on the extracted topological information, the connection relationships between each geometric feature node are identified; based on these connection relationships, triangulation is performed on the vertices related to each geometric feature node; after completing the triangulation, the triangular face information of the triangular mesh model is obtained, including the vertex index and normal direction of each triangle.
[0023] In this way, converting the CAD model into a triangular mesh model makes it easier to perform digital twin-related calculations and analyses, improving data processing efficiency. By accurately extracting the geometric and topological information from the STEP file and constructing a triangular mesh model based on this information, the accuracy and realism of the digital twin model can be ensured.
[0024] The constructed triangular mesh model can be used for subsequent simplification fidelity evaluation. By comparing the differences in geometry and topology between the simplified digital twin model and the original CAD model, the fidelity of the simplification operation can be assessed, providing a reliable reference for the application of digital twin models.
[0025] Preferably, in S2, the process of reducing redundant vertices in the triangular mesh model includes:
[0026] First, a KD-Tree is constructed to represent the vertices in the triangular mesh model. The KD-Tree is constructed by recursively dividing the k-dimensional space into two subspaces. Each division selects a dimension and uses the median of that dimension as the dividing point.
[0027] Then, traverse each vertex in the grid and use KD-Tree to perform nearest neighbor search to find the vertex that is closest to the current vertex; if the distance between these two vertices is less than a preset distance threshold g, and they do not share an edge or face, then one of these two vertices is considered redundant.
[0028] Next, it is checked whether two vertices are shared by multiple faces, and the vertex that is not shared by multiple faces is removed as a redundant vertex.
[0029] By removing redundant vertices, the number of vertices in the triangular mesh model can be significantly reduced, thereby lowering the model's complexity. This helps reduce computational load and improve the efficiency of subsequent processing. During the removal of redundant vertices, by considering factors such as the distance between vertices, whether they share edges or faces, and whether they contribute to the formation of multiple faces, it can be ensured that the removed vertices have minimal impact on the model's shape. Therefore, the simplified model still maintains high geometric fidelity. Furthermore, the introduction of the KD-Tree makes the search and comparison of vertices in the triangular mesh model more efficient. This helps accelerate the identification and removal of redundant vertices, improving the overall execution efficiency of the algorithm.
[0030] Preferably, in S2, the process of reducing outlier vertices in the triangular mesh model includes: traversing each triangular facet of the triangular mesh model and checking whether the vertex of each facet already exists in the constructed KD-Tree; if a vertex does not have a corresponding node in the KD-Tree, or its reference count is lower than a preset counting threshold, it is considered an outlier vertex; finally, all detected outlier vertices are removed.
[0031] Thus, by removing outliers, the number of vertices and triangles in the triangular mesh model can be significantly reduced, simplifying the model structure. This helps reduce model complexity and storage requirements, improving the efficiency of subsequent processing and analysis. Furthermore, outliers are usually caused by data noise, model transformation errors, or other reasons, and they can negatively impact the shape and geometric features of the model. Removing these outliers improves the model's data quality, making it more accurately reflect the shape and features of real objects. Moreover, by utilizing KD-Trees for vertex lookup and reference counting, the process of identifying and removing outliers can be accelerated, improving the overall algorithm's execution efficiency.
[0032] Preferably, in S3, in the Half-Edge structure, the triangular mesh model is represented by vertices, half-edges, and faces;
[0033] The vertex is used to store position information and a pointer to any of its outgoing edges; each undirected edge is split into two directed half edges, each half edge containing pointers to its starting vertex, adjacent face, next half edge, and dual half edge; the face is used to store a pointer to any of the boundary half edges belonging to the face and other attributes of the face, including normal vectors and texture coordinates.
[0034] This setup allows for quick access to any outgoing edge of a vertex via a vertex pointer, facilitating traversal of all vertices and faces adjacent to that vertex. Each half-edge contains pointers to its starting vertex, adjacent faces, the next half-edge, and its dual half-edge, making it easy to access all elements related to the current half-edge during mesh traversal. Furthermore, in the Half-Edge structure, undirected edges are split into two directed half-edges, avoiding data redundancy when storing edge information. Since each edge only needs to be stored once, the two directions of the edge can be represented through the association between the half-edges.
[0035] Preferably, in S3, when extracting the neighborhood geometric features of the triangular mesh model, for any vertex v of the triangular mesh model, its neighborhood is taken as a subset of the vertex, using N(v) = {v...} j ∈V|(v,v j V ∈ E} represents the set of vertices of the triangular mesh model, and E represents the set of edges of the triangular mesh model; seven neighborhood geometric features of each vertex are extracted, denoted as V ∈ E}. in Let represent the average area of the triangle in the neighborhood of a vertex. This represents the variance of the interior angles of the neighborhood triangle. H represents the average included angle of the neighborhood, and H represents the average curvature of the neighborhood. The mean of the neighborhood curvature difference is represented by K, where K represents the neighborhood Gaussian curvature. This represents the mean of the Gaussian curvature difference in the neighborhood.
[0036] This setup extracts seven neighborhood geometric features for each vertex, providing crucial foundational information for subsequent model analysis, processing, and applications. These features effectively describe the geometry and properties of the vertex and its neighborhood.
[0037] Preferably, in S3, the extracted neighborhood geometric features are further preprocessed; the preprocessing includes robust scaling, Sigmoid transformation, and Min-Max normalization.
[0038] This improves the stability and usability of neighborhood geometric features in the triangular mesh model. Robust scaling and Min-Max normalization eliminate scale differences between different features, making all features numerically comparable; while the Sigmoid transform further enhances the nonlinear expressiveness of the features, improving the model's ability to handle complex problems.
[0039] Preferably, in S4, the backbone network of the graph encoder model MeshEncode exists in the form of an interface and is implemented using the backbone of a preset MeshGCN model, MeshSAGE model, or MeshGAT model; the graph node embedding features output by MeshEncoder are divided into an n-dimensional mean vector μ and an n-dimensional variance vector log(σ). 2 And the n components of the mean vector are defined as the n shape semantic features of the grid model.
[0040] In this way, MeshEncode's backbone network exists as an interface, meaning it can easily integrate different graph neural network models as its core components. This design brings great flexibility, allowing the selection of an appropriate backbone network based on the specific task requirements. The pre-defined MeshGCN, MeshSAGE, and MeshGAT models provide a variety of graph neural network options, each with its unique advantages and application scenarios.
[0041] In addition, the graph node embedding features output by MeshEncoder are divided into an n-dimensional mean vector and an n-dimensional variance vector. This processing method not only provides mean information of node features but also includes variance information of node features, thus enabling a more comprehensive description of the feature distribution of nodes. The n components of the mean vector are defined as n shape semantic features of the mesh model. This means that each component corresponds to a certain shape characteristic of the mesh model, such as side length, angle, curvature, etc. This definition method allows the shape features of the mesh model to be quantified and can be easily used for subsequent analysis and processing.
[0042] Preferably, the MeshGAT model structure includes: a GAT module with multi-head attention and three GCN modules as the backbone, used to extract shape semantic features based on the neighborhood geometric features of the triangular mesh model; a TopK pooling module for graph node downsampling; and two global average pooling layers (GAP) and two global max pooling layers (GMP) to extract global features of the graph and concatenate them; after summing the global features extracted by different network layers, two fully connected layers (FC) are used for classification prediction, and four batch normalization layers (BN) are used to improve training stability.
[0043] The MeshGCN model structure includes: four GCN modules as the backbone, used to extract shape semantic features based on the neighborhood geometric features of the triangular mesh model; one global average pooling layer (GAP) to extract global features of the graph; two fully connected layers (FC) for classification prediction; and three batch normalization layers (BN) to improve training stability. Specifically, for the GCN layers, the reciprocal of the normalized distance between mesh vertices is introduced as the edge weight to construct a weighted graph, thereby improving the effectiveness of MeshGCN in extracting mesh shape semantic features.
[0044] The MeshSAGE model structure includes: four GraphSAGE modules as the backbone, used to extract shape semantic features based on neighborhood geometric features of the triangular mesh model; one global average pooling layer (GAP) to extract global features of the graph; two fully connected layers (FC) for classification prediction; and three batch normalization layers (BN) to improve training stability.
[0045] With this setup, the MeshGAT model, by introducing a multi-head attention mechanism and combining it with a GCN module, can more accurately extract shape semantic features; the MeshGCN model improves its shape semantic feature extraction capability by constructing a weighted graph using the inverse of the normalized distance between mesh vertices; and the MeshSAGE model effectively aggregates neighborhood information through multiple GraphSAGE modules to extract shape semantic features. These three models are suitable for different application scenarios, and the appropriate model can be selected based on specific needs.
[0046] Preferably, in S4, a VMeshAE model is also constructed to train the graph coding model MeshEncoder through an unsupervised adjacency matrix reconstruction task;
[0047] The VMeshAE model includes a graph encoder model MeshEncoder, a parameter re-parameterization module, and a graph decoder MeshDecoder. The parameter re-parameterization module is used to re-parameterize the graph node embedding features output by the graph encoder model MeshEncoder. The graph decoder MeshDecoder is used to attempt to reconstruct the original adjacency matrix based on the re-parameterized graph node embedding features and outputs the inner product matrix of each node embedding feature as the reconstructed adjacency matrix.
[0048] A loss function is also constructed to measure the difference between the original adjacency matrix and the reconstructed adjacency matrix; and by minimizing the loss function, MeshEncoder learns a more meaningful embedding representation to accurately capture the shape semantic features of the mesh model.
[0049] Thus, the constructed VMeshAE model, trained on the MeshEncoder graph coding model through an unsupervised adjacency matrix reconstruction task, effectively learns the intrinsic structure and shape semantic features of the mesh model, exhibiting high accuracy and robustness. This model has broad application prospects and significant research value. Attached Figure Description
[0050] To make the objectives, technical solutions, and advantages of the invention clearer, the invention will now be described in further detail with reference to the accompanying drawings, wherein:
[0051] Figure 1 This is a flowchart of the method;
[0052] Figure 2 This is a schematic diagram illustrating the construction of the triangular network model and the extraction of geometric features in the mesh domain in the embodiment.
[0053] Figure 3 This is a schematic diagram of the basic structure of the STEP file in the embodiment;
[0054] Figure 4 This is a schematic diagram illustrating the extraction of semantic features of grid shape in the embodiment;
[0055] Figure 5 This is a schematic diagram of the MeshGCN model in the embodiment;
[0056] Figure 6 This is a schematic diagram of the MeshSAGE model in the embodiment;
[0057] Figure 7 This is a schematic diagram of the MeshGAT model in the embodiment;
[0058] Figure 8 This is a schematic diagram of the VMeshAE model structure in the embodiment;
[0059] Figure 9 This is a schematic diagram of the CAD model and meshing result of the hobbing holder in the embodiment;
[0060] Figure 10 This is a schematic diagram of the shape semantic feature extraction results of the hobbing holder model in the embodiment. Detailed Implementation
[0061] The following detailed explanation illustrates the specific implementation methods:
[0062] Example:
[0063] like Figure 1 As shown in the figure, this embodiment discloses a method for extracting geometric features from a digital twin geometric model of manufacturing equipment, including the following steps:
[0064] S1, such as Figure 2 As shown, the STEP standard format 3D CAD model of each component of the manufacturing equipment is read, and the file information in the CAD model is extracted. The file information includes geometric information and topological information. Based on the extracted file information, a triangular mesh model corresponding to the CAD model is constructed.
[0065] The STEP AP203 standard primarily employs methods such as BRep (Boundary Representation), B-Spline, and NURBS (Non-Uniform Rational B-Spline) to represent the topology and geometric properties of 3D CAD models. BRep defines the topological structures of the geometric model, including SOLID, SHELL, and FACE, while B-Spline and NURBS express curve and surface information through basis functions and control points.
[0066] In a STEP file based on the EXPRESS model, information is primarily stored in the form of "Node I (referring to node 1, referencing node 2, ..., referencing node K)," representing node I and the K nodes it references, such as... Figure 3 As shown.
[0067] like Figure 2 In the specific implementation shown, S1 includes:
[0068] S11. Parse the STEP files of the CAD models of each component of the manufacturing equipment and extract the geometric and topological information from the STEP files; the geometric information includes basic geometric data such as points, lines, and surfaces;
[0069] S12. Construct mesh vertices based on extracted geometric information; traverse the point information in the extracted geometric information, use these point information as mesh vertices of the triangular mesh model, and assign a unique identifier and position coordinates to each vertex;
[0070] S13. Triangulation using topological information: Based on the extracted topological information, identify the connections between geometric feature nodes; based on these connections, triangulate the vertices related to each geometric feature node; after triangulation, obtain the triangular face information of the triangular mesh model, including the vertex index and normal direction of each triangle. During the triangulation process in S13, ensure that the generated triangles meet certain quality standards (such as side length ratios, angles, etc.) to guarantee the quality of the triangular mesh model.
[0071] In this way, converting the CAD model into a triangular mesh model facilitates digital twin-related calculations and analyses, improving data processing efficiency. By accurately extracting geometric and topological information from the STEP file and constructing a triangular mesh model based on this information, the accuracy and realism of the digital twin model can be ensured. Furthermore, the constructed triangular mesh model can be used for subsequent simplification fidelity evaluation. By comparing the differences in geometry and topology between the simplified digital twin model and the original CAD model, the fidelity of the simplification operation can be assessed, providing a reliable reference for the application of digital twin models.
[0072] S2. Identify and reduce outlier and redundant vertices in the triangular mesh model.
[0073] In practice, the process of reducing redundant vertices in the triangular mesh model includes:
[0074] First, a KD-Tree is constructed to represent the vertices in the triangular mesh model. The KD-Tree is constructed by recursively dividing the k-dimensional space into two subspaces. Each division selects a dimension and uses the median of that dimension as the dividing point.
[0075] Then, traverse each vertex in the grid and use KD-Tree to perform nearest neighbor search to find the vertex that is closest to the current vertex; if the distance between these two vertices is less than a preset distance threshold g, and they do not share an edge or face, then one of these two vertices is considered redundant.
[0076] Next, it is checked whether two vertices are shared by multiple faces, and the vertex that is not shared by multiple faces is removed as a redundant vertex.
[0077] Since the sizes of each mesh model are different, the spatial granularity g should be based on the overall size range of the mesh model, as shown in Equation 1. In the equation, r∈[0,1] represents the spatial granularity ratio, which is the proportion of the spatial granularity to the overall size range of the mesh model, and x,y,z represent the position coordinates of the vertices of the mesh model in each dimension.
[0078] g=r·||(x max -x min y max -y min , z max -z min ) T || (1)
[0079] By removing redundant vertices, the number of vertices in the triangular mesh model can be significantly reduced, thereby lowering the model's complexity. This helps reduce computational load and improve the efficiency of subsequent processing. During the removal of redundant vertices, by considering factors such as the distance between vertices, whether they share edges or faces, and whether they contribute to the formation of multiple faces, it can be ensured that the removed vertices have minimal impact on the model's shape. Therefore, the simplified model still maintains high geometric fidelity. Furthermore, the introduction of the KD-Tree makes the search and comparison of vertices in the triangular mesh model more efficient. This helps accelerate the identification and removal of redundant vertices, improving the overall execution efficiency of the algorithm.
[0080] The process of reducing outliers in a triangular mesh model includes: traversing each triangular facet of the triangular mesh model and checking whether the vertices of each facet already exist in the constructed KD-Tree; if a vertex does not have a corresponding node in the KD-Tree (i.e., the vertex is not in the constructed KD-Tree space), or its reference count (i.e., the number of triangular faces involved in its formation) is lower than a preset counting threshold, it is considered an outlier vertex; finally, all detected outliers are removed.
[0081] Thus, by removing outliers, the number of vertices and triangles in the triangular mesh model can be significantly reduced, simplifying the model structure. This helps reduce model complexity and storage requirements, improving the efficiency of subsequent processing and analysis. Furthermore, outliers are usually caused by data noise, model transformation errors, or other reasons, and they can negatively impact the shape and geometric features of the model. Removing these outliers improves the model's data quality, making it more accurately reflect the shape and features of real objects. Moreover, by utilizing KD-Trees for vertex lookup and reference counting, the process of identifying and removing outliers can be accelerated, improving the overall algorithm's execution efficiency.
[0082] S3. Use the Half-Edge structure to represent the triangular mesh model, and extract the neighborhood geometric features of the triangular mesh model based on the Half-Edge structure.
[0083] In practical implementation, in the Half-Edge structure, the triangular mesh model is represented by vertices, half-edges, and faces;
[0084] Vertex: Stores position information (such as x, y, z coordinates) and a pointer to any of its outgoing edges.
[0085] Half-Edge: Each undirected edge is split into two directed half-edges. Each half-edge contains pointers to its starting vertex, adjacent face, next half-edge, and dual half-edge.
[0086] Face: Stores pointers to any half of the boundary of the face and other properties of the face (such as normal vectors, texture coordinates, etc.).
[0087] This setup allows for quick access to any outgoing edge of a vertex via a vertex pointer, facilitating traversal of all vertices and faces adjacent to that vertex. Each half-edge contains pointers to its starting vertex, adjacent faces, the next half-edge, and its dual half-edge, making it easy to access all elements related to the current half-edge during mesh traversal. Furthermore, in the Half-Edge structure, undirected edges are split into two directed half-edges, avoiding data redundancy when storing edge information. Since each edge only needs to be stored once, the two directions of the edge can be represented through the association between the half-edges.
[0088] When extracting neighborhood geometric features of a triangular mesh model, for any vertex v in the triangular mesh model, its neighborhood is considered as a subset of the vertex, represented by N(v) = {v...} j ∈V|(v,v j V ∈ E} represents the set of vertices of the triangular mesh model, and E represents the set of edges of the triangular mesh model; seven neighborhood geometric features of each vertex are extracted, denoted as V ∈ E}. in Let represent the average area of the triangle in the neighborhood of a vertex. This represents the variance of the interior angles of the neighborhood triangle. H represents the average included angle of the neighborhood, and H represents the average curvature of the neighborhood. The mean of the neighborhood curvature difference is represented by K, where K represents the neighborhood Gaussian curvature. This represents the mean of the Gaussian curvature difference in the neighborhood.
[0089] The specific definitions and calculation methods for the above 7 neighborhood geometric features are as follows.
[0090] (1) Average area of neighborhood triangles
[0091] The mean area of triangles within the neighborhood of a grid vertex is used to measure the fineness of the grid within that vertex's neighborhood. A smaller value for this feature indicates a higher level of grid fineness within the vertex's neighborhood. For a grid vertex v... i For any triangular facet within the neighborhood, its area A ijk It can be composed of three vertices v i v j and v k Spatial position coordinates The outer product operation is calculated as shown in Equation 2. For mesh vertex v i The average area of the triangles in the neighborhood can be calculated for all triangular faces within the neighborhood. As shown in Equation 3, ||·||2 represents the Euclidean distance, and |N(v i | represents vertex v i The neighborhood N(v) i The number of vertices in the model. The gear hobbing machine component model used in this project has design dimensions in millimeters (mm), therefore, the dimensions are expressed in square millimeters (mm²). 2 () serves as the dimension of this characteristic.
[0092]
[0093]
[0094] (2) Neighborhood average triangle interior angle variance
[0095] The regularity of a triangle's shape is called its regularity. The variance of a triangle's interior angles can be used as a measure of regularity. For example, an equilateral triangle has zero variance and a relatively regular shape; a long, narrow triangle has a larger variance and a less regular shape. The mean of the variances of the interior angles of all triangles within the neighborhood of a grid vertex describes the shape distribution of the interior angles of each triangle within that neighborhood. For a grid vertex v... i For any triangular facet within its neighborhood, the radian values (α) of its three interior angles are given by... i α j and, α k It can be determined by its three vertices v i v j and v k Spatial position coordinates The result is shown in Equation 4. Based on the obtained interior angles of the triangle, the variance of its interior angles can then be calculated. As shown in Equation 5, for all triangular faces within the neighborhood of a grid vertex, the average variance of the interior angles of the triangles is... As shown in Equation 6.
[0096]
[0097]
[0098]
[0099] (3) Average angle of neighborhood
[0100] The mean angle between adjacent edges within a vertex's neighborhood is used to measure the degree of mesh refinement in that vertex's neighborhood. A smaller mean angle indicates a higher degree of mesh refinement in that vertex's neighborhood. (Mesh vertex v) i Any pair of adjacent edges e within the neighborhood ij =(v i ,v j ) and e ik =(v i ,v k The included angle θ ijk It can be generated by grid vertex v i and its two adjacent vertices v in its neighborhood j ,v k Spatial position coordinates The calculations are shown in Equations 7 and 8. This method uses radians (rad) as the unit of measurement for this feature.
[0101]
[0102]
[0103] (4) Neighborhood mean curvature H
[0104] In three-dimensional space, the average curvature H of a two-dimensional manifold surface is defined as the average of the two principal curvatures in its neighborhood, ranging from [0, +∞). It measures the relative curvature of the neighborhood surface within the overall manifold surface; a larger average curvature indicates a greater degree of curvature. In discrete mesh surfaces, the average curvature is calculated using the method shown in Equation 9, where (v... i v j ) indicates that the neighborhood contains vertex v i All edges, ρ ij and ρ ji Representing edges (v) i v j ) and (v j , i v) is located within the opposite angles of two adjacent triangles, where cot represents the cotangent value of the opposite angle. and Represents the spatial coordinates of two vertices, A ijk Represents vertex v i The area of each triangle in the neighborhood.
[0105]
[0106] (5) Mean value of neighborhood mean curvature difference
[0107] To further measure the change in average curvature within the neighborhood of a grid vertex, the mean of the first-order differential of the neighborhood average curvature is introduced, which can be obtained from the mean of the curvature of vertex v and other vertices v in its neighborhood.j The difference in mean curvature An approximate calculation is shown in Equation 10. Where H... j Represents vertex v j The average curvature.
[0108]
[0109] (6) Neighborhood Gaussian curvature K
[0110] For a two-dimensional manifold mesh in three-dimensional space, its Gaussian curvature K is defined as the product of the two principal curvatures in the neighborhood, and its value ranges from [0, +∞). Gaussian curvature can effectively measure the flatness of the neighborhood surface; the smaller the Gaussian curvature, the flatter the neighborhood surface; the larger the Gaussian curvature, the sharper the neighborhood surface. The Gaussian curvature approximation method shown in Equation 11 is used for discrete mesh surfaces, where θ... ijk A represents the radian value of the angle between adjacent edges within the vertex's neighborhood. ijk Represents the grid vertex v i The area of each triangle within the neighborhood.
[0111]
[0112] (7) Mean of Gaussian curvature difference in neighborhood
[0113] To further measure the variation of Gaussian curvature within the neighborhood of a grid vertex, the mean of the first-order derivative of the neighborhood mean curvature is introduced. This mean can be obtained by the difference between the Gaussian curvature of a vertex and the curvature of other vertices in its neighborhood. An approximate calculation is shown in Equation 12. Where v j Let N(v) represent the other vertices within the neighborhood of a grid vertex v, and K represent the Gaussian curvature of the grid vertex v. j It represents the Gaussian curvature of its neighboring vertices.
[0114]
[0115] In this way, by calculating features such as the average area of the neighborhood triangle and the average variance of the interior angles of the neighborhood triangle, we can obtain geometric information about the region surrounding the vertex, such as the flatness and undulation of the region. The average neighborhood curvature and the average neighborhood Gaussian curvature provide direct information about the curvature of the vertex's neighborhood region. This is crucial for identifying convex, concave, or smooth regions in the model. The mean difference of the neighborhood curvature and the mean difference of the neighborhood Gaussian curvature reflect the changes in the curvature of the vertex's neighborhood region. This information is very useful for analyzing local details and feature variations in the model. The average neighborhood angle provides a basis for understanding the angular distribution of triangles around the vertex, helping to identify sharp or smooth transition regions.
[0116] For each vertex, seven neighborhood geometric features are extracted, providing crucial foundational information for subsequent model analysis, processing, and applications. These features effectively describe the geometry and properties of the vertex and its neighborhood.
[0117] In practice, the extracted neighborhood geometric features are also preprocessed; the preprocessing includes robust scaling, Sigmoid transformation, and Min-Max normalization.
[0118] This improves the stability and usability of neighborhood geometric features in the triangular mesh model. Robust scaling and Min-Max normalization eliminate scale differences between different features, making all features numerically comparable; while the Sigmoid transform further enhances the nonlinear expressiveness of the features, improving the model's ability to handle complex problems.
[0119] S4, such as Figure 4 As shown, a graph encoder model MeshEncoder is constructed to extract shape semantic features based on the neighborhood geometric features of the triangular mesh model; and the graph encoding model MeshEncoder is trained.
[0120] The backbone network of the graph encoder model MeshEncode exists in the form of an interface and is implemented using the backbone of a pre-defined MeshGCN model, MeshSAGE model, or MeshGAT model. The graph node embedding features output by MeshEncoder are divided into an n-dimensional mean vector μ and an n-dimensional variance vector log(σ). 2 And the n components of the mean vector are defined as the n shape semantic features of the grid model.
[0121] MeshEncode's backbone network exists as an interface, meaning it can easily integrate different graph neural network models as its core. This design provides great flexibility, allowing the selection of an appropriate backbone network based on the specific task requirements. The pre-defined MeshGCN, MeshSAGE, and MeshGAT models offer a variety of graph neural network options, each with its unique advantages and application scenarios. Furthermore, the graph node embedding features output by MeshEncoder are divided into an n-dimensional mean vector and an n-dimensional variance vector. This processing method not only provides the mean information of the node features but also includes the variance information, thus providing a more comprehensive description of the node feature distribution. The n components of the mean vector are defined as the n shape semantic features of the mesh model. This means that each component corresponds to a certain shape characteristic of the mesh model, such as side length, angle, curvature, etc. This definition method quantifies the shape features of the mesh model and facilitates its use in subsequent analysis and processing.
[0122] In practical implementation, the MeshGCN model structure includes: four GCN modules as the backbone, used to extract shape semantic features based on the neighborhood geometric features of the triangular mesh model; one global average pooling layer (GAP) to extract global features of the graph; two fully connected layers (FC) for classification prediction; and three batch normalization layers (BN) to improve training stability. Figure 5 As shown, for the GCN layer, the reciprocal of the normalized distance between grid vertices is introduced as the edge weight to construct a weighted graph, thereby improving the effectiveness of MeshGCN in extracting semantic features of grid shape. In the figure, MeshGCN takes the graph structure data (Input) constructed by the neighborhood geometric features of grid vertices as input and outputs a 7-dimensional global feature vector (Output) for loss function calculation during the pre-training process of the MeshGCN network model, where v represents a grid vertex (graph node), x represents the neighborhood geometric features of a grid vertex, and e represents the weight of the edge between two adjacent vertices.
[0123] The MeshSAGE model structure includes: four GraphSAGE modules as the backbone, used to extract shape semantic features based on the neighborhood geometric features of the triangular mesh model; one global average pooling layer (GAP) to extract global features of the graph; two fully connected layers (FC) for classification prediction; and three batch normalization (BN) layers to improve training stability. Figure 6 As shown in the figure, MeshSAGE takes graph structure data (Input) constructed from the neighborhood geometric features of the grid vertices as input and outputs a 7-dimensional global feature vector (Output) for loss function calculation during the pre-training process of the MeshSAGE network model.
[0124] The MeshGAT model structure includes: a GAT module incorporating multi-head attention and three GCN modules as the backbone, used to extract shape semantic features based on the neighborhood geometric features of the triangular mesh model; a TopK pooling module for graph node downsampling; and two Global Average Pooling (GAP) layers and two Global Max Pooling (GMP) layers to extract global graph features and concatenate them; the global features extracted from different network layers are summed and then used with two fully connected (FC) layers for classification prediction, and four batch normalization (BN) layers are used to improve training stability. Figure 7 As shown in the figure, MeshGAT takes graph structure data (Input) constructed from the neighborhood geometric features of the mesh vertices as input and outputs a 7-dimensional global feature vector (Output) for calculating the loss function during the pre-training process of the MeshGAT network model.
[0125] With this setup, the MeshGAT model, by introducing a multi-head attention mechanism and combining it with a GCN module, can more accurately extract shape semantic features; the MeshGCN model improves its shape semantic feature extraction capability by constructing a weighted graph using the inverse of the normalized distance between mesh vertices; and the MeshSAGE model effectively aggregates neighborhood information through multiple GraphSAGE modules to extract shape semantic features. These three models are suitable for different application scenarios, and the appropriate model can be selected based on specific needs.
[0126] In practice, a VMeshAE model is also constructed to train the graph coding model MeshEncoder through an unsupervised adjacency matrix reconstruction task; such as Figure 8 As shown, the VMeshAE model includes a graph encoder model MeshEncoder, a parameter-increasing module, and a graph decoder MeshDecoder. The parameter-increasing module is used to reparameterize the graph node embedding features output by the graph encoder model MeshEncoder. The graph decoder MeshDecoder is used to attempt to reconstruct the original adjacency matrix based on the reparameterized graph node embedding features and outputs the inner product matrix of each node embedding feature as the reconstructed adjacency matrix. A loss function is also constructed to measure the difference between the original adjacency matrix and the reconstructed adjacency matrix. By minimizing the loss function, MeshEncoder learns a more meaningful embedding representation to accurately capture the shape semantic features of the mesh model.
[0127] Thus, the constructed VMeshAE model, trained on the MeshEncoder graph coding model through an unsupervised adjacency matrix reconstruction task, effectively learns the intrinsic structure and shape semantic features of the mesh model, exhibiting high accuracy and robustness. This model has broad application prospects and significant research value.
[0128] VMeshAE (Variational Graph Mesh Autoencoder) is an autoencoder model designed for 3D geometric model mesh data. It mainly consists of two parts: a graph encoder (MeshEncoder) and a graph decoder (MeshDecoder).
[0129] MeshEncoder (Graph Encoder):
[0130] The graph encoder takes as input a graph structure data constructed from the neighborhood geometric features of the vertices of a geometric model mesh. Specifically, for each mesh vertex, the encoder considers the geometric features of its neighboring vertices (such as position, normals, texture coordinates, etc.) and constructs a graph structure based on these features. Nodes in the graph structure represent mesh vertices, and edges represent the connections between vertices. Then, the encoder extracts and aggregates the features of these nodes through a series of graph convolution operations or other graph neural network techniques to generate an embedding feature for each node.
[0131] MeshDecoder: Image Decoder
[0132] The graph decoder takes reparameterized graph node embeddings as input. Reparameterization is a technique used during training to sample latent variables (such as the mean and standard deviation in a VAE) to enable backpropagation. The decoder takes these embeddings and generates the output through a series of graph neural network layers or other decoding operations. In this particular VMeshAE model, the decoder's output is the inner product matrix of the node embeddings. This inner product matrix captures the similarity or correlation between nodes and is used to calculate the loss function for subsequent training.
[0133] Training loss function:
[0134] Training a VMeshAE model typically involves multiple loss functions, including reconstruction loss (which measures the difference between the input and output), KL divergence loss (which measures the difference between the distribution of the latent variable and the prior distribution, common in VAEs), and other possible regularization terms. Inner product matrices are often used to define some form of similarity or relevance loss, which encourages the model to learn meaningful node embeddings that capture semantic relationships between vertices while preserving geometric structure.
[0135] By jointly optimizing these loss functions, the VMeshAE model can learn the mapping from the geometric model mesh to its latent representation and reconstruct the original geometry from the latent representation. This makes VMeshAE potentially valuable for tasks such as geometry analysis, generation, editing, and compression.
[0136] S5. Using the trained graph encoder model MeshEncoder, process the neighborhood geometric features extracted in step S3 to obtain the shape semantic features of the triangular mesh model.
[0137] S6. Compare and analyze the extracted shape semantic features with the original CAD model to evaluate the fidelity of the simplified digital twin model in terms of geometry and topology.
[0138] To facilitate better understanding, we will illustrate this with a shape semantic feature extraction result performed using this method. The structure is a hob carriage model; Figure 9 The left side shows the original CAD model, and the right side shows the corresponding triangular mesh model. Figure 10 To extract the shape semantic features, the simplified digital twin model can be evaluated for its fidelity in geometry and topology by comparing the extracted shape semantic features with the original CAD model.
[0139] This method first extracts the geometric and topological information from a STEP-formatted CAD model. Using this information, a triangular mesh model corresponding to the original CAD model can be constructed. This step ensures the accuracy and completeness of information transfer from the original CAD model to the triangular mesh model. Then, by identifying and reducing outliers and redundant vertices in the triangular mesh model, the model's complexity is reduced while maintaining its basic shape and topological structure, improving the efficiency of subsequent processing. Next, a Half-Edge structure is used to represent the triangular mesh model, enabling efficient extraction of its neighborhood geometric features, laying the foundation for subsequent shape semantic feature extraction. Then, a trained graph encoding model, MeshEncoder, is used to process the neighborhood geometric features of the triangular mesh model to extract its shape semantic features. The extracted shape semantic features are compared with the original CAD model to evaluate the fidelity of the simplified digital twin model in terms of geometry and topology. This allows for a quantitative assessment of the similarity between the simplified digital twin model and the original CAD model, thus verifying the effectiveness and fidelity of the above technical solution. This method can ensure the effectiveness of simplified fidelity evaluation of digital twin geometric models of manufacturing equipment (devices).
[0140] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit the technical solutions. Those skilled in the art should understand that any modifications or equivalent substitutions to the technical solutions of the present invention without departing from the spirit and scope of the present invention should be covered within the scope of the claims of the present invention.
Claims
1. A method for extracting geometric features from a digital twin geometric model of manufacturing equipment, characterized in that, Includes the following steps: S1. Read the STEP universal standard format three-dimensional CAD model of each component of the manufacturing equipment, extract the file information in the CAD model, the file information includes geometric information and topological information; and construct a triangular mesh model corresponding to the CAD model based on the extracted file information. S2. Identify and reduce outlier and redundant vertices in the triangular mesh model; S3. Use the Half-Edge structure to represent the triangular mesh model, and extract the neighborhood geometric features of the triangular mesh model based on the Half-Edge structure; S4. Construct a graph encoder model MeshEncoder to extract shape semantic features based on the neighborhood geometric features of the triangular mesh model; and train the graph encoding model MeshEncoder. S5. Using the trained graph encoder model MeshEncoder, process the neighborhood geometric features extracted in step S3 to obtain the shape semantic features of the triangular mesh model. S6. Compare and analyze the extracted shape semantic features with the original CAD model to evaluate the fidelity of the simplified digital twin model in terms of geometry and topology. In S2, the process of reducing redundant vertices in the triangular mesh model includes: First, a KD-Tree is constructed to represent the vertices in the triangular mesh model. The KD-Tree is constructed by recursively dividing the k-dimensional space into two subspaces. Each division selects a dimension and uses the median of that dimension as the dividing point. Then, traverse each vertex in the grid and use KD-Tree to perform nearest neighbor search to find the vertex that is closest to the current vertex; if the distance between these two vertices is less than a preset distance threshold g, and they do not share an edge or face, then one of these two vertices is considered redundant. Next, it is checked whether two vertices are shared by multiple faces, and the vertex that is not shared by multiple faces is removed as a redundant vertex.
2. The method for extracting geometric features from a digital twin geometric model of manufacturing equipment as described in claim 1, characterized in that: S1 includes: S11. Parse the STEP files of the CAD models of each component of the manufacturing equipment and extract the geometric and topological information from the STEP files; the geometric information includes basic geometric data such as points, lines, and surfaces; S12. Construct mesh vertices based on extracted geometric information; traverse the point information in the extracted geometric information, use these point information as mesh vertices of the triangular mesh model, and assign a unique identifier and position coordinates to each vertex; S13. Perform triangulation using topological information; identify the connection relationships between geometric feature nodes based on the extracted topological information. Based on these connections, triangulation is performed on the vertices associated with each geometric feature node; after triangulation, the triangular face information of the triangular mesh model is obtained, including the vertex index and normal direction of each triangle.
3. The method for extracting geometric features from a digital twin geometric model of manufacturing equipment as described in claim 1, characterized in that: In S2, the process of reducing outlier vertices in the triangular mesh model includes: traversing each triangular facet of the triangular mesh model and checking whether the vertex of each facet already exists in the constructed KD-Tree; if a vertex does not have a corresponding node in the KD-Tree, or its reference count is lower than a preset counting threshold, it is considered an outlier vertex; finally, all detected outlier vertices are removed.
4. The method for extracting geometric features from a digital twin geometric model of manufacturing equipment as described in claim 1, characterized in that: In S3, within the Half-Edge structure, the triangular mesh model is represented by vertices, half-edges, and faces; The vertex is used to store position information and a pointer to any of its outgoing edges; each undirected edge is split into two directed half edges, each half edge containing pointers to its starting vertex, adjacent face, next half edge, and dual half edge; the face is used to store a pointer to any of the boundary half edges belonging to the face and other attributes of the face, including normal vectors and texture coordinates.
5. The method for extracting geometric features from a digital twin geometric model of manufacturing equipment as described in claim 1, characterized in that: In S3, when extracting the neighborhood geometric features of the triangular mesh model, for any vertex of the triangular mesh model... Its neighborhood is a subset of the vertices, used The representation is as follows: where V represents the vertex set of the triangular mesh model, and E represents the edge set of the triangular mesh model; seven neighborhood geometric features of each vertex are extracted, denoted as... ;in Let represent the average area of the triangle in the neighborhood of a vertex. This represents the variance of the interior angles of the neighborhood triangle. Indicates the average angle between neighbors. This represents the neighborhood average curvature. This represents the mean of the neighborhood average curvature difference. Indicates the Gaussian curvature of the neighborhood. This represents the mean of the Gaussian curvature difference in the neighborhood.
6. The method for extracting geometric features from a digital twin geometric model of manufacturing equipment as described in claim 5, characterized in that: In S3, the extracted neighborhood geometric features are also preprocessed; the preprocessing includes robust scaling, sigmoid transformation, and min-max normalization.
7. The method for extracting geometric features from a digital twin geometric model of manufacturing equipment as described in claim 1, characterized in that: In S4, the backbone network of the graph encoder model MeshEncode exists in the form of an interface and is implemented using the backbone of a pre-defined MeshGCN model, MeshSAGE model, or MeshGAT model; the graph node embedding features output by MeshEncoder are divided into n-dimensional mean vectors. and n-dimensional variance vector Furthermore, the n components of the mean vector are defined as the n shape semantic features of the grid model.
8. The method for extracting geometric features from a digital twin geometric model of manufacturing equipment as described in claim 7, characterized in that: The MeshGAT model's structure includes: a GAT module incorporating multi-head attention and three GCN modules as the backbone, used to extract shape semantic features based on the neighborhood geometric features of the triangular mesh model; a TopK pooling module for graph node downsampling; and two Global Average Pooling (GAP) layers and two Global Max Pooling (GMP) layers to extract global features from the graph and concatenate them; the global features extracted from different network layers are summed and then used with two fully connected (FC) layers for classification prediction, and four batch normalization (BN) layers are used to improve training stability. The MeshGCN model structure includes: four GCN modules as the backbone, used to extract shape semantic features based on the neighborhood geometric features of the triangular mesh model; one global average pooling layer (GAP) to extract global features of the graph; two fully connected layers (FC) for classification prediction; and three batch normalization layers (BN) to improve training stability. Specifically, for the GCN layers, the reciprocal of the normalized distance between mesh vertices is introduced as the edge weight to construct a weighted graph, thereby improving the effectiveness of MeshGCN in extracting mesh shape semantic features. The MeshSAGE model structure includes: four GraphSAGE modules as the backbone, used to extract shape semantic features based on neighborhood geometric features of the triangular mesh model; one global average pooling layer (GAP) to extract global features of the graph; two fully connected layers (FC) for classification prediction; and three batch normalization layers (BN) to improve training stability.
9. The method for extracting geometric features from a digital twin geometric model of manufacturing equipment as described in claim 7, characterized in that: In S4, the VMeshAE model is also constructed to train the graph coding model MeshEncoder through an unsupervised adjacency matrix reconstruction task. The VMeshAE model includes a graph encoder model MeshEncoder, a reparameter module, and a graph decoder MeshDecoder; The reparameter module is used to reparameterize the graph node embedding features output by the graph encoder model MeshEncoder; the graph decoder MeshDecoder is used to attempt to reconstruct the original adjacency matrix based on the reparameterized graph node embedding features, and outputs the inner product matrix of each node embedding feature as the reconstructed adjacency matrix. A loss function is also constructed to measure the difference between the original adjacency matrix and the reconstructed adjacency matrix; and by minimizing the loss function, MeshEncoder learns a more meaningful embedding representation to accurately capture the shape semantic features of the mesh model.