A method, device, equipment and medium for repairing gaps in a CAD model

By creating virtual faces, virtual edges and virtual points in the CAD model, and automatically patching gaps using binary search trees and stitch tolerances, the problems of low repair accuracy and relying on manual operations in the existing technology are solved, and efficient and automated gap repair effects are achieved.

CN120105512BActive Publication Date: 2025-07-18CALCULATION AERODYNAMICS INST CHINA AERODYNAMICS RES & DEV CENT
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510581484.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-07
Publication Date
2025-07-18
Estimated Expiration
2045-05-07

AI Technical Summary

Technical Problem

When repairing CAD model gaps, the mesh-based method has low accuracy, while the geometric model-based repair method is difficult to ensure surface continuity, and it relies on manual operation of users, is inefficient and prone to errors.

Method used

By importing the initial CAD model, creating virtual faces, virtual edges and virtual points, using binary search trees and suture tolerances to determine the virtual edge of the gap target, perform segmentation and fusion processing, reconstruct the topological relationship and perform discrete grid sutures, and realize automated repair.

Benefits of technology

It realizes efficient and high-precision gap repair of CAD model, reduces manual interaction time, and improves the rationality and repair efficiency of topological structure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120105512B_ABST
    Figure CN120105512B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, equipment and medium for repairing gaps in a CAD model, which relates to the technical field of computer-aided design and includes: importing an initial CAD model, creating corresponding virtual surfaces, virtual edges and virtual points for each digital model surface, digital model line and digital model point of the initial CAD model; setting an initial stitching tolerance according to the diagonal length of the model bounding box and the average length of the virtual edges; establishing a binary search tree based on all the virtual edges, using the binary search tree and the initial stitching tolerance to determine the target virtual edge where the gap is located, and performing a splitting operation on the target virtual edge to obtain updated virtual edges and updated virtual points; respectively performing a fusion process on the updated virtual edges and updated virtual points, reconstructing the topological relationship between the target virtual surfaces on both sides of the gap and updating the discrete grid data on the target virtual surfaces; performing a stitching process on the discrete grid data between the target virtual surfaces to obtain a repaired CAD model. Automatically and efficiently complete the gap stitching of the CAD model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer-aided design, and particularly to a method, device, equipment and medium for repairing gaps in a CAD model. Background Art

[0002] The geometric shape of a CAD (Computer Aided Design) model of a body panel is relatively complex. A relatively large model is often composed of thousands of B-spline surfaces spliced together, resulting in small gaps between the surface patches. Currently, the repair of CAD models can be mainly divided into two methods: one is data repair based on meshes. This method first generates finite element meshes for the CAD model, and then eliminates the incorrect mesh data through mesh recognition, node merging and other processing methods, and finally generates a legal watertight mesh model; the other is data repair based on geometric models. This method directly targets the CAD geometric model and repairs the geometric or topological errors therein. The mesh-based repair has the problem of low accuracy, while the geometric model-based repair has the problem that the repaired surface fails to meet the continuity requirements. In addition, such algorithms involve the calculation of a unified node vector, which will cause the node vector to increase sharply, resulting in too many control vertices of the surface, and finally leading to low solution efficiency. In addition, this type of method relies on manual operation by users for the repair of large and complex models, with low efficiency and easy to make mistakes. Summary of the Invention

[0003] In view of this, the purpose of the present invention is to provide a method, device, equipment and medium for repairing gaps in a CAD model, which can automatically, efficiently and accurately repair the gaps in the CAD model. The specific solutions are as follows:

[0004] In a first aspect, the present application discloses a method for repairing gaps in a CAD model, including:

[0005] Importing an initial CAD model, and creating corresponding virtual surfaces, virtual edges and virtual points for each digital model surface, digital model line and digital model point of the initial CAD model;

[0006] Setting an initial stitching tolerance according to the diagonal length of the model bounding box and the average length of the virtual edges; wherein, the model bounding box is a bounding box established based on the discrete grid data of all virtual surfaces;

[0007] Establishing a binary search tree based on all virtual edges, to determine the target virtual edge where the gap is located by using the binary search tree and the initial stitching tolerance, and performing a splitting operation on the target virtual edge to obtain updated virtual edges and updated virtual points; wherein, the root node of the binary search tree is a parent virtual edge bounding box containing all virtual edges, and the leaf nodes are child virtual edge bounding boxes of each virtual edge;

[0008] Perform fusion processing on the updated virtual edges and the updated virtual points respectively to reconstruct the topological relationship between the target virtual surfaces on both sides of the gap and update the discrete grid data on the target virtual surfaces;

[0009] Perform stitching processing on the discrete grid data between the target virtual surfaces to obtain the repaired CAD model.

[0010] Optionally, the setting of the initial stitching tolerance according to the diagonal length of the model bounding box and the average length of the virtual edges includes:

[0011] Calculate the diagonal length of the model bounding box based on the diagonal vertex coordinate information of the model bounding box, and set a preset length threshold according to the diagonal length;

[0012] If the average length of the virtual edges is less than the preset length threshold, set the initial stitching tolerance to the first initial stitching tolerance;

[0013] If the average length of the virtual edges is greater than or equal to the preset length threshold, set the initial stitching tolerance to the second initial stitching tolerance.

[0014] Optionally, the establishment of a binary search tree based on all virtual edges to use the binary search tree and the initial stitching tolerance to determine the target virtual edge where the gap is located, and perform a splitting operation on the target virtual edge to obtain the updated virtual edges and updated virtual points includes:

[0015] Create a virtual point bounding box using the initial stitching tolerance and each virtual point, search for the first virtual edge bounding box that intersects the virtual point bounding box from the binary search tree, and calculate the shortest distance between the virtual points of the virtual point bounding box and the first target virtual edge where the first virtual edge bounding box is located;

[0016] When the shortest distance is less than the initial stitching tolerance, trigger a splitting operation on the first target virtual edge to obtain the updated virtual edges and updated virtual points.

[0017] Optionally, the calculation of the shortest distance between the virtual points of the virtual point bounding box and the first target virtual edge where the first virtual edge bounding box is located includes:

[0018] Divide the first target virtual edge into several virtual edge segments, calculate the target distances between the virtual points and the endpoints of each virtual edge segment respectively, determine that the nearest point is located on the virtual edge segment corresponding to the minimum target distance, and determine the virtual edge segment corresponding to the minimum target distance as the target virtual edge segment;

[0019] Perform iterative calculation on the target virtual edge segment through the binary iteration method to obtain the parameter value of the nearest point, so as to determine the coordinate information of the nearest point on the first target virtual edge;

[0020] Calculate and determine the closest distance by using the coordinate information of the virtual points and the coordinate information of the closest points.

[0021] Optionally, the respective fusion processing of the updated virtual edges and the updated virtual points to reconstruct the topological relationship between the target virtual surfaces on both sides of the gap and update the discrete grid data on the target virtual surfaces includes:

[0022] Set the updated virtual edge as the center of the bounding box and the initial stitching tolerance as the size of the bounding box, and create a second virtual edge bounding box for each of the updated virtual edges;

[0023] Search for a third virtual edge bounding box intersecting with the second virtual edge bounding box from the binary search tree, and calculate the edge distance between the updated virtual edge and the second target virtual edge where the third virtual edge bounding box is located;

[0024] If the edge distance is less than the initial stitching tolerance, merge the updated virtual edge and the second target virtual edge to obtain a super edge;

[0025] Merge each of the updated virtual points according to the edge merging operation of the updated virtual edge to obtain super points;

[0026] Reconstruct the topological relationship between the target virtual surfaces on both sides of the gap and update the discrete grid data on the target virtual surfaces based on the super edges and the super points.

[0027] Optionally, the stitching process of the discrete grid data between the target virtual surfaces to obtain a patched CAD model includes:

[0028] Determine the discrete grids to be stitched on the two target virtual surfaces to obtain a first discrete grid to be stitched and a second discrete grid to be stitched;

[0029] Construct a first set of grid points based on the first boundary grids on the adjacent edges of the first discrete grid to be stitched and the second discrete grid to be stitched;

[0030] Construct a second set of grid points based on the second boundary grids on the adjacent edges of the second discrete grid to be stitched and the first discrete grid to be stitched;

[0031] Calculate the point pair distances between the grid points in the first set of grid points and the second set of grid points, and filter the grid point pairs whose point pair distances meet the fusion tolerance condition as target grid point pairs, and arrange the target grid point pairs in ascending order according to the distance size to obtain a set of points to be stitched;

[0032] Perform triangular fusion on each of the target grid point pairs in order from the set of points to be stitched to obtain a patched CAD model.

[0033] Optionally, the method for repairing the CAD model gap further includes:

[0034] Checking whether there is a gap in the repaired CAD model. If so, expanding the initial stitching tolerance to obtain a new initial stitching tolerance, and jumping to execute the step of establishing a binary search tree based on all virtual edges to determine the target virtual edge where the gap is located by using the binary search tree and the initial stitching tolerance, until there is no gap in the repaired CAD model.

[0035] In a second aspect, the present application discloses a device for repairing a CAD model gap, including:

[0036] A virtual information creation module, configured to import an initial CAD model, and create corresponding virtual faces, virtual edges, and virtual points for each digital model face, digital model line, and digital model point of the initial CAD model;

[0037] A stitching tolerance determination module, configured to set an initial stitching tolerance according to the diagonal length of the model bounding box and the average length of the virtual edges; wherein, the model bounding box is a bounding box established based on the discrete grid data of all virtual faces;

[0038] A virtual information update module, configured to establish a binary search tree based on all virtual edges to determine the target virtual edge where the gap is located by using the binary search tree and the initial stitching tolerance, and perform a splitting operation on the target virtual edge to obtain updated virtual edges and updated virtual points; wherein, the root node of the binary search tree is a parent virtual edge bounding box containing all virtual edges, and the leaf nodes are child virtual edge bounding boxes of each virtual edge;

[0039] A relationship reconstruction module, configured to perform a fusion process on the updated virtual edges and the updated virtual points respectively to reconstruct the topological relationship between the target virtual faces on both sides of the gap and update the discrete grid data on the target virtual faces;

[0040] A stitching module, configured to perform a stitching process on the discrete grid data between the target virtual faces to obtain a repaired CAD model.

[0041] In a third aspect, the present application discloses an electronic device, including:

[0042] A memory, configured to store a computer program;

[0043] A processor, configured to execute the computer program to implement the steps of the method for repairing the CAD model gap disclosed above.

[0044] In a fourth aspect, the present application discloses a computer-readable storage medium, configured to store a computer program; wherein, when the computer program is executed by a processor, the steps of the method for repairing the CAD model gap disclosed above are implemented.

[0045] It can be seen that the present application discloses a method for repairing gaps in a CAD model, including: importing an initial CAD model, and creating corresponding virtual surfaces, virtual edges, and virtual points for each digital model surface, digital model line, and digital model point of the initial CAD model; setting an initial stitching tolerance according to the diagonal length of the model bounding box and the average length of the virtual edges; wherein, the model bounding box is a bounding box established based on the discrete grid data of all virtual surfaces; establishing a binary search tree based on all virtual edges to use the binary search tree and the initial stitching tolerance to determine the target virtual edge where the gap is located, and performing a splitting operation on the target virtual edge to obtain updated virtual edges and updated virtual points; wherein, the root node of the binary search tree is a parent virtual edge bounding box containing all virtual edges, and the leaf nodes are child virtual edge bounding boxes of each virtual edge; respectively performing a fusion process on the updated virtual edges and the updated virtual points to reconstruct the topological relationship between the target virtual surfaces on both sides of the gap and update the discrete grid data on the target virtual surfaces; performing a stitching process on the discrete grid data between the target virtual surfaces to obtain a repaired CAD model. Thus, when determining the target virtual edge where the gap is located, by utilizing the structural characteristics of the binary search tree, rapid positioning can be achieved, and compared with checking all virtual edges one by one, the search time is greatly reduced; respectively performing a fusion process on the updated virtual edges and the updated virtual points reconstructs the topological relationship between the target virtual surfaces on both sides of the gap, making the model more reasonable in topological structure; moreover, the entire repair process, from importing the model, creating virtual objects, calculating tolerances to processing virtual edges and grid stitching, etc., is automated, without a large amount of manual interaction, reducing the time cost of manual repair. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present invention, and for those of ordinary skill in the art, other drawings can be obtained according to the provided drawings without creative efforts.

[0047] Figure 1 It is a flowchart of a method for repairing gaps in a CAD model disclosed in the present application;

[0048] Figure 2 It is a schematic diagram of the actual geometric boundary of a CAD model disclosed in the present application;

[0049] Figure 3 It is a schematic diagram of superpoint merging of a CAD model disclosed in the present application;

[0050] Figure 4 It is a schematic diagram of the first superedge fusion of a CAD model disclosed in the present application;

[0051] Figure 5 Schematic diagram of the second super-edge fusion of a CAD model disclosed in this application;

[0052] Figure 6 Schematic diagram of the third super-edge fusion of a CAD model disclosed in this application;

[0053] Figure 7 Schematic diagram of the fourth super-edge fusion of a CAD model disclosed in this application;

[0054] Figure 8(a) is a schematic diagram of the first discrete grid boundary stitching of the gaps of a CAD model disclosed in this application;

[0055] Figure 8(b) is a schematic diagram of the second discrete grid boundary stitching of the gaps of a CAD model disclosed in this application;

[0056] Figure 8(c) is a schematic diagram of the third discrete grid boundary stitching of the gaps of another CAD model disclosed in this application;

[0057] Figure 8(d) is a schematic diagram of the fourth discrete grid boundary stitching of the gaps of another CAD model disclosed in this application;

[0058] Figure 9 Schematic diagram of the structure of a repair device for the gaps of a CAD model disclosed in this application;

[0059] Figure 10 Schematic diagram of the structure of an electronic device disclosed in this application. Detailed implementation manners

[0060] Next, the technical solutions in the embodiments of this application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0061] Digital models with complex geometric shapes such as airplanes and automobiles are often composed of thousands of B-spline surfaces spliced together, resulting in small gaps between the surface patches. The existence of such problems makes it difficult to further process the CAD data subsequently, such as the automatic generation of finite element meshes, die surface process design, and so on. Therefore, repairing the gap problems existing in the CAD model is a necessary and important task.

[0062] The geometric shape of the body panel CAD model is relatively complex. Larger models are often composed of thousands of B-spline surfaces stitched together, resulting in small gaps between the surface patches. Currently, the repair of CAD models can be mainly divided into two methods: one is data repair based on meshes. This method first generates finite element meshes for the CAD model, and then eliminates the incorrect mesh data through mesh recognition, node merging and other processing methods, and finally generates a legal watertight mesh model; the other is data repair based on geometric models. This method directly targets the CAD geometric model and repairs the geometric or topological errors therein. The mesh-based repair has the problem of low accuracy, while the geometric model-based repair has the problem that the repaired surface cannot meet the continuity requirements, and such algorithms involve the calculation of unified node vectors, which will cause the node vectors to increase sharply, resulting in too many control vertices of the surface, and finally leading to low solution efficiency. In addition, this type of method relies on manual operation by users for the repair of large and complex models, with low efficiency and easy to make mistakes.

[0063] Therefore, the present invention provides a repair solution for the gaps in the CAD model, which can automatically, efficiently and highly accurately repair the gaps in the CAD model.

[0064] Referring to Figure 1 As shown, an embodiment of the present invention discloses a method for repairing gaps in a CAD model, including:

[0065] Step S11: Import the initial CAD model, and create corresponding virtual surfaces, virtual edges and virtual points for each digital model surface, digital model line and digital model point of the initial CAD model.

[0066] In this embodiment, first, an initial CAD model for numerical simulation is imported. The numerical sources can be actual part parameters such as part dimensions and shapes. The part can be a mechanical part in different fields, such as a mechanical part with complex curved surfaces like an automobile body part or an aircraft outer shell. There is no specific limitation on this. After importing and obtaining the initial CAD model, a watertight mesh generation framework is used to create corresponding virtual face objects, virtual edge objects, and virtual point objects for each digital model face, digital model line, and digital model point of the initial CAD model respectively. For example, when the numerical simulation scenario is specifically a CAD simulation scenario of an aircraft wing, the initial CAD model is the initial aircraft wing CAD model obtained after importing the actual parameters of the aircraft wing and performing numerical simulation. The actual parameters of the wing include: the wingspan, chord length, sweep angle, and airfoil parameters. Corresponding virtual faces, virtual edges, and virtual points are created for each digital model face, digital model line, and digital model point of this initial aircraft wing CAD model. This step is to establish virtual geometric elements for subsequent processing operations to facilitate gap detection and repair. In the aircraft wing CAD model, virtual points are distributed in various parts of the wing, including the leading edge, trailing edge, wing tips, etc. The created bounding box should accurately cover the area where gaps may exist. The virtual edge is a virtual mapping of the actual wing surface in the initial aircraft wing CAD model (such as the upper and lower wing surfaces, leading edge, trailing edge, wing tip transition surfaces, etc.). Each virtual face corresponds to a physical surface patch for subsequent gap detection and mesh processing. The virtual edge corresponds to the boundary of the wing surface patch and is the common boundary between adjacent virtual faces. For example: the intersection line of the upper and lower wing surfaces (the trailing edge of the wing). The connection line between the wing tip surface and the main wing surface. The transition boundary where the wing is connected to the fuselage.

[0067] Step S12: Set an initial stitching tolerance according to the diagonal length of the model bounding box and the average length of the virtual edges; wherein, the model bounding box is a bounding box established based on the discrete grid data of all virtual faces.

[0068] In this embodiment, the diagonal length of the model bounding box is calculated based on the diagonal vertex coordinate information of the model bounding box to set a preset length threshold according to the diagonal length; if the average length of the virtual edges is less than the preset length threshold, the initial stitching tolerance is set as the first initial stitching tolerance; if the average length of the virtual edges is greater than or equal to the preset length threshold, the initial stitching tolerance is set as the second initial stitching tolerance. It can be understood that a bounding box containing the entire model is established using the discrete grid data of all virtual faces in the CAD model. If the CAD model is an aircraft wing CAD model, then this bounding box is the smallest cuboid containing the entire aircraft wing model, which can define the range of the model in three-dimensional space. And the diagonal length of the current model bounding box is calculated through the diagonal vertex coordinates of the model bounding box , and then take As a preset length threshold. Then calculate the average length of the virtual edges in the current model . If , set the first initial stitching tolerance , otherwise set the second initial stitching tolerance . When the CAD model is an aircraft wing CAD model, the setting of the initial stitching tolerance needs to comprehensively consider the accuracy requirements of the wing model and the needs of subsequent numerical simulations. For example, for high-precision wing aerodynamic simulations, the tolerance needs to be set smaller.

[0069] Step S13: Establish a binary search tree based on all virtual edges to determine the target virtual edge where the gap is located by using the binary search tree and the initial stitching tolerance, and perform a splitting operation on the target virtual edge to obtain updated virtual edges and updated virtual points; wherein, the root node of the binary search tree is the parent virtual edge bounding box containing all virtual edges, and the leaf nodes are the child virtual edge bounding boxes of each virtual edge.

[0070] In this embodiment, a binary search tree is established for all virtual edge objects of the current CAD model, and the root node is a large bounding box containing all virtual edge objects. Starting from the root node of the binary search tree, the large bounding box is continuously divided using planes perpendicular to the coordinate axes until each small space contains only one virtual edge bounding box, that is, the leaf node, to create the bounding box of the virtual edge The algorithm is as follows:

[0071] ;

[0072] Among them, represents the minimum value of the x-axis coordinates of all points on the virtual edge , represents the minimum value of the y-axis coordinates of all points on the virtual edge , represents the minimum value of the z-axis coordinates of all points on the virtual edge , represents the maximum value of the x-axis coordinates of all points on the virtual edge , represents the maximum value of the y-axis coordinates of all points on the virtual edge , represents the maximum value of the z-axis coordinates of all points on the virtual edge .

[0073] In this way, by calculating the coordinate extreme values of all points on the virtual edge, the bounding box The spatial range is used to geometrically define the virtual edge.

[0074] In this embodiment, a virtual point bounding box is created using the initial stitching tolerance and each virtual point, and a first virtual edge bounding box intersecting with the virtual point bounding box is searched from the binary search tree to calculate the closest distance between the virtual points of the virtual point bounding box and the first target virtual edge where the first virtual edge bounding box is located; when the closest distance is less than the initial stitching tolerance, a splitting operation on the first target virtual edge is triggered to obtain updated virtual edges and updated virtual points. It can be understood that by traversing all virtual points, a virtual point bounding box with the three-dimensional coordinates of the virtual point as the center of the body is created according to the second initial stitching tolerance or the first initial stitching tolerance (which stitching tolerance to specifically select needs to be determined according to the previous calculation results). . Search in the binary tree for the intersecting virtual edge bounding box to obtain the first virtual edge bounding box.

[0075] In this embodiment, the first target virtual edge is divided into several virtual edge segments, the target distances between the virtual points and the endpoints of each virtual edge segment are calculated respectively, and it is determined that the closest point is located on the virtual edge segment corresponding to the minimum target distance, and the virtual edge segment corresponding to the minimum target distance is determined as the target virtual edge segment; the target virtual edge segment is iteratively calculated by the binary iteration method to obtain the parameter value of the closest point to determine the coordinate information of the closest point on the first target virtual edge; the closest distance is calculated and determined using the coordinate information of the virtual point and the coordinate information of the closest point. It can be understood that the closest point from the virtual point to the first target virtual edge where the first virtual edge bounding box is located is calculated. The closest point is calculated by the following formula: The first target virtual edge is divided into segments, and the initial interval where the closest point is located is calculated , that is, the target virtual edge segment where the closest point is located is determined, and then the binary iteration method is used to accurately calculate the parameter value of the closest point.

[0076] Further, if the closest distance from the virtual point to the virtual edge meets the first initial stitching tolerance or the second initial stitching tolerance, a first target virtual edge splitting operation is performed, the first target virtual edge is virtually split into two new virtual edge objects, and a new virtual point object is generated to obtain updated virtual edges and updated virtual points.

[0077] Step S14: Perform fusion processing on the updated virtual edges and the updated virtual points respectively to reconstruct the topological relationship between the target virtual surfaces on both sides of the gap and update the discrete grid data on the target virtual surfaces.

[0078] In this embodiment, the updated virtual edge is set as the center of the bounding box, the initial stitching tolerance is the size of the bounding box, and a second virtual edge bounding box of each updated virtual edge is created; a third virtual edge bounding box intersecting with the second virtual edge bounding box is searched from the binary search tree, and the edge distance between the updated virtual edge and the second target virtual edge where the third virtual edge bounding box is located is calculated; if the edge distance is less than the initial stitching tolerance, the updated virtual edge and the second target virtual edge are merged to obtain a super edge; according to the edge merging operation of the updated virtual edge, each updated virtual point is merged to obtain a super point; based on the super edge and the super point, the topological relationship between the target virtual surfaces on both sides of the gap is reconstructed and the discrete grid data on the target virtual surfaces is updated. It can be understood that all updated virtual edges are traversed, and a second virtual edge bounding box of each updated virtual edge is created according to the initial stitching tolerance of the second virtual edge bounding box :

[0079] ;

[0080] Further, a virtual edge bounding box intersecting with the second virtual edge bounding box is searched in the binary tree as the third virtual edge bounding box, and then the edge distance between the second target virtual edge where the third virtual edge bounding box is located and the updated virtual edge where the second virtual edge bounding box is located between the two virtual edges is calculated: where

[0081] ;

[0082] wherein, is a point on the updated virtual edge , is a point on the second target virtual edge . If the calculated edge distance is less than the initial stitching tolerance , the two virtual edges are merged into one super edge. The super edge belongs to a type of edge object in the super set. The super set is a virtual entity referring to two or more actual entities. For example, the merged surface of two surfaces is called a super surface, the merged edge of two edges is called a super edge, and the merging of two virtual points is called a super point.

[0083] Further, in order to prevent the situation that the generated grid is not closed at the intersection points of the digital model surfaces, the principle of processing super points during super edge fusion is as follows:

[0084] When a certain super point is already associated with a virtual super point, no virtual super point is generated and a replacement operation is executed;

[0085] When a certain super point is not associated with a virtual super point, a new virtual super point is created;

[0086] When there is a situation where virtual superpoints need to be merged, a virtual superpoint is obtained after fusion, and other virtual superpoints are randomly deleted. Finally, the obtained virtual superpoint is associated with the corresponding superpoints.

[0087] In this way, during the hyperedge fusion process, the auxiliary virtual points introduced to solve the non-closed problem at the mesh junction points are used to mark or reference the specific operation objects of the superpoints during the stitching stage. The virtual superpoints are not independent entities but associations or extensions of the superpoints, used to maintain data consistency during mesh stitching. When hyperedges are fused, if multiple superpoints need to be further merged (for example, to avoid mesh breaks), the virtual superpoints serve as intermediate marks to guide how to replace or delete redundant points. Through the association between the virtual superpoints and the superpoints, it is ensured that the stitched mesh is strictly closed at the junction points and the underlying topological relationships are consistent.

[0088] As Figure 2 shown, Figure 2 in the actual geometric boundary of the original CAD model, where, Figure 2 the boundary is composed of multiple surface patches stitched together. However, due to modeling errors or data conversion problems, there are breaks, overlaps, or misaligned gaps between the surface patches. Figure 2 The initial boundary of Figure 3 appears as multiple discontinuous line segments or curves, with obvious gaps or misalignments between adjacent boundaries. To handle the gap problem between the surface patches, first traverse all boundary endpoints, create corresponding virtual points, identify shared or close endpoints in adjacent boundaries, and mark them as superpoint candidates (for example, endpoints where two boundaries should be geometrically connected but are misaligned). Figure 3 In , , , , the initial virtual topology structure begins to form, and the superpoints are marked at the key connection points of the boundary (such as the shared endpoints of adjacent edges). As Figure 4 shown, marked as (shown as dashed lines); on the basis of the first merge, further expand the tolerance range to handle more complex fracture regions. The specific operations are as follows: According to the expanded tolerance, search for new mergable virtual edge pairs; perform hyperedge fusion operations to generate new hyperedges and superpoints; update the virtual topology structure to further narrow the global gap. Figure 5Among them, more adjacent boundaries are connected through super-edge merging, and the global gaps are gradually reduced to obtain new super-edges. The third free super-edge fusion: Continue to iteratively expand the tolerance and process the remaining free super-edges. The specific operations are as follows: According to the latest tolerance, search for and merge new virtual edge pairs; update the virtual topology structure to ensure that all mergable gaps are eliminated. Figure 6 Among them, most boundaries are connected through super-edge merging, and only a small number of gaps in complex regions remain to be processed. Perform the fourth free super-edge fusion to complete the last super-edge fusion operation and ensure that all gaps are eliminated. The specific operations are as follows: According to the maximum tolerance, search for and merge the remaining virtual edge pairs; update the virtual topology structure to ensure that all boundaries are completely connected without remaining gaps. Figure 7 Among them, all boundaries are seamlessly connected through super-edge merging, and the virtual topology structure is completely closed. From Figures 2 to 7 It fully demonstrates the process of starting from the fractured boundaries of the original CAD model, through the creation and iterative fusion of virtual topology (super-point → super-edge), gradually eliminating gaps and generating a closed and gapless virtual topology structure. The core of this process is to convert the fragmented original boundaries into a high-quality virtual topology model (topological relationship) that can be used for subsequent mesh generation through dynamic tolerance adjustment and automated operations.

[0089] Step S15: Stitch the discrete mesh data between the target virtual faces to obtain a repaired CAD model.

[0090] In this embodiment, the to-be-stitched discrete meshes on the two target virtual faces are determined to obtain a first to-be-stitched discrete mesh and a second to-be-stitched discrete mesh; a first set of grid points is constructed according to the first boundary grids on the adjacent edges of the first to-be-stitched discrete mesh and the second to-be-stitched discrete mesh; a second set of grid points is constructed according to the second boundary grids on the adjacent edges of the second to-be-stitched discrete mesh and the first to-be-stitched discrete mesh; the point-to-point distances between the grid point pairs in the first set of grid points and the second set of grid points are calculated, and the grid point pairs whose point-to-point distances meet the fusion tolerance condition are selected as target grid point pairs, and the target grid point pairs are sorted in ascending order according to the distance size to obtain a set of to-be-stitched point pairs; the target grid point pairs are subjected to triangle fusion in order from the set of to-be-stitched point pairs to obtain a repaired CAD model. It can be understood that the gaps that meet the stitching tolerance have been topologically erased, and then the discrete meshes between the patches need to be stitched. The specific stitching operations are as follows. Obtain the first to-be-stitched discrete mesh on the target virtual face , and obtain the second to-be-stitched discrete mesh on the virtual face . Obtain the and the set of boundary grid points on the adjacent edges , to obtain the first set of grid points. Similarly, obtain the set of boundary grid points on the adjacent side , to obtain the second set of grid points. Calculate the pair - wise distances between all grid points , and sort all target grid point pairs that satisfy in ascending order of the pair - wise distances to obtain the set of pairs of points to be stitched. Sequentially take out the target grid point pairs from the set of pairs of points to be stitched for triangle fusion operations to obtain the repaired CAD model; among them, the triangle fusion operation can specifically be edge splitting, edge collapsing, edge swapping, moving point operations, and no specific limitation is made thereto. Among them, after the above - mentioned fusion operations, the boundary grid points and the boundary grid point are fused to obtain point , and the schematic diagram of the first discrete grid boundary stitching formed is shown in Fig. 8(a); after the above - mentioned fusion operations, the boundary grid points and the boundary grid point are fused to obtain point , and after removing the relevant degenerate faces, it forms the second discrete grid boundary stitching schematic diagram with , as shown in Fig. 8(b); after the above - mentioned fusion operations, the boundary grid point is moved to the side where the boundary grid point and the boundary grid point are located, and the formed third discrete grid boundary stitching schematic diagram is shown in Fig. 8(c); after the above - mentioned fusion operations, the edge formed by the boundary grid point and the boundary grid point is deleted, thus forming the new edges where the fusion point and the boundary grid point , the fusion point and the boundary grid point are re - stitched, and the formed third discrete grid boundary stitching schematic diagram is shown in Fig. 8(d). For the CAD model of the aircraft wing, it can be known that in the repaired CAD model obtained after the gap repair, the tiny gaps between the wing surface patches (such as the upper / lower wing surfaces, wing tips, flaps, etc.) are completely eliminated, and the adjacent surface patches are seamlessly connected in terms of topological relationship. For example: the virtual edges of the upper and lower wing surfaces at the trailing edge of the wing are merged into a single super - edge, and the surface transition is smooth. The intersection line between the wing - tip surface and the main wing surface eliminates the position deviation through the virtual point fusion operation. During the repair process, the parametric calculation based on the virtual edge (such as calculating the nearest point by the dichotomy iteration method) ensures that the original geometric features of the wing surface (such as airfoil, sweep angle, twist angle) are not damaged, and at the same time improves the continuity at the joint of the surface patches. The grid points at the leading edge of the wing form a complete closed loop through the triangle fusion operation, ensuring no leakage during the air - flow simulation.

[0091] In this embodiment, it is checked whether there are gaps in the CAD model after inspection and repair. If so, the initial stitching tolerance is enlarged to obtain a new initial stitching tolerance, and the step of establishing a binary search tree based on all virtual edges is executed by jumping, so as to determine the target virtual edge where the gap is located by using the binary search tree and the initial stitching tolerance, until there are no gaps in the CAD model after repair. It can be understood that it is detected whether there are still gap problems in the currently repaired CAD model. If there are still gaps, the current initial stitching tolerance is enlarged by a factor of , and the default value of

[0092] is 10. The previous stitching steps are repeated until there are no gap problems in the repaired model.

[0093] In this way, after the above steps, the topological relationship between the surface patches in the model is reconstructed and the gap lapping problem is repaired. Subsequently, the subsequent surface mesh generation program will perform a dimensioned mesh regeneration operation based on the discrete meshes on each virtual surface, and the watertight mesh generation framework will use the entity geometry objects associated with the bottom layer of each virtual surface to correct the accuracy of the newly generated mesh points, so as to obtain a high-quality conformal watertight mesh.

[0094] It can be seen that the present application discloses a method for repairing gaps in a CAD model, including: importing an initial CAD model, and creating corresponding virtual surfaces, virtual edges, and virtual points for each digital model surface, digital model line, and digital model point of the initial CAD model; setting an initial stitching tolerance according to the diagonal length of the model bounding box and the average length of the virtual edges; wherein, the model bounding box is a bounding box established based on the discrete grid data of all virtual surfaces; establishing a binary search tree based on all virtual edges to determine the target virtual edge where the gap is located by using the binary search tree and the initial stitching tolerance, and performing a splitting operation on the target virtual edge to obtain updated virtual edges and updated virtual points; wherein, the root node of the binary search tree is a parent virtual edge bounding box containing all virtual edges, and the leaf nodes are child virtual edge bounding boxes of each virtual edge; respectively performing a fusion process on the updated virtual edges and the updated virtual points to reconstruct the topological relationship between the target virtual surfaces on both sides of the gap and update the discrete grid data on the target virtual surfaces; performing a stitching process on the discrete grid data between the target virtual surfaces to obtain a repaired CAD model. Thus, when determining the target virtual edge where the gap is located, by using the structural characteristics of the binary search tree, rapid positioning can be achieved, and compared with checking all virtual edges one by one, the search time is greatly reduced; respectively performing a fusion process on the updated virtual edges and the updated virtual points reconstructs the topological relationship between the target virtual surfaces on both sides of the gap, making the model more reasonable in topological structure; and the entire repair process, from importing the model, creating virtual objects, calculating tolerances to processing virtual edges and grid stitching and other operations, is automated, without a large amount of manual interaction, reducing the time cost of manual repair.

[0095] Referring to Figure 9 as shown, the present invention also correspondingly discloses a device for repairing gaps in a CAD model, including:

[0096] A virtual information creation module 11, configured to import an initial CAD model, and create corresponding virtual surfaces, virtual edges, and virtual points for each digital model surface, digital model line, and digital model point of the initial CAD model;

[0097] A stitching tolerance determination module 12, configured to set an initial stitching tolerance according to the diagonal length of the model bounding box and the average length of the virtual edges; wherein, the model bounding box is a bounding box established based on the discrete grid data of all virtual surfaces;

[0098] A virtual information update module 13, configured to establish a binary search tree based on all virtual edges to determine the target virtual edge where the gap is located by using the binary search tree and the initial stitching tolerance, and perform a splitting operation on the target virtual edge to obtain updated virtual edges and updated virtual points; wherein, the root node of the binary search tree is a parent virtual edge bounding box containing all virtual edges, and the leaf nodes are child virtual edge bounding boxes of each virtual edge;

[0099] The relationship reconstruction module 14 is configured to perform fusion processing on the updated virtual edges and the updated virtual points respectively, so as to reconstruct the topological relationship between the target virtual surfaces on both sides of the gap and update the discrete grid data on the target virtual surfaces;

[0100] The stitching module 15 is configured to perform stitching processing on the discrete grid data between the target virtual surfaces to obtain a repaired CAD model.

[0101] It can be seen that this application discloses importing an initial CAD model, and creating corresponding virtual surfaces, virtual edges, and virtual points for each digital model surface, digital model line, and digital model point of the initial CAD model; setting an initial stitching tolerance according to the diagonal length of the model bounding box and the average length of the virtual edges; wherein, the model bounding box is a bounding box established based on the discrete grid data of all virtual surfaces; establishing a binary search tree based on all virtual edges to use the binary search tree and the initial stitching tolerance to determine the target virtual edge where the gap is located, and performing a splitting operation on the target virtual edge to obtain updated virtual edges and updated virtual points; wherein, the root node of the binary search tree is a parent virtual edge bounding box containing all virtual edges, and the leaf nodes are child virtual edge bounding boxes of each virtual edge; performing fusion processing on the updated virtual edges and the updated virtual points respectively to reconstruct the topological relationship between the target virtual surfaces on both sides of the gap and update the discrete grid data on the target virtual surfaces; performing stitching processing on the discrete grid data between the target virtual surfaces to obtain a repaired CAD model. Thus, when determining the target virtual edge where the gap is located, by using the structural characteristics of the binary search tree, rapid positioning can be achieved, which greatly reduces the search time compared with checking all virtual edges one by one; performing fusion processing on the updated virtual edges and the updated virtual points respectively reconstructs the topological relationship between the target virtual surfaces on both sides of the gap, making the model more reasonable in topological structure; moreover, the entire repair process, from importing the model, creating virtual objects, calculating tolerances to processing virtual edges and grid stitching, etc., is automated, without a large amount of manual interaction, reducing the time cost of manual repair.

[0102] Furthermore, the embodiment of this application also discloses an electronic device Figure 10 It is a structural diagram of an electronic device 20 shown according to an exemplary embodiment, and the content in the figure cannot be regarded as any limitation on the scope of use of this application.

[0103] Figure 10Schematic diagram of the structure of an electronic device 20 provided by an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. Among them, the memory 22 is used to store a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the method for repairing the CAD model gap disclosed in any of the foregoing embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0104] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows is any communication protocol applicable to the technical solution of the present application, and no specific limitation is imposed thereon here; the input / output interface 25 is used to obtain external input data or output data to the outside, and its specific interface type can be selected according to specific application needs, and no specific limitation is made here.

[0105] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor used to process data in the wake state, also known as the CPU (Central Processing Unit); the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 21 may be integrated with a GPU (Graphics Processing Unit), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may further include an AI (Artificial Intelligence) processor, and the AI processor is used to process computational operations related to machine learning.

[0106] In addition, as a carrier for resource storage, the memory 22 may be a read-only memory, a random access memory, a disk, or an optical disc, etc. The resources stored thereon may include an operating system 221, a computer program 222, etc., and the storage method may be short-term storage or permanent storage.

[0107] Among them, the operating system 221 is used to manage and control each hardware device and computer program 222 on the electronic device 20, so as to implement the operation and processing of the massive data 223 in the memory 22 by the processor 21. It can be Windows Server, Netware, Unix, Linux, etc. In addition to the computer program that can be used to complete the CAD model gap repair method executed by the electronic device 20 disclosed in any of the foregoing embodiments, the computer program 222 can further include computer programs that can be used to complete other specific tasks. The data 223 can include not only the data transmitted by the external device received by the electronic device, but also the data collected by its own input / output interface 25, etc.

[0108] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the CAD model gap repair method disclosed above is implemented. For the specific steps of this method, reference can be made to the corresponding content disclosed in the foregoing embodiments, and details will not be repeated here.

[0109] In this specification, each embodiment is described in a progressive manner. The key point of each embodiment is to illustrate the differences from other embodiments. The same or similar parts among the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method part.

[0110] Those skilled in the art may further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application. The steps of the methods or algorithms described in combination with the embodiments disclosed herein can be directly implemented by hardware, software modules executed by a processor, or a combination of the two. The software modules can be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, removable disks, CD-ROM (Compact Disc-Read Only Memory), or any other form of storage medium known in the technical field.

[0111] Finally, it should also be noted that in this document, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the element.

[0112] The above has introduced the solution provided by the present invention in detail. Specific examples are used herein to elaborate on the principles and implementation manners of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to the present invention.

Claims

1. A method for repairing gaps in a CAD model, characterized in that, Including: Import the initial CAD model, and create corresponding virtual faces, virtual edges, and virtual points for each digital model face, digital model line, and digital model point of the initial CAD model; Set an initial stitching tolerance according to the diagonal length of the model bounding box and the average length of the virtual edges; wherein, the model bounding box is a bounding box established based on the discrete grid data of all virtual faces; Establish a binary search tree based on all virtual edges, use the binary search tree and the initial stitching tolerance to determine the target virtual edge where the gap is located, and perform a splitting operation on the target virtual edge to obtain updated virtual edges and updated virtual points; wherein, the root node of the binary search tree is the parent virtual edge bounding box containing all virtual edges, and the leaf nodes are the child virtual edge bounding boxes of each virtual edge; Perform fusion processing on the updated virtual edges and the updated virtual points respectively to reconstruct the topological relationship between the target virtual faces on both sides of the gap and update the discrete grid data on the target virtual faces; Perform stitching processing on the discrete grid data between the target virtual faces to obtain a repaired CAD model; Wherein, the performing stitching processing on the discrete grid data between the target virtual faces to obtain a repaired CAD model includes: Determine the discrete grids to be stitched on the two target virtual faces to obtain a first discrete grid to be stitched and a second discrete grid to be stitched; construct a first set of grid points according to the first boundary grids on the adjacent edges of the first discrete grid to be stitched and the second discrete grid to be stitched; construct a second set of grid points according to the second boundary grids on the adjacent edges of the second discrete grid to be stitched and the first discrete grid to be stitched; calculate the point-to-point distances between the grid point pairs in the first set of grid points and the second set of grid points, and screen the grid point pairs whose point-to-point distances meet the fusion tolerance condition as target grid point pairs, and arrange the target grid point pairs in ascending order of distance to obtain a set of points to be stitched; perform triangular fusion on each of the target grid point pairs in order from the set of points to be stitched to obtain a repaired CAD model.

2. The method for repairing the gap of the CAD model according to claim 1, wherein, The setting the initial stitching tolerance according to the diagonal length of the model bounding box and the average length of the virtual edges includes: Calculate the diagonal length of the model bounding box based on the diagonal vertex coordinate information of the model bounding box, and set a preset length threshold according to the diagonal length; If the average length of the virtual edges is less than the preset length threshold, set the initial stitching tolerance to the first initial stitching tolerance; If the average length of the virtual edges is greater than or equal to the preset length threshold, set the initial stitching tolerance to the second initial stitching tolerance.

3. The method for repairing the gap of the CAD model according to claim 1, wherein, The establishing a binary search tree based on all virtual edges, using the binary search tree and the initial stitching tolerance to determine the target virtual edge where the gap is located, and performing a splitting operation on the target virtual edge to obtain updated virtual edges and updated virtual points includes: Create a virtual point bounding box using the initial stitching tolerance and each virtual point, search for the first virtual edge bounding box intersecting with the virtual point bounding box in the binary search tree, and calculate the shortest distance between the virtual point in the virtual point bounding box and the first target virtual edge where the first virtual edge bounding box is located; When the shortest distance is less than the initial stitching tolerance, a splitting operation on the first target virtual edge is triggered to obtain an updated virtual edge and updated virtual points.

4. The method for repairing the gap of the CAD model according to claim 3, wherein The calculating of the shortest distance between the virtual points of the virtual point bounding box and the first target virtual edge where the first virtual edge bounding box is located includes: Dividing the first target virtual edge into several virtual edge segments, respectively calculating the target distances between the virtual points and the endpoints of each virtual edge segment, determining that the nearest point is located on the virtual edge segment corresponding to the minimum target distance, and determining the virtual edge segment corresponding to the minimum target distance as the target virtual edge segment; Performing iterative calculation on the target virtual edge segment through the binary iteration method to obtain the parameter value of the nearest point, so as to determine the coordinate information of the nearest point on the first target virtual edge; Calculating and determining the shortest distance by using the coordinate information of the virtual points and the coordinate information of the nearest point.

5. The method for repairing the gap of the CAD model according to claim 1, characterized in that, The respectively performing fusion processing on the updated virtual edge and the updated virtual points to reconstruct the topological relationship between the target virtual surfaces on both sides of the gap and update the discrete grid data on the target virtual surfaces includes: Setting the updated virtual edge as the center of the bounding box and the initial stitching tolerance as the size of the bounding box, and creating a second virtual edge bounding box for each updated virtual edge; Searching in the binary search tree for a third virtual edge bounding box that intersects with the second virtual edge bounding box, and calculating the edge distance between the updated virtual edge and the second target virtual edge where the third virtual edge bounding box is located; If the edge distance is less than the initial stitching tolerance, merging the updated virtual edge and the second target virtual edge to obtain a super edge; Merging each updated virtual point according to the edge merging operation of the updated virtual edge to obtain a super point; Reconstructing the topological relationship between the target virtual surfaces on both sides of the gap and updating the discrete grid data on the target virtual surfaces based on the super edge and the super point.

6. The method for repairing the gap of the CAD model according to any one of claims 1 to 5, characterized in that It further includes: Checking whether there is a gap in the repaired CAD model. If so, performing an enlargement process on the initial stitching tolerance to obtain a new initial stitching tolerance, and jumping to execute the step of establishing a binary search tree based on all virtual edges to determine the target virtual edge where the gap is located by using the binary search tree and the initial stitching tolerance, until there is no gap in the repaired CAD model.

7. A repair device for CAD model gaps, characterized in that, It includes: A virtual information creation module, configured to import an initial CAD model, and create corresponding virtual surfaces, virtual edges, and virtual points for each digital model surface, digital model line, and digital model point of the initial CAD model; A stitching tolerance determination module, configured to set an initial stitching tolerance according to the diagonal length of the model bounding box and the average length of the virtual edges; wherein, the model bounding box is a bounding box established based on the discrete grid data of all virtual surfaces; A virtual information update module, configured to establish a binary search tree based on all virtual edges, to determine the target virtual edge where the gap is located by using the binary search tree and the initial stitching tolerance, and perform a splitting operation on the target virtual edge to obtain an updated virtual edge and updated virtual points; wherein, the root node of the binary search tree is a parent virtual edge bounding box containing all virtual edges, and the leaf nodes are child virtual edge bounding boxes of each virtual edge. A relationship reconstruction module for respectively performing fusion processing on the updated virtual edges and the updated virtual points to reconstruct the topological relationship between the target virtual surfaces on both sides of the gap and update the discrete grid data on the target virtual surfaces; A stitching module for stitching the discrete grid data between the target virtual surfaces to obtain a repaired CAD model; Specifically, the stitching module is configured to determine the discrete grids to be stitched on two target virtual surfaces to obtain a first discrete grid to be stitched and a second discrete grid to be stitched; construct a first set of grid points according to the first boundary grids on the adjacent edges of the first discrete grid to be stitched and the second discrete grid to be stitched; construct a second set of grid points according to the second boundary grids on the adjacent edges of the second discrete grid to be stitched and the first discrete grid to be stitched; calculate the point-to-point distances between the grid point pairs in the first set of grid points and the second set of grid points, and filter the grid point pairs whose point-to-point distances meet the fusion tolerance condition as target grid point pairs, so as to arrange the target grid point pairs in ascending order of distance to obtain a set of points to be stitched; perform triangular fusion on each of the target grid point pairs in order from the set of points to be stitched to obtain a repaired CAD model.

8. An electronic device, characterized in that, Comprising: A memory for storing a computer program; A processor for executing the computer program to implement the steps of the method for repairing the gap of the CAD model according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, For storing a computer program; wherein, when the computer program is executed by the processor, the steps of the method for repairing the gap of the CAD model according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Broadband automatic winding near-net forming method for large convex-concave curved surface fusion special-shaped cabin

    CN115593607A

  • Curved surface grid generation method and device, equipment and storage medium

    CN116720234A