A Method and System for Extracting Feature Surfaces from Mesh Models Based on Error Ranking

By performing surface fitting and error sorting on the seed surface of the machining simulation triangular mesh model, the problem of feature surface identification and segmentation in the reconstruction of the triangular mesh model was solved, and feature surface extraction and solid model reconstruction of complex mesh models were realized.

CN114676521BActive Publication Date: 2025-12-02SHANGHAI SPACE PRECISION MACHINERY RES INST
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210283031.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-22
Publication Date
2025-12-02
Estimated Expiration
2042-03-22

AI Technical Summary

Technical Problem

In existing technologies, the triangular mesh model for machining simulation suffers from blurred boundaries and overlapping areas during feature surface identification and segmentation, making it difficult to reconstruct the triangular mesh model and failing to accurately simulate the product's topological relationships.

Method used

By fitting the seed faces of the machining simulation triangular mesh model, the fitted surface is extended to the transition surface between the seed faces using a growth algorithm for a single seed face. Based on the error ranking between the mesh face and the fitted surface, the priority order of each mesh face in the overlapping area to belong to different seed faces is determined, guiding the alternating growth of multiple sub-faces to extract feature faces.

Benefits of technology

Feature surface extraction of complex mesh models was achieved, providing technical support for patch reconstruction and model reconstruction of complex mesh models, restoring basic geometric type information, and providing the correct geometric information basis for reverse reconstruction from machining simulation triangular mesh models to solid models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114676521B_ABST
    Figure CN114676521B_ABST
Patent Text Reader

Abstract

This invention provides a method and system for extracting feature surfaces from a mesh model based on error sorting, comprising: Step 1: performing surface fitting on the seed surfaces of a machining simulation triangular mesh model to obtain a fitted surface; Step 2: extending the fitted surface to the transition surface between seed surfaces according to a growth algorithm for a single seed surface to obtain an overlapping region; Step 3: extracting feature surfaces according to the priority order of each mesh surface in the overlapping region belonging to different seed surfaces. Compared with the prior art, this invention proposes a multi-sub-face alternating growth algorithm for extracting feature surfaces based on a machining simulation triangular mesh model, realizing the extraction of feature surfaces from the machining simulation triangular mesh model and laying a good foundation for reconstructing solid models from mesh models.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent manufacturing technology, specifically to a method and system for extracting feature surfaces of a mesh model based on error sorting. Background Technology

[0002] Developing 3D process design systems is an effective technology in my country's high-end manufacturing sector. This technology can improve the efficiency of digital manufacturing and solve problems such as cumbersome manual interaction steps and non-standard modeling. As a key component of 3D process design in high-end manufacturing, the process model not only reflects the design information of the product and its components and can represent the product's geometry, but also embodies manufacturing and process information. The process model's dimensions, processing parameters, and other data can serve as an effective basis for correcting overcutting or undercutting caused by deformation in actual production.

[0003] Machining simulation is a common method for reverse engineering process models. In machining simulation, process models are typically presented as triangular mesh models. Triangular mesh models cannot be dimensioned, leading to problems in practical applications such as inaccurate representation of product geometry and inability to accurately simulate product topology. Using machining simulation results as input to reconstruct a solid model from the triangular mesh model, and then adding 3D dimensions, is an efficient technique for constructing process models. Extracting feature faces from the mesh model is a crucial step in the reconstruction process; therefore, methods and systems for extracting feature faces from machining simulation triangular mesh models are essential components of 3D process design systems.

[0004] The machining simulation triangular mesh model differs slightly from the conventional triangular mesh model. Due to the complexity of the curved surface connections of complex model parts and the floating-point precision error of the simulation system, the simulation result triangular mesh model has a problem of blurred boundaries at the intersection of feature surfaces, which easily generates multiple overlapping areas. This causes the simulation triangular mesh model to differ from the theoretical process model, affecting the identification and segmentation of feature surfaces and making it difficult to reconstruct the triangular mesh model.

[0005] The paper "Object-Oriented Segmentation Method for Remote Sensing Images Based on Automatic Multi-Sub-Region Growing" discloses a method for segmenting remote sensing images using seed pixels based on criteria such as color similarity or surrounding labeled pixels. This paper applies to two-dimensional images and does not address the region segmentation problem of triangular mesh models. The paper "Mesh Model Segmentation Based on Region Growing" discloses a method for mesh model segmentation using a region growing algorithm. Specifically, it uses a single principle, such as the difference between the boundary triangle normal vector and the average surface normal vector being less than a certain threshold, as the growth condition. However, it does not address the difficulty in segmenting overlapping regions of multiple seed faces when using region growing algorithms in complex triangular mesh model segmentation. Patent document CN109801299A discloses an interactive segmentation method, system, and apparatus based on a quadratic surface fitting model, aiming to solve the problem of poor segmentation accuracy of three-dimensional mesh models for objects with indistinct component features. This method first obtains a triangular mesh, then subdivides and initializes it to obtain connected and non-overlapping clusters. Next, it performs quadratic surface fitting and segmentation on the mesh model. Then, an interactive segmentation method is used to interactively merge and segment the automatically fitted clusters, resulting in more accurate segmentation results. This is equivalent to disclosing the surface fitting of seed surfaces in this application. The difference lies in not disclosing the feature of extending the fitted surface to the transition surface between seed surfaces using a growth algorithm for a single seed surface, forming overlapping regions between the extended boundaries of each surface. Then, based on the error ranking between the mesh surface and each fitted surface, the priority order of the mesh surface in the overlapping region belonging to different seed surfaces is determined. Summary of the Invention

[0006] In view of the shortcomings of the prior art, the purpose of this invention is to provide a method and system for extracting feature surfaces of mesh models based on error sorting.

[0007] A method for extracting feature surfaces of a mesh model based on error sorting, according to the present invention, includes:

[0008] Step 1: Perform surface fitting on the seed surface of the machining simulation triangular mesh model to obtain the fitted surface;

[0009] Step 2: Extend the fitted surface to the transition surface between seed surfaces according to the growth algorithm of a single seed surface to obtain the overlapping region;

[0010] Step 3: Extract feature surfaces based on the priority order of the grid surfaces in the overlapping area belonging to different seed surfaces.

[0011] Preferably, step 1 includes:

[0012] Step 101: Fit the seed surface with an algebraic surface or a free surface to obtain the fitted surface.

[0013] Preferably, step 2 includes:

[0014] Step 201: Extend the fitted surface to the transition surface between seed surfaces according to the growth algorithm of a single seed surface;

[0015] Step 202: Mark the transition surface according to the preset rules. If the transition surface is marked by multiple seed surfaces, the corresponding mesh surface is an overlapping area.

[0016] Preferably, step 3 includes:

[0017] Step 301: Based on the error sorting between the mesh surfaces and the fitted surface, determine the priority order of which each mesh surface in the overlapping region belongs to a different seed surface;

[0018] Step 302: Guide the alternating growth of multiple sub-faces according to priority order to obtain feature faces.

[0019] Preferably, step 301 includes:

[0020] Step 3011: Establish an error table for the mesh surfaces that are repeatedly marked by the fitted surface in the overlapping region;

[0021] Step 3012: Sort the elements in the error table in ascending order according to their error values ​​to obtain the priority order.

[0022] A feature surface extraction system for a mesh model based on error sorting, provided by the present invention, includes:

[0023] Module M1: Performs surface fitting on the seed surface of the machining simulation triangular mesh model to obtain the fitted surface;

[0024] Module M2: Based on the growth algorithm of a single seed face, the fitted surface is extended to the transition surface between seed faces to obtain the overlapping region;

[0025] Module M3: Extracts feature surfaces based on the priority order of the grid surfaces in the overlapping region belonging to different seed surfaces.

[0026] Preferably, module M1 includes:

[0027] Submodule M101: Fits the seed surface with an algebraic surface or a free surface to obtain the fitted surface.

[0028] Preferably, module M2 includes:

[0029] Submodule M201: Extends the fitted surface to the transition surface between seed surfaces based on the growth algorithm of a single seed surface;

[0030] Submodule M202: Marks the transition surface according to preset rules. If the transition surface is marked by multiple seed surfaces, the corresponding mesh surface is an overlapping area.

[0031] Preferably, module M3 includes:

[0032] Submodule M301: Based on the error sorting between the mesh surface and the fitted surface, determine the priority order of each mesh surface in the overlapping area to belong to different seed surfaces;

[0033] Submodule M302: Guides the alternating growth of multiple sub-faces according to priority order to obtain feature faces.

[0034] Preferably, submodule M301 includes:

[0035] Element D3011: Establish an error table for the mesh surfaces that are repeatedly marked by the fitted surface in the overlapping region;

[0036] Unit D3012: Sort the elements in the error table in ascending order according to their error values ​​to obtain the priority order.

[0037] Compared with the prior art, the present invention has the following beneficial effects:

[0038] 1. This invention guides the growth of multiple seed surface regions according to the priority order of triangular mesh and fitting surface error, thereby determining the ownership of triangular mesh in overlapping areas, determining the growth boundary of seed surfaces, and thus obtaining a complete set of feature surfaces.

[0039] 2. This invention realizes the feature surface extraction of complex mesh models, providing technical support for the patch reconstruction and model reconstruction of complex mesh models.

[0040] 3. This invention is used to extract feature surfaces from CNC machining simulation mesh models of complex machined structural parts, and to restore the basic geometric information of the model, such as planes, cylinders, cones, spheres, tori, and freeform surfaces, providing a correct and good geometric information foundation for the reverse reconstruction from machining simulation triangular mesh models to solid models. Attached Figure Description

[0041] Other features, objects, and advantages of the present invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:

[0042] Figure 1 This is a schematic diagram of the process of the present invention;

[0043] Figure 2a This is a schematic diagram of the seed surface of the present invention;

[0044] Figure 2b This is a schematic diagram of the surface fitting result S1 of the seed surface F1 of the present invention;

[0045] Figure 3a This is a schematic diagram of the overlapping area of ​​the present invention;

[0046] Figure 3b This is a schematic diagram illustrating the geometric meaning of the error in this invention;

[0047] Figure 4 This is a schematic diagram of the mesh surface of the present invention;

[0048] Figure 5 This is a schematic diagram of the feature surface extraction results of the present invention. Detailed Implementation

[0049] The present invention will now be described in detail with reference to specific embodiments. These embodiments will help those skilled in the art to further understand the present invention, but do not limit the invention in any way. It should be noted that those skilled in the art can make several changes and improvements without departing from the concept of the present invention. These all fall within the protection scope of the present invention.

[0050] The following is an explanation of the terms used in this invention:

[0051] Seed face: refers to a connected region in a triangular mesh model that satisfies the following two conditions:

[0052] (1) The region is approximately continuous of first order or higher.

[0053] (2) The interior of the region is approximately uniform in terms of concavity and convexity.

[0054] Transition surfaces: These are mesh surfaces in a triangular mesh model that are not seed surfaces. The set of all transition surfaces corresponds to the transition regions between different seed surfaces.

[0055] This invention is based on the need for technology to reconstruct mesh models into solid models. For the extraction of feature surfaces of mesh models, it proposes an algorithm that uses the priority order of triangular mesh and fitting surface error in the overlapping area of ​​multiple seed surfaces to determine the effective division of sub-mesh patches and realize the alternating growth of multiple sub-surfaces, thus laying the foundation for mesh model reconstruction.

[0056] Specifically, the machining simulation triangular mesh model includes seed surfaces and transition surfaces. First, the seed surfaces are fitted with curves. Then, the fitted surface is extended to the transition surface between the seed surfaces using a growth algorithm for a single seed surface, and overlapping areas are formed between the boundaries of each extended surface. Next, the priority order of each mesh surface in the overlapping area to belong to different seed surfaces is determined according to the error sorting between the mesh surface and each fitted surface. Finally, multiple sub-surfaces are guided to grow alternately according to the priority order to obtain a complete feature surface set.

[0057] Figure 1 This is a schematic diagram of the process of the present invention, such as Figure 1 As shown, this invention provides a method for extracting feature surfaces from a mesh model based on error sorting, comprising the following steps:

[0058] Step 1: Perform surface fitting on the seed surface of the machining simulation triangular mesh model to obtain the fitted surface.

[0059] Specifically, step 1 includes: step 101: fitting the seed surface with an algebraic surface or a free surface to obtain a fitted surface.

[0060] The type of the fitted surface can be either an algebraic surface or a free surface. The following sections explain the cases where the fitted surface is an algebraic surface and a free surface, respectively.

[0061] In the first case, the fitted surface is an algebraic surface, which includes planes, spheres, cylinders, tori, and cones. First, initial parameters are determined based on information such as vertex positions, normal vectors, principal curvatures, and principal directions. Then, a penalty function is set based on the constraint relationships between the initial parameters. Finally, the Levenberg-Marquardt algorithm is used to solve for the surface parameters.

[0062] Specifically, fitting algebraic surfaces: Two-dimensional algebraic varieties are called algebraic surfaces, which are surfaces defined by a polynomial in three-dimensional space: f(x,y,z)=0. Under the birational equivalence, any algebraic surface can be defined by an equation. Fitting an algebraic surface first determines the initial parameters based on information such as the vertex positions, normal vectors, principal curvatures, and principal directions. Then, a penalty function is set according to the constraint relationship between the initial parameters. Finally, the Levenberg-Marquardt algorithm is used to solve for the surface parameters.

[0063] The methods for selecting fitting parameters for each type of surface are as follows:

[0064] The first method uses spherical parameters: center C and radius r. Take any two vertices on the seed surface, and draw straight lines along the normal vectors of each vertex. Take the midpoint of the closest line segment between the two lines as the initial value of the center C, and the average distance from the two vertices to the center as the initial value of the radius r. Estimate multiple times and calculate the average to reduce error.

[0065] The second type uses the following parameters for the toroidal surface: center C, axial direction vector N, base circle radius r0, and cylinder radius r1.

[0066] The third type is cylindrical surface parameters: a point C on the axis, the axis direction vector N, and the radius r.

[0067] The fourth type is the parameters of the conical surface: vertex A, axis direction vector N, and base angle θ.

[0068] The fifth type is the plane parameter: a point C on the plane and the normal vector N.

[0069] In the second case, the fitted surface is a free surface, and a bicubic B-spline surface is selected as the fitting target. First, the node vectors and parameterization of the fitted surface are determined: the parameters corresponding to the data points are the ratio of the bounding box side length to the coordinate value of the projection point; then, the equations that satisfy the constraints are listed; finally, the least squares method is used to calculate the control vertices.

[0070] Specifically, fitting freeform surfaces: Freeform surfaces are surfaces that cannot be directly and precisely defined. Freeform surface fitting uses a bicubic B-spline surface as the fitting target, given (n... u +1)×(n v +1) control vertices d ij (i = 0, 1, ..., n) u j = 0, 1, ..., n v n u and n v (where the integer is an integer), the degree of both the u-direction parameter u and the v-direction parameter v of the B-spline surface is 3, the number of control vertices is 4×4, and the node vector is given. With node vectors The surface S(u, v) can be defined by formula (1):

[0071]

[0072] Wherein, the B-spline basis function N i,3 (u), N j,3 (v) is determined by the node vectors U and V respectively.

[0073] Furthermore, the parameters of the fitted surface are determined by projecting onto the base plane, where the base plane is determined by the average normal vector of the seed surface. During projection, the minimum bounding box boundary of the seed surface on the base plane is first determined, and then the two-dimensional convex polygon corresponding to the seed surface boundary is determined by interpolation. Finally, the parameterized coordinates of all mesh vertices are obtained through linear equations. Substituting 4×4=16 parameterized coordinates into the surface formula (1), u is constructed. k v l place The equations are used to construct a system of 16 equations. Then, the least squares method is used to solve the system of equations to calculate the control vertices. Where u k v l Represent the k-th and l-th values ​​of node vectors U and V, respectively; N i,3 (u k ), N j,3 (v i ) represents the corresponding basis function; V k,l This indicates the corresponding type value point.

[0074] Step 2: Extend the fitted surface to the transition surface between seed surfaces according to the growth algorithm of a single seed surface to obtain the overlapping region.

[0075] Step 2 includes: Step 201: Extend the fitted surface to the transition surface between seed surfaces according to the growth algorithm of a single seed surface; Step 202: Mark the transition surface according to a preset rule. If the transition surface is marked by multiple seed surfaces, the corresponding mesh surface is an overlapping area.

[0076] Specifically, each seed face extends into the transition region of the non-seed face, marking adjacent mesh faces that meet the conditions. If a mesh face in the transition region is marked by multiple seed faces, then that mesh face is an overlapping region. The preset rules are Rule 1 and Rule 2, and the marking is performed according to Rule 1 and Rule 2. Overgrowth of a single seed face creates an overlapping region, that is, each seed face extends excessively into the transition region, marking adjacent mesh faces that meet the conditions. If a mesh face in the transition region is marked by multiple seed faces, then that mesh face is an overlapping region.

[0077] Rule 1: The mesh face is an adjacent mesh face of the seed face and is in the overlapping region.

[0078] Rule 2: The error between the mesh face and the seed face is less than the threshold, and the error is a relative error.

[0079] In Rule 1, the mesh surface is an adjacent mesh surface to the seed surface and is located in the transition region, meaning it does not belong to any seed surface and is directly determined by the seed surface properties. Rule 2 specifies that the error between the mesh surface and the seed surface is less than a threshold. Since the fitting accuracy varies depending on the type of surface, relative error is used. Different methods are used to calculate the error for different types of fitted surfaces, categorized as: planar error; freeform surface error; and errors for other algebraic surfaces.

[0080] As can be seen, in step 1 of this invention, surface fitting is performed on various sub-surfaces and errors are generated.

[0081] The following explains the errors in Rule 2.

[0082] Error calculation method for a plane: If the mesh surface f i It is seed face F j Adjacent mesh surfaces on the boundary, F j The fitting result is a plane; calculate the plane normal and the mesh surface f. i The angle between the normal vectors is such that if the angle is less than a given threshold, then the error D = 0; if the angle is greater than the given threshold, then the error D = ∞. Here, i and j are integers.

[0083] The error calculation method for freeform surfaces is as follows: if the mesh surface f i It is seed face F j Adjacent mesh surfaces on the boundary, F j The fitting result is a freeform surface. Using the parameterized results of three grid points as parameters, the corresponding points on the fitted surface are calculated, and the distance d between the points on the surface and the corresponding grid points is calculated.i (i = 1, 2, 3) and calculate the average, then the error is...

[0084] The error calculation method for other algebraic surfaces is as follows: If the mesh surface f i It is seed face F j Adjacent mesh faces on the boundary, vertex v m f i The fitting result of the three vertices mid-distance surface S j The farthest vertex, f i With F j Distance d(f) i F j ) use v m To S j Distance d(v) m F j ) represents this. Use d(v) m F j The error can be obtained by considering the key dimensions of different types of seed surfaces. Specific methods include: for a sphere, the key dimension is radius r, and the error D = d(v) m F j ) / r; Circular torus, the critical dimension is the cylinder radius r1, and the error D = d(v m F j ) / r1; Cylindrical surface, critical dimension is radius r, error D=d(v m F j ) / r; Conical surface, the critical dimension is the average distance r′ from the seed surface to the axis, and the error D=d(v m ,Fj) / r′.

[0085] Step 3: Extract feature surfaces based on the priority order of the grid surfaces in the overlapping area belonging to different seed surfaces.

[0086] Step 3 includes: Step 301: Determine the priority order of each grid surface in the overlapping area to belong to different seed surfaces based on the error sorting of the grid surface and the fitted surface; Step 302: Guide the alternating growth of multiple sub-surfaces according to the priority order to obtain the feature surface.

[0087] Further, step 301 includes: step 3011: establishing an error table for the mesh surfaces marked multiple times by the fitted surface in the overlapping region; step 3012: sorting the elements in the error table in ascending order according to the error value to obtain the priority order.

[0088] Specifically, an error table is established for the mesh surfaces fi that are marked multiple times in the overlapping region. Sort the elements in the error table in ascending order of error value, and the order of each seed face in the error table is as follows: That is, the priority order of its growth at that grid surface.

[0089] Furthermore, according to the initial priority conditions, multiple seed faces are first grown sequentially into the transition region. If there are remaining meshes, the priority conditions are modified, and the multiple seed faces are then grown sequentially into the transition region until there are no remaining meshes. The growth is performed according to rules 3 and 4.

[0090] Priority condition: refers to the specified condition regarding the priority order value of the seed face at a mesh face. Seed face On a grid surface f i Priority order value The order is determined by the error table.

[0091] Rule 3: The priority condition of the seed face at the mesh face is met:

[0092] Rule 4: The grid surface satisfies the growth conditions of a single seed surface.

[0093] Specifically, the growth of various sub-faces is guided according to priority. That is, each seed face grows outward a portion at a time. After all seed faces have grown initially in sequence, the conditions are relaxed appropriately to allow the advantageous seed faces with smaller errors to grow again. If there are still remaining meshes in the mesh model that do not belong to any of the various sub-faces, the conditions are relaxed again until there are no remaining meshes. The number of times each sub-face grows is generally more than 1.

[0094] The specific method for alternating growth of multiple sub-faces according to priority is as follows: First, take the strictest priority condition rank=1, that is, the priority order of the seed face at the grid is rank(f). i F s_j If the priority condition is met when rank is less than or equal to rank, growth can proceed. The process iterates through the boundaries of all seed faces, checking if the priority condition is met at the mesh faces outside the seed face's boundary. If it is, the mesh face belongs to this seed face, and the seed face boundary is updated; otherwise, growth does not occur at that point. Then, it checks if any seed faces have grown during this growth round, i.e., if the seed face boundary has changed. If so, the rank value remains unchanged, and the process iterates through all seed face boundaries again to allow seed face growth. If not, it checks if there are any remaining meshes in the mesh model that do not belong to any of the various sub-faces. If so, the rank is incremented by 1, and the process iterates through all seed face boundaries again to allow seed face growth. If not, seed face growth is complete. From the above, we can see that growth requires satisfying rules 3 and 4.

[0095] This invention uses a seed face from an input machining simulation triangular mesh model. Through a growth algorithm on a single seed face, it calculates the error value of the grown mesh face and constructs a priority order table for assigning transition faces to seed faces. This priority order guides the alternating growth of multiple sub-faces. This method can determine the affiliation of triangular meshes in overlapping regions, identify the growth boundaries of seed faces, and ultimately obtain a complete set of feature faces.

[0096] This invention enables the extraction of feature surfaces from a machining simulation triangular mesh model, providing technical support for the patch reconstruction and model reconstruction of complex mesh models.

[0097] The following is a description using specific examples.

[0098] The present invention may include the following steps: performing surface fitting on the seed face of the machining simulation triangular mesh model to obtain a fitted surface; extending the fitted surface to the transition surface between seed faces according to the growth algorithm of a single seed face to obtain an overlapping region; and extracting feature surfaces according to the priority order of each mesh face in the overlapping region belonging to different seed faces.

[0099] First, surface fitting is performed on the seed surface of the machining simulation triangular mesh model. The fitted surface type can be selected as a plane, sphere, cylinder, torus, conical algebraic surface or bicubic B-spline surface.

[0100] Algebraic surfaces first determine initial parameters based on information such as vertex positions, normal vectors, principal curvatures, and principal directions. Then, a penalty function is set according to the constraint relationships between the parameters. Finally, the Levenberg-Marquardt algorithm is used to solve for the surface parameters. The methods for determining the initial values ​​for solving planes, spheres, cylinders, tori, and surface fitting are not elaborated here.

[0101] Figure 2a This is a schematic diagram of the seed surface of the present invention. Figure 2b This is a schematic diagram of the fitting of the seed surface F1 of the present invention, as shown below. Figure 2a As shown, the machining simulation triangular mesh model includes multiple seed faces: seed face F1, seed face F2, seed face F3, seed face F4, and seed face F5. Figure 2b To perform surface fitting on the seed surface F1, the resulting fitted surface S1 is obtained.

[0102] Secondly, the overgrowth of a single seed face to generate overlapping regions can be addressed through the following steps, where the input is the seed face and the output is the feature face. Step S1: Start, input the seed face; Step S2: Select a fitting method based on the concavity / convexity of the seed face; Step S3: Fit the seed face to obtain the error between any mesh face and the seed face; Step S4: Take unvisited adjacent mesh faces on the seed face boundary; Step S5: Determine if the adjacent faces meet the growth conditions. If yes, continue; otherwise, go to step S9; Step S6: Add the seed face to the error table of adjacent faces; Step S7: Add the adjacent faces to the seed face; Step S8: Update the seed face boundary; Step S9: Determine if any new triangular faces have been added to the seed face. If yes, update the seed face boundary and go to step S4; otherwise, construct the feature face based on the growth result and continue; Step S10: Output the feature face and end.

[0103] Figure 3a This is a schematic diagram of the overlapping area of ​​the present invention, as shown below. Figure 3a As shown, this includes seed surfaces F5, F6, and F7, as well as overlapping region 1 formed by seed surfaces F5 and F6, and overlapping region 2 formed by seed surfaces F7 and F6. After overgrowth of seed surfaces F5, F6, and F7, F5 and F6 form overlapping region 1 in the transition surface mesh, and F7 and F6 form overlapping region 2 in the transition surface mesh. The fitted surface types of seed surfaces F5, F6, and F7 are planar, cylindrical, and planar, respectively.

[0104] Furthermore, the priority of each grid surface in the overlapping area is sorted.

[0105] Specifically, for the grid surfaces f that are marked multiple times in the overlapping region i Establish an error table The error table is composed of grid surface f i To the seed surface The error is represented by [the formula]. The error is defined as a relative error, and the calculation method is as follows: if the mesh surface f [is...]. i It is seed noodle Adjacent mesh faces on the boundary, vertex v m f i The fitting result of the three vertices mid-distance surface S j The farthest vertex, f i and Distance d(f) i F j ) use v m To S j distance Indicate. Use The error can be obtained by considering the key dimensions of different types of seed faces.

[0106] In this invention, the error table The elements in the table are sorted in ascending order of error value, and the order of each seed face in the error table is as follows: That is, the priority order of its growth on that grid surface.

[0107] Figure 3b This is a schematic diagram illustrating the geometric meaning of the error in this invention, as shown below. Figure 3b As shown, seed surface F6 is a cylindrical surface with radius r, and the dashed line is the fitted surface S6 corresponding to F6. Two vertices of its adjacent mesh surface are not on S6, and their distances to S6 are d1 and d2, respectively. The error D of the adjacent mesh surface on seed surface F6 is the maximum distance between the two vertices and S6. Seed surface F7 is a plane, and the dashed line is the fitted surface S7 corresponding to F7. One vertex of its adjacent mesh surface is not on S7. The distance between the adjacent mesh surface and S7 is d. When d is greater than the plane error limit d0, the error D of the adjacent mesh surface at seed surface F7 is infinite; when d is less than the plane error limit d0, the error D of the adjacent mesh surface at seed surface F7 is 0.

[0108] Figure 4 This is a schematic diagram of the mesh surface of the present invention. The positional relationship between the mesh surface f1 and the surrounding seed surfaces F1, F2, F3 and F4 is as follows: Figure 4 As shown in Table 1, the assignment priority rank(f1, F) of the mesh surface f1 in this invention is formed according to the error. j The corresponding priority order.

[0109] Table 1

[0110]

[0111] Finally, the seed faces are guided to grow sequentially according to their priority.

[0112] Specifically, multiple seed faces are guided to grow alternately according to priority order. That is, multiple seed faces grow a portion of the transition region in turn according to the initial priority conditions. If there are remaining meshes, the priority conditions are modified, and multiple seed faces grow into the transition region in turn until there are no remaining meshes. The growth must meet the following rules: Rule 3: The priority conditions of the seed face at the mesh face are met; Rule 4: The mesh face meets the growth conditions of a single seed face.

[0113] The multiple sub-face alternating growth algorithm includes the following steps, where the input is a seed face set and the output is a feature face set. Step P1: Begin, input the seed face set {F} s Step P2: For all transition surfaces f i Initialize the error table Step P3: Overgrow the seed face. Set the growth condition to an error value condition. Use the growth algorithm for a single seed face to calculate the growth range of each seed face and write the error between the mesh face and the seed face within the range into the error table. Step P4: Sort the elements in the error table of each transition face in ascending order of error value to obtain the growth priority order of each seed face. Step P5: Set parameter rank = 1. Step P6: Select the first seed face. Step P7: Select the first adjacent face of the seed face. Step P8: Determine if the adjacent face meets the growth condition. If yes, add the adjacent face to the seed face and continue. If not, continue. Step P9: Determine if there is a next adjacent face. If yes, go to step P8. If not, continue. Step P10: Determine if there is a next seed face. If yes, go to step P7. If not, continue. Step P11: Determine if there is a mesh face that has not been added to the seed face. If yes, increment rank by 1 and go to step P6. If not, construct a feature face based on the seed face growth result and continue. Step P12: Output the feature face and end.

[0114] for Figure 4 When the mesh face f1 is grown according to the rule of rank=1, seed faces F1, F2, and F3 do not satisfy the priority condition because their rank is greater than 1 at f1. Seed face F4 does not satisfy rule 1 for the growth of a single seed face at f1, and f1 is not an adjacent triangle of F4. Therefore, after the first round of growth, mesh face f1 is left. The result of checking whether there is a remaining mesh is yes, so rank=rank+1 is needed for another round of growth. After lowering the priority condition, it is clear that mesh face f1 belongs to seed face F2.

[0115] Figure 5 This is a schematic diagram of the feature extraction results of the present invention, as shown below. Figure 5 As shown, the input is a triangular mesh model of the simulation results of a local structural component. The feature surfaces F1, F2, F3, F4 and F5 of the seed surface are extracted by the present invention to form a complete feature surface set.

[0116] This invention also provides a mesh model feature surface extraction system based on error sorting, comprising the following modules:

[0117] Module M1: Performs surface fitting on the seed surface of the machining simulation triangular mesh model to obtain the fitted surface.

[0118] Among them, module M1 includes: submodule M101: fitting the seed surface with an algebraic surface or a free surface to obtain the fitted surface.

[0119] Module M2: Based on the growth algorithm of a single seed face, the fitted surface is extended to the transition surface between the seed faces to obtain the overlapping region.

[0120] Module M2 includes: submodule M201: extending the fitted surface to the transition surface between seed surfaces according to the growth algorithm of a single seed surface; submodule M202: marking the transition surface according to preset rules. If the transition surface is marked by multiple seed surfaces, the corresponding mesh surface is an overlapping area.

[0121] Module M3: Extracts feature surfaces based on the priority order of the grid surfaces in the overlapping region belonging to different seed surfaces.

[0122] Module M3 includes: Submodule M301: Based on the error sorting between the mesh surface and the fitted surface, determine the priority order of each mesh surface in the overlapping area to belong to different seed surfaces; Submodule M302: Based on the priority order, guide the alternating growth of multiple sub-surfaces to obtain feature surfaces.

[0123] Furthermore, submodule M301 includes: unit D3011: establishing an error table for the mesh surfaces marked multiple times by the fitted surface in the overlapping region; unit D3012: sorting the elements in the error table in ascending order according to the error value to obtain the priority order.

[0124] The technical principle of this invention is:

[0125] This invention is based on the need for technology to reconstruct mesh models into solid models. For the extraction of feature surfaces of mesh models, it proposes an algorithm that uses the priority order of triangular mesh and fitting surface error in the overlapping area of ​​multiple seed surfaces to determine the effective division of sub-mesh patches and realize the alternating growth of multiple sub-surfaces, thus laying the foundation for mesh model reconstruction.

[0126] Compared with the prior art, the present invention has the following beneficial effects:

[0127] 1. This invention guides the growth of multiple seed surface regions according to the priority order of triangular mesh and fitting surface error, thereby determining the ownership of triangular mesh in overlapping areas, determining the growth boundary of seed surfaces, and thus obtaining a complete set of feature surfaces.

[0128] 2. This invention realizes the feature surface extraction of complex mesh models, providing technical support for the patch reconstruction and model reconstruction of complex mesh models.

[0129] 3. This invention is used to extract feature surfaces from CNC machining simulation mesh models of complex machined structural parts, and to restore the basic geometric information of the model, such as planes, cylinders, cones, spheres, tori, and freeform surfaces, providing a correct and good geometric information foundation for the reverse reconstruction from machining simulation triangular mesh models to solid models.

[0130] Those skilled in the art will understand that, besides implementing the system, apparatus, and their modules provided by this invention in purely computer-readable program code, the same program can be implemented in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method submodule M. Therefore, the system, apparatus, and their modules provided by this invention can be considered a hardware component, and the modules included therein for implementing various programs can also be considered structures within the hardware component; alternatively, modules for implementing various functions can be considered both software programs implementing the method and structures within the hardware component.

[0131] Specific embodiments of the present invention have been described above. It should be understood that the present invention is not limited to the specific embodiments described above, and those skilled in the art can make various changes or modifications within the scope of the claims, which do not affect the essence of the present invention. Unless otherwise specified, the embodiments and features described in this application can be arbitrarily combined with each other.

Claims

1. A method for extracting feature surfaces from a mesh model based on error sorting, characterized in that, include: Step 1: Perform surface fitting on the seed surface of the machining simulation triangular mesh model to obtain the fitted surface; Step 2: Extend the fitted surface to the transition surface between the seed surfaces according to the growth algorithm of a single seed surface to obtain the overlapping region; Step 3: Extract feature faces according to the priority order of the grid faces in the overlapping region belonging to different seed faces; Step 1 includes: Step 101: Fit the seed surface with an algebraic surface or a free surface to obtain the fitted surface; Specifically, fitting freeform surfaces: Freeform surfaces are surfaces that cannot be directly and precisely defined. Freeform surface fitting uses a bicubic B-spline surface as the fitting target, given (n... u +1)×(n v +1) control vertices d ij Where i = 0, 1, ..., n u j = 0, 1, ..., n v n u and n v For integers, the degrees of both the u-direction parameter u and the v-direction parameter v of the B-spline surface are 3, the number of control vertices is 4×4, and the node vector is given. With node vectors The surface S(u,v) is defined by formula (1) as follows: Wherein, the B-spline basis function N i,3 (u), N j,3 (v) is determined by the node vectors U and V, respectively; Furthermore, the parameters of the fitted surface are determined by projecting onto the base plane, where the base plane is determined by the average normal vector of the seed surface. During projection, the minimum bounding box boundary of the seed surface on the base plane is first determined, and then the two-dimensional convex polygon corresponding to the seed surface boundary is determined by interpolation. Finally, the parameterized coordinates of all mesh vertices are obtained through linear equations. Substituting 4×4=16 parameterized coordinates into the surface formula (1), u is constructed. k v l place The equations are used to construct a system of 16 equations. Then, the least squares method is used to solve the system of equations to calculate the control vertices; where u k v l Represent the k-th and l-th values ​​of node vectors U and V, respectively; N i,3 (u k ), N j,3 (v l ) represents the corresponding basis function; V k,l This indicates the corresponding type value point.

2. The method for extracting feature surfaces of a mesh model based on error sorting according to claim 1, characterized in that, Step 2 includes: Step 201: Extend the fitted surface to the transition surface between the seed surfaces according to the growth algorithm of a single seed surface; Step 202: Mark the transition surface according to the preset rules. If the transition surface is marked by multiple seed surfaces, the corresponding mesh surface is the overlapping area.

3. The method for extracting feature surfaces of a mesh model based on error sorting according to claim 1, characterized in that, Step 3 includes: Step 301: Based on the error sorting between the mesh surface and the fitted surface, determine the priority order in which each mesh surface in the overlapping region belongs to a different seed surface; Step 302: Guide the alternating growth of multiple sub-faces according to the priority order to obtain the feature face.

4. The method for extracting feature surfaces of a mesh model based on error sorting according to claim 3, characterized in that, Step 301 includes: Step 3011: Establish an error table for the mesh surfaces in the overlapping region that are marked multiple times by the fitted surface; Step 3012: Sort the elements in the error table in ascending order according to their error values ​​to obtain the priority order.

5. A feature surface extraction system for a mesh model based on error sorting, characterized in that, include: Module M1: Performs surface fitting on the seed surface of the machining simulation triangular mesh model to obtain the fitted surface; Module M2: Based on the growth algorithm of a single seed surface, the fitted surface is extended to the transition surface between the seed surfaces to obtain the overlapping region; Module M3: Based on the priority order of the mesh faces in the overlapping region belonging to different seed faces, module M1 extracts feature faces, including: Submodule M101: Fits the seed surface using an algebraic surface or a free surface to obtain the fitted surface; Specifically, fitting freeform surfaces: Freeform surfaces are surfaces that cannot be directly and precisely defined. Freeform surface fitting uses a bicubic B-spline surface as the fitting target, given (n... u +1)×(n v +1) control vertices d ij Where i = 0, 1, ..., n u j = 0, 1, ..., n v n u and n v For integers, the degrees of both the u-direction parameter u and the v-direction parameter v of the B-spline surface are 3, the number of control vertices is 4×4, and the node vector is given. With node vectors The surface S(u,v) is defined by formula (1) as follows: Wherein, the B-spline basis function N i,3 (u), N j,3 (v) is determined by the node vectors U and V, respectively; Furthermore, the parameters of the fitted surface are determined by projecting onto the base plane, where the base plane is determined by the average normal vector of the seed surface. During projection, the minimum bounding box boundary of the seed surface on the base plane is first determined, and then the two-dimensional convex polygon corresponding to the seed surface boundary is determined by interpolation. Finally, the parameterized coordinates of all mesh vertices are obtained through linear equations. Substituting 4×4=16 parameterized coordinates into the surface formula (1), u is constructed. k v l place The equations are used to construct a system of 16 equations. Then, the least squares method is used to solve the system of equations to calculate the control vertices; where u k v l Represent the k-th and l-th values ​​of node vectors U and V, respectively; N i,3 (u k ), N j,3 (v l ) denotes the corresponding basis function; V k,l This indicates the corresponding type value point.

6. The mesh model feature surface extraction system based on error sorting according to claim 5, characterized in that, The module M2 includes: Submodule M201: Extends the fitted surface to the transition surface between the seed surfaces according to the growth algorithm of a single seed surface; Submodule M202: Marks the transition surface according to a preset rule. If the transition surface is marked by multiple seed surfaces, the corresponding mesh surface is the overlapping area.

7. The mesh model feature surface extraction system based on error sorting according to claim 5, characterized in that, The module M3 includes: Submodule M301: Based on the error sorting between the mesh surface and the fitted surface, determine the priority order in which each mesh surface in the overlapping region belongs to a different seed surface; Submodule M302: Guides the alternating growth of multiple sub-faces according to the priority order to obtain the feature face.

8. The mesh model feature surface extraction system based on error sorting according to claim 7, characterized in that, The submodule M301 includes: Unit D3011: Establish an error table for the mesh surfaces in the overlapping region that are marked multiple times by the fitted surface; Unit D3012: Sort the elements in the error table in ascending order according to their error values ​​to obtain the priority order.

Citation Information

Patent Citations

  • Interactive segmentation method, system and device for quadratic surface fitting-based model

    CN109801299A