A CAD model reconstruction method, system, device and medium

By employing methods such as partitioning, parameterization, structured interpolation, and trimming and stitching, the problem of lacking boundary point information in deformable meshes is solved, generating high-precision solid CAD models suitable for structural optimization and engineering analysis.

CN122454110APending Publication Date: 2026-07-24JIHUA LAB
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610849412.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-12
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

Existing technologies cannot effectively divide the deformed mesh into multiple feature regions without pre-recorded boundary point information, making it impossible to directly apply existing partitioning methods.

Method used

By acquiring the original CAD model and original mesh, the deformed mesh is partitioned using topological information, vertex mapping relationships are established, point-to-face distances are calculated, UV parameter information of mesh vertices is obtained, and the mesh is converted into a structured point cloud. Untrimmed surfaces are generated and trimmed and stitched to generate the reconstructed solid CAD model.

Benefits of technology

It improves the accuracy and topological consistency of the reconstructed model in the absence of pre-recorded boundary information, generating a high-precision solid CAD model suitable for structural optimization and engineering analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122454110A_ABST
    Figure CN122454110A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of model processing, and provides a CAD model reconstruction method, a system, a device and a medium.The method comprises the following steps: acquiring an original CAD model, an original grid and a deformed grid; the deformed grid is partitioned according to the original CAD model and the original grid, so that a plurality of feature regions are obtained; parameter information of grid vertices in each feature region is acquired, so that a parameter information set is obtained; the grid vertices are converted into structured point clouds according to the parameter information set and spatial coordinates of the grid vertices; an uncut surface is generated based on the structured point clouds; the uncut surface is cut, so that a cut surface is obtained; and the cut surface is spliced, so that a reconstructed solid CAD model is generated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of model processing technology, and in particular to a CAD model reconstruction method, system, device and medium. Background Technology

[0002] Surface reconstruction is a key technology in current reverse engineering. Existing reconstruction schemes typically triangulate the original CAD surface model and obtain a deformed mesh after stress analysis. During this process, the points on the boundaries and their corresponding parameter values ​​u and v on the original surface are recorded. Using this boundary point information, the deformed mesh can be divided into multiple feature regions. However, in some application scenarios, the original triangular mesh and the deformed mesh are provided directly as input data without undergoing the internal triangulation process of the algorithm, thus lacking the pre-recorded boundary point information. In this case, the existing method of dividing the deformed mesh into multiple feature regions using this boundary point information cannot be directly applied. Summary of the Invention

[0003] This application aims to improve at least one technical problem in the background art.

[0004] This application provides a CAD model reconstruction method, which includes: Obtain the original CAD model, original mesh, and deformed mesh; Based on the original CAD model and the original mesh, the deformed mesh is partitioned to obtain multiple feature regions; Obtain the parameter information of the grid vertices in each feature region to obtain the parameter information set; Based on the parameter information set and the spatial coordinates of the grid vertices, the grid vertices are converted into structured point clouds; Generating uncropped surfaces based on structured point clouds; The undone surface is trimmed to obtain the trimmed surface. The trimmed surfaces are stitched together to generate a reconstructed solid CAD model.

[0005] According to some technical solutions of this application, the step of partitioning the deformed mesh based on the original CAD model and the original mesh to obtain multiple feature regions specifically includes: Based on the topological information of the original CAD model, multiple original facets are obtained by decomposition; Based on the topological correspondence between the original mesh and the deformed mesh, establish a mapping relationship between each vertex of the deformed mesh and the corresponding vertex of the original mesh; Based on the mapping relationship, taking the vertices of the original mesh as objects, calculate the point-to-face distance from each vertex of the original mesh to each original facet, and obtain multiple point-to-face distance values; Select the minimum value from the multiple point-to-face distance values ​​corresponding to each vertex, and assign the vertex to the original face corresponding to the minimum value; Based on the mapping relationship, the corresponding vertices in the deformed mesh are mapped to the original facets that are the same as the vertices in the original mesh to obtain the correspondence relationship; Based on the correspondence, the deformed mesh triangles corresponding to the same original facet are summarized to form multiple feature regions.

[0006] According to some technical solutions of this application, obtaining the parameter information of the mesh vertices in each feature region to obtain a parameter information set specifically includes: Obtain the parameterized definition of the original patch corresponding to each feature region, and use it as the parameter domain; For each feature region, obtain the deformed mesh vertices contained within that feature region; Project each deformed mesh vertex within the feature region onto the corresponding original face along the normal direction; Determine whether the projection point is within the parameter domain. If it is, directly obtain the UV coordinates as the UV parameter information of the corresponding mesh vertex. If it is outside the parameter domain, take the UV coordinates of the point closest to the projection point on the boundary of the parameter domain as the UV parameter information of the corresponding mesh vertex. After obtaining the parameter information for all feature regions, the UV parameter information of all mesh vertices within each feature region is integrated to obtain a parameter information set.

[0007] According to some technical solutions of this application, the step of converting mesh vertices into structured point clouds based on parameter information sets and the spatial coordinates of mesh vertices specifically includes: Obtain the UV parameter range for each feature region; Generate a two-dimensional UV matrix based on the UV parameter range of each feature region; The grid vertices within the feature region are used as sample points, and the sample points include UV parameter information and spatial coordinates from the parameter information set. In the UV 2D matrix, nodes that coincide with the UV coordinates of the sample points are marked as known nodes, and the remaining nodes are marked as unknown nodes; Using the radial basis function interpolation algorithm, the spatial coordinates of unknown nodes in the UV two-dimensional matrix are calculated based on the known node UV parameter information and spatial coordinates. By integrating the UV parameter coordinates of all nodes in the UV two-dimensional matrix and their corresponding spatial coordinates, a structured point cloud is obtained.

[0008] According to some technical solutions of this application, the generation of uncropped surfaces based on structured point clouds specifically includes: Isoparametric line samples were extracted from the structured point cloud. Curve fitting is performed on the extracted isoparametric line points to generate multiple spline curves; Loft multiple spline curves to generate an uncropped surface.

[0009] According to some technical solutions of this application, the step of trimming the undripped surface to obtain the trimmed surface specifically includes: Extract the grid boundary of each feature region as the clipping curve; Project the boundary curve onto the corresponding uncropped surface to generate the clipped curve; The undressed surface is trimmed according to the trimming curve to obtain the trimmed surface.

[0010] According to some technical solutions of this application, the step of stitching together the trimmed curved surfaces to generate a reconstructed solid CAD model specifically includes: Based on the topology of the original CAD model, the adjacency relationships between each original patch are extracted from the topology. Based on adjacency relationships, align the boundaries of adjacent trimmed surfaces; After aligning the boundaries, perform surface stitching on each surface to generate the reconstructed solid CAD model.

[0011] This application also provides a CAD model reconstruction system, which includes: The acquisition module is used to acquire the original CAD model, the original mesh, and the deformed mesh. The partitioning module is used to partition the deformed mesh according to the original CAD model and the original mesh to obtain multiple feature regions; The integration module is used to obtain parameter information of the mesh vertices in each feature region to obtain a parameter information set; The conversion module is used to convert mesh vertices into structured point clouds based on the parameter information set and the spatial coordinates of the mesh vertices. The generation module is used to generate uncropped surfaces based on structured point clouds; The trimming module is used to trim unclipped surfaces to obtain trimmed surfaces; The stitching module is used to stitch together the trimmed curved surfaces to generate a reconstructed solid CAD model.

[0012] This application also provides a CAD model reconstruction device, the CAD model reconstruction device comprising: a memory and at least one processor, wherein the memory stores instructions; At least one of the processors invokes the instructions in the memory to cause the CAD model reconstruction device to perform the various steps of the CAD model reconstruction method as described in the above technical solution.

[0013] This application also provides a computer-readable storage medium storing instructions that, when executed by a processor, implement the various steps of the CAD model reconstruction method described above.

[0014] The CAD model reconstruction method provided in this application has at least the following beneficial effects: Based on the original CAD model and the triangular mesh before and after deformation, the mesh is divided into partitions, and the unstructured mesh vertices are transformed into structured point clouds through point-surface projection. Then, a surface is generated by fitting isoparametric lines and lofting. Subsequently, the mesh boundary is extracted as a clipping curve to clip the surface, and finally, a new CAD model is generated by stitching. This can improve the accuracy and topological consistency of the reconstructed model, so that the model surface can be reconstructed even when the mesh is used as input data and there is a lack of pre-recorded boundary information. Attached Figure Description

[0015] Figure 1 A three-dimensional structural diagram of the CAD model reconstruction method provided in the embodiments of this application; Figure 2 This is a schematic diagram of the original CAD model provided in the embodiments of this application; Figure 3 A schematic diagram of the original mesh structure provided in the embodiments of this application; Figure 4 A schematic diagram of the deformable mesh provided in the embodiments of this application; Figure 5 This is a schematic diagram of the structure after grid partitioning provided in an embodiment of this application; Figure 6 A schematic diagram of the structure of deformed mesh vertices projected onto the original model, provided in an embodiment of this application; Figure 7 This is a schematic diagram of the structured point cloud provided in the embodiments of this application; Figure 8 This is a schematic diagram of the structure for curve fitting of sample points provided in an embodiment of this application; Figure 9 This is a schematic diagram of the structure of the lofted surface generated according to an embodiment of this application; Figure 10 This is a schematic diagram of the structure for extracting and trimming curves provided in an embodiment of this application; Figure 11 This is a schematic diagram of the structure of the CAD model reconstruction system provided in the embodiments of this application; Figure 12 This is a schematic diagram of the structure of the CAD model reconstruction device provided in an embodiment of this application. Detailed Implementation

[0016] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0017] In the description of this application, it should be understood that the orientation descriptions, such as up, down, front, back, left, right, etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation or be constructed or operated in a specific orientation. Therefore, they should not be construed as limiting the present invention.

[0018] In the description of this application, unless otherwise expressly defined, terms such as "setup," "installation," and "connection" should be interpreted broadly, and those skilled in the art can reasonably determine the specific meaning of the above terms in this application in conjunction with the specific content of the technical solution.

[0019] The following is combined Figures 1 to 12 Embodiments of the present invention will be described.

[0020] Existing methods record the points on the boundaries and the corresponding parameter values ​​on the original surface during triangulation. Using this information from the boundary points, the deformed mesh can be divided into multiple feature regions. However, when the deformed mesh is provided directly as input data, the lack of boundary information recorded during the internal triangulation process makes it impossible to directly apply existing partitioning methods.

[0021] Based on this, this application provides a CAD model reconstruction method, which includes: S100, acquires the original CAD model, original mesh, and deformed mesh.

[0022] Specifically, the original CAD model is a geometric solid model generated by computer-aided design (CAD) software. It typically consists of multiple parametric surfaces used to define the ideal shape of the product.

[0023] The original mesh, also known as the original triangular mesh, is a mesh model obtained by triangulating the continuous curved surfaces of the original CAD model. It consists of a series of triangular patches and their vertices. This mesh is used for mesh generation in finite element analysis (FEA) to facilitate numerical calculations.

[0024] Deformed meshes are triangular meshes that have been deformed. They are new meshes obtained by applying mechanical loads or boundary conditions to the original triangular mesh and performing finite element analysis, resulting in a small displacement of each vertex. They reflect the shape changes of an object after being subjected to force.

[0025] See Figures 2 to 4 This presentation compares the morphology of the original CAD model, the original triangular mesh, and the deformed triangular mesh. The meshes before and after deformation have identical topological structures, meaning they share the same vertex connections and triangular facet structures. Because the surfaces before and after deformation are topologically homeomorphic, this one-to-one correspondence of vertices provides a foundation for subsequent parameter mapping using the original surface information.

[0026] S200 divides the deformed mesh into multiple feature regions based on the original CAD model and the original mesh.

[0027] Specifically, Figure 5 The diagram illustrates the result of partitioning the deformable mesh. Based on the topological and geometric information of the original CAD model and the original mesh, the original CAD model is decomposed into multiple independent facets according to its geometric features such as planes and curved surfaces. Each facet corresponds to a continuous parametric surface, thereby partitioning the deformable mesh.

[0028] Since the deformed mesh itself doesn't label which surface of the original model each facet belongs to, a one-to-one correspondence is made between each vertex of the deformed mesh and the vertex of the original mesh to extract all independent faces from the original CAD model. For each triangle in the deformed mesh, the distances from its three vertices to each original facet are calculated, thus assigning the triangle to the face with the smallest distance. By traversing all triangles, the entire deformed mesh can be divided into several sub-meshes, each corresponding to a surface in the original model. This assignment relationship is then mapped to the corresponding vertices of the deformed mesh. Finally, all deformed mesh triangles mapped to the same original facet are aggregated to form multiple independent feature regions. For example, for a cube CAD model, after this step, the deformed mesh will be automatically divided into six independent feature regions, each corresponding to a face of the cube.

[0029] Therefore, based on the topological information of the original model, the sheet model partitions are obtained. Based on the distance relationship between the mesh vertices and the original facets, the mesh triangles corresponding to each facet are found, so that each feature region corresponds to a face in the original model. This step does not rely on the boundary point information pre-recorded during triangulation; instead, it utilizes the information of the original boundary points to divide the deformed mesh into multiple feature regions, with each sub-mesh establishing a correspondence with an original surface piece.

[0030] S300: Obtain the parameter information of the grid vertices in each feature region to obtain the parameter information set.

[0031] Figure 6This step illustrates the process of projecting a deformed mesh vertex onto the original surface. Specifically, a point-to-surface projection algorithm can be used to project a point in 3D space onto the surface along the normal direction of that point, thus obtaining the parametric coordinates of that point on the surface. The shortest projection point from the deformed vertex to the original surface patch is calculated, and the corresponding (u,v) coordinates are obtained. Since the original surface patch is parameterized, the projection process can be achieved by solving a system of nonlinear equations or iterative optimization, so that each deformed mesh vertex obtains a pair of UV parameter values. These UV parameters record the vertex's position on the original surface before deformation, allowing the identification of the UV parameters of each vertex on the corresponding original surface patch for each vertex in the sub-mesh. Even if a vertex is displaced, its original position on the surface can still be found. Finally, the UV parameter information of all vertices is integrated to form the parameter information set of the feature region, where the UV parameters are the two-dimensional parametric coordinates of the surface.

[0032] Therefore, for each segmented feature region, its corresponding mesh vertices are obtained. Point-to-surface projection technology can be used to project the deformed mesh vertices onto the corresponding faces of the original CAD model, thereby accurately obtaining the UV parameter information of each vertex.

[0033] S400 converts grid vertices into structured point clouds based on the parameter information set and the spatial coordinates of the grid vertices, that is, it transforms discrete, unstructured grid vertices into structured point clouds.

[0034] Figure 7 A schematic diagram of a dense and regular structured point cloud is shown, specifically, based on the S300, the point cloud corresponding to each deformable mesh vertex. Coordinates and their three-dimensional spatial coordinates However, these vertices are scattered in the UV domain and cannot be directly used to generate regular surfaces.

[0035] In this step, a regular two-dimensional matrix is ​​generated based on the parameter information set. Specifically, a fixed-resolution UV two-dimensional matrix is ​​first generated based on the UV parameter range of each feature region or surface patch, where each node corresponds to a coordinate. Since some nodes happen to fall on the UV positions of existing deformed vertices, the original mesh vertices can be used as sample points. Nodes in the UV two-dimensional matrix whose UV coordinates coincide with those of the sample points are marked as known nodes, and the remaining nodes are marked as unknown nodes. A radial basis function interpolation algorithm is then used, based on the information of all known nodes, to interpolate the known nodes' coordinates. The input is used to construct multiple RBF interpolation functions corresponding to the x, y, and z components. For any unknown point, its spatial coordinates can be calculated using the RBF function.

[0036] Unstructured point clouds refer to a set of points where there is no regular mesh connection between the points. In this embodiment, although the vertices of the deformed mesh are topologically connected, they are unevenly distributed in the UV parameter domain and also belong to unstructured point clouds. Structured point clouds refer to points arranged in a regular rectangular mesh form, where each point can be indexed by coordinates to facilitate subsequent curve fitting and surface generation. Radial basis function interpolation algorithm is a function used for interpolation of scattered data. RBF interpolation can estimate the value of any unknown point by using known point values ​​and has good smoothness and stability.

[0037] Thus, each node in the UV matrix has a corresponding spatial coordinate, thereby transforming the discrete, unstructured point cloud into a standard two-dimensional structured point cloud with topological relationships.

[0038] S500 generates uncropped surfaces based on structured point clouds.

[0039] In this step, based on the structured point cloud, we first follow... direction or The process involves extracting sample points along a series of isoparametric lines. These sample points are then subjected to curve fitting to generate a smooth set of curves. Finally, using lofting or skinning techniques, these curves are used as cross-sections to generate a complete and uncropped surface. This surface is a complete rectangle within the parametric domain, but its shape accurately reflects the geometry of the deformable mesh. Figure 8 A schematic diagram of the extracted isoparametric lines is shown. Figure 9 A schematic diagram of the surface generated by lofting is shown.

[0040] Among them, the isoparametric line is a curve obtained by fixing one parameter and changing another parameter on the parametric surface; lofting or skinning technology is an existing surface modeling technology that generates a smooth surface by interpolating or approximating between a series of cross-sectional curves. This surface will pass through or approximate each input curve.

[0041] In this way, since the input point cloud is structured, the extraction and fitting process of isoparametric lines is very stable, avoiding the numerical instability problem caused by directly performing global surface fitting on unstructured point clouds.

[0042] S600 trims the undone surface to obtain the trimmed surface.

[0043] Since the surface generated in step S500 is a complete, uncropped rectangular domain surface, it needs to be clipped to ensure consistency between the reconstructed surface and the original model's topological boundary. However, the actual model's surface patches often have complex boundary shapes. Therefore, firstly, the outer boundary of the triangular mesh corresponding to each feature region is extracted, forming one or more closed boundary lines. Because the original mesh is continuous, the extracted boundary lines are also continuous and closed. Then, these boundary lines are used as clipping curves and projected onto the corresponding uncropped surface. Finally, the clipping curves are used to clip the uncropped surface, removing the surface portion outside the boundary, resulting in a clipped surface that accurately matches the deformed mesh boundary contour. Figure 10 A schematic diagram of the boundary loop extracted from the triangular mesh is shown.

[0044] S700 stitches together the trimmed surfaces to generate a reconstructed solid CAD model.

[0045] Specifically, after completing the surface reconstruction and trimming of all feature regions, each facet generates a corresponding deformed trimmed surface. Based on the topology of the original CAD model, the adjacency relationships between the original facets are obtained, such as one face sharing a boundary with another. According to this adjacency relationship, adjacent trimmed surfaces are aligned at their boundaries. That is, for each pair of adjacent deformed surfaces, their corresponding boundary curves are matched and fitted, thereby merging all trimmed surfaces together to form a continuous and closed solid model, which is the solid CAD model.

[0046] Therefore, this embodiment directly extracts information from the input mesh and sequentially performs partitioning, parameterization, structured interpolation, surface generation, trimming, and stitching, thus completely realizing the reconstruction from deformed mesh to solid CAD model. This solves the problem of direct reconstruction of unstructured input mesh, which can then be directly used for subsequent structural optimization, processing simulation, or assembly verification with other components. It avoids the tedious manual surface reconstruction process, significantly improves design iteration efficiency, and provides a high-precision geometric model foundation for subsequent engineering analysis and design iteration.

[0047] In some embodiments, step S200 involves partitioning the deformed mesh according to the original CAD model and the original mesh to obtain multiple feature regions, specifically including: S210, based on the topological information of the original CAD model, decomposes to obtain multiple original patches.

[0048] S220, Based on the topological correspondence between the original mesh and the deformed mesh, establish the mapping relationship between each vertex of the deformed mesh and the corresponding vertex of the original mesh; S230: Based on the mapping relationship, taking the vertices of the original mesh as objects, calculate the point-to-face distance from each vertex of the original mesh to each original facet, obtaining multiple point-to-face distance values. Since the original mesh and the deformed mesh have the same topology, the system establishes a one-to-one correspondence between the vertices of the two meshes. Specifically, for each vertex of the original mesh, there exists a unique corresponding vertex in the deformed mesh.

[0049] S240: Select the minimum value from the multiple point-to-face distance values ​​corresponding to each vertex, and assign the vertex to the original face corresponding to the minimum value; compare the distance of each vertex to all faces, and select the face with the smallest distance as the face to which the vertex belongs. For example, a grid vertex located on the top surface of a cube has a distance of 0 to the top surface, but a larger distance to other faces, so it will be correctly assigned to the top surface.

[0050] S250, according to the mapping relationship, the corresponding vertices in the deformed mesh are mapped to the original facets that are the same as the vertices of the original mesh to obtain the correspondence relationship; S260, based on the correspondence, deformed mesh triangles corresponding to the same original facet are aggregated to form multiple feature regions. All triangular elements of the deformed mesh are traversed. For a triangle, if all three vertices belong to the same facet B, then the triangle is marked as belonging to feature region A. All triangular elements marked as belonging to A are aggregated together to form a feature region in the deformed mesh corresponding to the original facet B.

[0051] In some embodiments, step S300 involves obtaining parameter information of the mesh vertices within each feature region to obtain a parameter information set, specifically including: S310: Obtain the parameterized definition of the original patch corresponding to each feature region, as the parameter domain. For each feature region divided in S200, the system first determines its corresponding original patch and obtains the parameterized definition of the patch. This definition includes the range of UV parameters and a function that maps UV coordinates to points in three-dimensional space. .

[0052] For example, the range of UV parameters is: , ,in For the coordinates of a parameter direction corresponding to the surface, This is the coordinate corresponding to another parameter direction of the surface.

[0053] S320: For each feature region, obtain the deformed mesh vertices contained within that feature region. That is, obtain the set of all deformed mesh vertices contained in the current feature region.

[0054] S330, project each deformed mesh vertex within the feature region onto the corresponding original face along the normal direction. Specifically, for each deformed mesh vertex within the feature region... The system projects it onto the corresponding original surface along the normal direction of that surface. Projection point The calculation formula is: in, It is on the sheet of dough The unit normal vector of the nearest point It is the distance between a point and a surface.

[0055] S340, determine whether the projection point is within the parameter domain. If it is within the parameter domain, directly obtain the UV coordinates as the UV parameter information of the corresponding mesh vertex; if it is outside the parameter domain, take the UV coordinates of the point closest to the projection point on the boundary of the parameter domain as the UV parameter information of the corresponding mesh vertex.

[0056] For example, the UV coordinates of the projection point Q within the original patch parameter domain are calculated. Subsequently, a judgment was made. Is it in the parameter domain? Inside, among them, for Minimum value in direction, for Maximum value in direction, for Minimum value in direction, for The maximum value in the direction.

[0057] If it is within the parameter domain, then take it directly. As grid vertices UV parameter information.

[0058] If it exceeds the parameter range, for example < The system then searches for the distance on the parameter domain boundary. The nearest point. The specific method is to... Clamp to boundary value ,get And calculate whether the point is the closest point; if If the value is also outside the range, then the nearest corner point is used. Finally, the UV coordinates of the nearest point on the boundary are taken as... The UV parameter information is obtained. This processing method ensures that all vertices can obtain valid UV values, avoiding invalid data caused by projection points falling outside the parameter domain.

[0059] S350, after acquiring the parameter information for all feature regions, integrates the UV parameter information of all mesh vertices within each feature region to obtain a parameter information set. After acquiring the UV parameter information of all vertices within a feature region, the system organizes and stores this vertex information. After processing all feature regions, the system integrates the information from all regions into a complete parameter information set.

[0060] In related technologies, for general spline surfaces, a multi-step iterative method for fitting B-spline surfaces with error control is provided, typically using the least squares method. However, numerical solutions may be unstable. When fitting B-spline surfaces using the least squares method, improper parameterization may result in a non-singular coefficient matrix or a poor condition number, leading to surface distortion that does not meet user expectations. Therefore, in some embodiments, step S400, based on the parameter information set and the spatial coordinates of the mesh vertices, converts the mesh vertices into a structured point cloud, specifically including: S410, Obtain the UV parameter range for each feature region; for each feature region, based on the obtained parameter information set, determine the minimum and maximum values ​​of the UV coordinates of all vertices to obtain the UV parameter range for that region, for example... , ,in, for The range of values ​​for direction, for The range of values ​​for direction, for Minimum value in direction, for Maximum value in direction, for Minimum value in direction, for The maximum value in the direction.

[0061] S420 generates a two-dimensional UV matrix based on the UV parameter range of each feature region.

[0062] For example, in and Generate a resolution of Two-dimensional matrix ,in, for directional resolution, for Resolution of direction; each node in the matrix Corresponding to a UV coordinate ,in The first UV in the two-dimensional matrix Line 1 Column nodes, For nodes Corresponding UV coordinates and They are evenly distributed within their respective ranges.

[0063] S430, take the mesh vertices in the feature region as sample points, the sample points include UV parameter information and spatial coordinates in the parameter information set; take all the original mesh vertices in the current feature region as sample points, these sample points contain their UV coordinates and three-dimensional spatial coordinates.

[0064] S440: Mark the nodes in the UV 2D matrix that coincide with the UV coordinates of the sample point as known nodes, and mark the remaining nodes as unknown nodes; traverse the UV 2D matrix. All nodes. If the UV coordinates of a node completely coincide with the UV coordinates of a sample point or are within the preset tolerance, then the node is marked as a known node, and its spatial coordinates are the spatial coordinates of the sample point. The remaining nodes are marked as unknown nodes.

[0065] S450 uses the radial basis function interpolation algorithm to calculate the spatial coordinates of unknown nodes in the UV two-dimensional matrix based on the UV parameter information and spatial coordinates of known nodes; it uses the existing radial basis function (RBF) interpolation algorithm to calculate the spatial coordinates of all unknown nodes.

[0066] For example, this embodiment selects a thin plate spline as the basis function, and its radial basis function is: and radial distance The interpolation function is: ,in, The number of known points. These are the UV coordinates of the known nodes. It is the first Each weight, It is a linear polynomial. By substituting the UV coordinates of all known nodes and the known XYZ coordinates, the X, Y, and Z components can be solved separately to obtain the weights. And polynomial coefficients. Then, by substituting the UV coordinates of each unknown node into the solved interpolation function, its corresponding spatial coordinates can be calculated.

[0067] S460 integrates the UV parameter coordinates and their corresponding spatial coordinates of all nodes in the UV 2D matrix to obtain a structured point cloud. The UV matrix is ​​then calculated. After determining the spatial coordinates of all nodes, the data is integrated into a matrix. Each node contains its UV coordinates and calculated spatial coordinates. These nodes are arranged in the row and column order of the UV matrix, forming a structured point cloud with regular topological relationships.

[0068] Therefore, unstructured point clouds are transformed into structured point clouds through RBF interpolation, and then fitted into isoparametric lines for lofting. This method avoids the nonlinear solution problem in the direct fitting process, improves the robustness of surface reconstruction by utilizing structured data, and solves the problems of complex parameterization and difficulty in ensuring smoothness when directly performing least-squares fitting on unstructured meshes.

[0069] In some embodiments, S500, generating an uncropped surface based on a structured point cloud, specifically includes: S510 extracts isoparametric line samples from the structured point cloud.

[0070] In this step, the structured point cloud generated by S400 is obtained. This point cloud is arranged in a matrix within the UV parameter domain. Along one parameter direction, for example... Direction extraction isoparameters. For each fixed... The value retrieves the spatial points corresponding to all nodes in that row; these spatial points constitute the sample set of the isoparametric line. Optionally, it can also be along... Direction extraction.

[0071] S520 performs curve fitting on the extracted isoparametric line sample points to generate multiple spline curves. Since these points are discrete in space, for each set of isoparametric line sample points, an interpolation algorithm is used to ensure that the generated curve passes through each sample point, thus generating a smooth curve. During the fitting process, the parameter values ​​for each sample point are calculated, and then a system of linear equations is solved to obtain control points. Finally, a series of parameterized curves are obtained.

[0072] S530 is used to loft multiple spline curves to generate an uncropped surface.

[0073] In this step, a series of curves generated are used as cross-sectional lines, and a surface is constructed using loft or skinning techniques. This surface can completely describe the geometry of the deformed patch.

[0074] For example, the lofting algorithm generates a surface passing through all the cross-section lines by interpolating between these curves. First, all cross-section lines are raised to the same order, then the node vectors are unified, and finally the control point mesh of the surface is solved. The generated surface... exist The direction is defined by the section line, in The direction represents the interpolation result between the cross-sectional lines. This surface covers the entire UV parameter domain and accurately fits the geometry expressed by the structured point cloud.

[0075] Therefore, by first extracting isoparametric lines and then lofting, the surface generation problem is decomposed into a series of stable curve fitting problems and a lofting operation. Compared to directly fitting surfaces to point clouds, this method is computationally more stable, avoids the numerical instability problems of solving large linear systems, and can generate surfaces with good parameterization structure and smoothness. Simultaneously, it avoids the nonlinear solution problems in the direct fitting process, improves the robustness of surface reconstruction by utilizing structured data, and solves the problems of complex parameterization and difficulty in guaranteeing smoothness when directly performing least-squares fitting on unstructured meshes.

[0076] In related technical solutions, it is necessary to trim and stitch the reconstructed surface based on the topology of the original model to obtain the deformed solid model. This method is difficult to implement when there is only mesh input and the precise boundary definition of the original model is lacking. Therefore, in some embodiments, step S600, trimming the undragged surface to obtain the trimmed surface, specifically includes: S610 extracts the grid boundary of each feature region as the clipping curve.

[0077] In this step, for each defined feature region, the system analyzes its corresponding triangular mesh region. By traversing all the triangle edges within the region, the system counts how many triangles use each edge, thus identifying those edges used by only one triangle, i.e., the boundary edges. These boundary edges are then connected end-to-end to form one or more closed boundary loops. Since the original mesh is continuous, these boundary loops define the precise outer contour of the feature region in three-dimensional space.

[0078] S620: Project the boundary curves onto the corresponding uncropped surface to generate the clipping curve. In this step, to perform clipping on the surface, these spatial curves need to be projected onto the generated uncropped surface. First, the boundary loop is discretized into a series of points, and then each point is projected onto the uncropped surface along the normal direction of the surface to obtain the projection point. Finally, these projection points are fitted into a curve, which lies on the uncropped surface and is the clipping curve.

[0079] S630 performs a trimming operation on the undriminated surface based on the trimming curve, resulting in a trimmed surface. The trimming operation involves defining the inner and outer regions of the surface divided by the trimming curve. Based on the direction of the trimming curve, the desired region can be identified and retained; for example, retaining the side containing the model's interior. After trimming, a surface with boundaries that precisely match the original mesh boundaries is obtained, resulting in a trimmed surface with the correct boundary shape.

[0080] Therefore, the mesh boundary is extracted as the clipping curve using the triangular mesh corresponding to each facet. Since the original mesh is continuous, its clipping boundary is also continuous. By extracting the boundary of the mesh itself, the complex calculations required for pairwise extension and intersection of surfaces in traditional methods are avoided. Thus, the continuity of the original mesh boundary is utilized to directly generate an effective clipping surface. At the same time, it eliminates the dependence on the original model topology and solves the problem of inaccurate clipping when the input model lacks the original topological definition boundary.

[0081] In some embodiments, step S700 involves stitching the trimmed surfaces together to generate a reconstructed solid CAD model, specifically including: The S710, based on the topology of the original CAD model, extracts the adjacency relationships between the original faces from the topology; it reads the original CAD model, parses its boundary representation data structure, and extracts the adjacency relationships between the faces. Specifically, the system identifies which faces share the same boundary curve. For example, the top face of a cube shares an edge with its front, back, left, and right faces.

[0082] S720 aligns the boundaries of adjacent trimmed surfaces based on adjacency relationships; it also aligns the boundaries of each generated trimmed surface based on the acquired adjacency relationships. Since adjacent surfaces are generated independently through trimming, their boundary curves should ideally coincide, but slight gaps may exist due to numerical errors. The system detects the common boundary curves between adjacent surfaces and fine-tunes the boundary of one surface or aligns it to another surface to ensure a perfect match within tolerance.

[0083] S730 performs surface stitching on the aligned surfaces to generate a reconstructed solid CAD model. After boundary alignment, all trimmed surfaces are stitched together. The stitching process merges two surfaces with a common boundary to form a composite surface, ultimately constructing a closed, seamless solid model. Thus, the stitched model is a complete solid whose geometry accurately reflects the shape of the deformed mesh, and whose topology is consistent with the original CAD model.

[0084] In summary, the method provided in this application embodiment achieves effective partitioning in the case of missing internal record data by calculating the point-to-surface distance, thus solving the partitioning problem caused by changes in the input data source.

[0085] This application also provides a CAD model reconstruction system, including: Module 100 is used to acquire the original CAD model, the original mesh, and the deformed mesh. The partitioning module 200 is used to partition the deformed mesh according to the original CAD model and the original mesh to obtain multiple feature regions; The integration module 300 is used to obtain parameter information of the mesh vertices in each feature region to obtain a parameter information set; The conversion module 400 is used to convert the mesh vertices into a structured point cloud based on the parameter information set and the spatial coordinates of the mesh vertices. Generation module 500 is used to generate uncropped surfaces based on structured point clouds; The trimming module 600 is used to trim the unclipped surface to obtain the trimmed surface; The stitching module 700 is used to stitch together the cut curved surfaces to generate a reconstructed solid CAD model.

[0086] Figure 3 This is a schematic diagram of a CAD model reconstruction device 800 provided in an embodiment of the present invention. The CAD model reconstruction device 800 can vary significantly due to different configurations or performance. It may include one or more central processing units (CPUs) 810 (e.g., one or more processors) and a memory 820, and one or more storage media 830 (e.g., one or more mass storage devices) for storing application programs 833 or data 832. The memory 820 and storage media 830 can be temporary or persistent storage. The program stored in the storage media 830 may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the CAD model reconstruction device 800. Furthermore, the processor 810 may be configured to communicate with the storage media 830 and execute the series of instruction operations in the storage media 830 on the CAD model reconstruction device 800 to implement the steps of the CAD model reconstruction method provided in the above-described method embodiments.

[0087] The CAD model reconstruction device 800 may also include one or more power supplies 840, one or more wired or wireless network interfaces 850, one or more input / output interfaces 860, and / or one or more operating systems 831, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will understand that... Figure 3 The structure of the CAD model reconstruction device shown does not constitute a limitation on the CAD model reconstruction device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0088] The present invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the steps of a CAD model reconstruction method.

[0089] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system, device, or unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0090] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0091] The preferred embodiments of the present invention have been described in detail above, but the present disclosure is not limited to the embodiments described. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention, and these equivalent modifications or substitutions are all included within the scope defined by the claims of the present disclosure.

Claims

1. A method for reconstructing a CAD model, characterized in that: include: Obtain the original CAD model, original mesh, and deformed mesh; Based on the original CAD model and the original mesh, the deformed mesh is partitioned to obtain multiple feature regions; Obtain the parameter information of the grid vertices in each feature region to obtain the parameter information set; Based on the parameter information set and the spatial coordinates of the grid vertices, the grid vertices are converted into structured point clouds; Generating uncropped surfaces based on structured point clouds; The undone surface is trimmed to obtain the trimmed surface. The trimmed surfaces are stitched together to generate a reconstructed solid CAD model.

2. The CAD model reconstruction method according to claim 1, characterized in that: The process of partitioning the deformed mesh based on the original CAD model and the original mesh to obtain multiple feature regions specifically includes: Based on the topological information of the original CAD model, multiple original facets are obtained by decomposition; Based on the topological correspondence between the original mesh and the deformed mesh, establish a mapping relationship between each vertex of the deformed mesh and the corresponding vertex of the original mesh; Based on the mapping relationship, taking the vertices of the original mesh as objects, calculate the point-to-face distance from each vertex of the original mesh to each original face, and obtain multiple point-to-face distance values; Select the minimum value from the multiple point-to-face distance values ​​corresponding to each vertex, and assign the vertex to the original face corresponding to the minimum value to obtain the face to which the vertex belongs; Based on the mapping relationship, the corresponding vertices in the deformed mesh are associated with the same belonging facet to obtain the association relationship; Based on the correlation, each triangle in the deformed mesh is traversed, and triangles belonging to the same original facet are grouped together to form multiple feature regions.

3. The CAD model reconstruction method according to claim 1, characterized in that: The step of obtaining parameter information of the grid vertices in each feature region to obtain a parameter information set specifically includes: Obtain the parameterized definition of the original patch corresponding to each feature region, and use it as the parameter domain; For each feature region, obtain the deformed mesh vertices contained within that feature region; Project each deformed mesh vertex within the feature region onto the corresponding original face along the normal direction; Determine whether the projection point is within the parameter domain. If it is, directly obtain the UV coordinates as the UV parameter information of the corresponding mesh vertex. If the value is outside the parameter domain, the UV coordinates of the point closest to the projection point on the boundary of the parameter domain are taken as the UV parameter information of the corresponding mesh vertex. After obtaining the parameter information for all feature regions, the UV parameter information of all mesh vertices within each feature region is integrated to obtain a parameter information set.

4. The CAD model reconstruction method according to claim 1, characterized in that: The process of converting grid vertices into structured point clouds based on the parameter information set and the spatial coordinates of the grid vertices specifically includes: Obtain the UV parameter range for each feature region; Generate a two-dimensional UV matrix based on the UV parameter range of each feature region; The grid vertices within the feature region are used as sample points, and the sample points include UV parameter information and spatial coordinates from the parameter information set. In the UV 2D matrix, nodes that coincide with the UV coordinates of the sample points are marked as known nodes, and the remaining nodes are marked as unknown nodes; Using the radial basis function interpolation algorithm, the spatial coordinates of unknown nodes in the UV two-dimensional matrix are calculated based on the known node UV parameter information and spatial coordinates. By integrating the UV parameter coordinates of all nodes in the UV two-dimensional matrix and their corresponding spatial coordinates, a structured point cloud is obtained.

5. The CAD model reconstruction method according to claim 1, characterized in that: The generation of uncropped surfaces based on structured point clouds specifically includes: Isoparametric line samples were extracted from the structured point cloud. Curve fitting is performed on the extracted isoparametric line points to generate multiple spline curves; Loft multiple spline curves to generate an uncropped surface.

6. The CAD model reconstruction method according to claim 1, characterized in that: The process of trimming the undragged surface to obtain the trimmed surface specifically includes: Extract the grid boundary of each feature region as the clipping curve; Project the boundary curve onto the corresponding uncropped surface to generate the clipped curve; The undressed surface is trimmed according to the trimming curve to obtain the trimmed surface.

7. The CAD model reconstruction method according to claim 2, characterized in that: The step of stitching together the trimmed curved surfaces to generate a reconstructed solid CAD model specifically includes: Based on the topology of the original CAD model, the adjacency relationships between each original patch are extracted from the topology. Based on adjacency relationships, align the boundaries of adjacent trimmed surfaces; After aligning the boundaries, perform surface stitching on each surface to generate the reconstructed solid CAD model.

8. A CAD model reconstruction system, characterized in that: include: The acquisition module is used to acquire the original CAD model, the original mesh, and the deformed mesh. The partitioning module is used to partition the deformed mesh according to the original CAD model and the original mesh to obtain multiple feature regions; The integration module is used to obtain parameter information of the mesh vertices in each feature region to obtain a parameter information set; The conversion module is used to convert mesh vertices into structured point clouds based on the parameter information set and the spatial coordinates of the mesh vertices. The generation module is used to generate uncropped surfaces based on structured point clouds; The trimming module is used to trim unclipped surfaces to obtain trimmed surfaces; The stitching module is used to stitch together the trimmed curved surfaces to generate a reconstructed solid CAD model.

9. A CAD model reconstruction device, characterized in that: The CAD model reconstruction device includes: a memory and at least one processor, wherein the memory stores instructions; At least one of the processors invokes the instructions in the memory to cause the CAD model reconstruction device to perform the steps of the CAD model reconstruction method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions that, when executed by a processor, implement the steps of the CAD model reconstruction method as described in any one of claims 1-7.