Method, device and equipment for repairing CAD (Computer Aided Design) model gap and medium

By creating virtual faces, virtual edges and virtual points in the CAD model, using binary search trees and initial suture tolerances to determine the virtual edge of the gap target, and performing segmentation, fusion and grid suture processing, the problems of low gap repair accuracy, low efficiency and relying on manual operation in the CAD model in the existing technology are solved, and automated, efficient and high-precision repair effects are achieved.

CN120105512AActive Publication Date: 2025-06-06CALCULATION AERODYNAMICS INST CHINA AERODYNAMICS RES & DEV CENT
View PDF 3 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

When repairing gaps in the CAD model, the prior art has problems such as low accuracy, repaired surface discontinuity, sharp increase in node vectors, low resolution efficiency, and relying on user manual operations, resulting in low efficiency and error-prone problems.

Method used

By importing the initial CAD model, create virtual faces, virtual edges and virtual points, determine the gap target virtual edges based on the binary search tree and the initial suture tolerance, perform segmentation operations, fuse processing of updated virtual edges and virtual points, reconstruct the topological relationship, and perform grid stitching to obtain the patched CAD model.

Benefits of technology

It realizes automatic, high-speed and high-precision CAD model gap repair, reduces the time cost of manual repair, improves repair efficiency and accuracy, and ensures the reasonable topology of the repaired model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120105512A_ABST
    Figure CN120105512A_ABST
Patent Text Reader

Abstract

The invention discloses a CAD model gap repairing method, device and equipment and a medium, and relates to the technical field of computer aided design, and the method comprises the steps: importing an initial CAD model, and creating corresponding virtual surfaces, virtual edges and virtual points for each digital-analog surface, digital-analog line and digital-analog 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 virtual edges; establishing a binary search tree based on all virtual edges, determining a target virtual edge where the gap is located by using the binary search tree and the initial stitching tolerance, and performing segmentation operation on the target virtual edge to obtain an updated virtual edge and an updated virtual point; respectively carrying out fusion processing on the updated virtual edges and the updated virtual points, reconstructing a topological relation between the target virtual surfaces on the two sides of the gap, and updating discrete grid data on the target virtual surfaces; and performing stitching processing on discrete grid data between the target virtual surfaces to obtain a repaired CAD model. And the seam of the CAD model is automatically and efficiently sewn.
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 in particular to a method, device, equipment and medium for repairing gaps in a CAD model. Background Art

[0002] The geometric shape of the CAD (Computer Aided Design) model of the body panel is relatively complex. Large models are often composed of thousands of B-spline surfaces, resulting in small gaps between the surface pieces. At present, the repair of CAD models can be divided into two main ways: one is grid-based data repair. This method first generates finite element meshes for the CAD model, and then eliminates the erroneous mesh data through mesh recognition, node merging and other processing methods, and finally generates a legal watertight mesh model; the other is geometric model-based data repair. This method directly targets the CAD geometric model and repairs the geometric or topological errors. The grid-based repair has the problem of low precision, while the geometric model-based repair has the problem that the repaired surface cannot meet the continuity requirements. In addition, this type of algorithm involves the calculation of unified node vectors, which will cause the node vectors to increase sharply, resulting in too many control vertices on the surface, and ultimately leading to low solution efficiency. In addition, this type of method relies on manual operation by users to repair large and complex models, which is inefficient and prone to errors. 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 gaps in a CAD model. The specific scheme is as follows:

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

[0005] Importing an initial CAD model, and creating 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;

[0006] An initial stitching tolerance is set according to the diagonal length of the model bounding box and the average length of the virtual edge; wherein the model bounding box is a bounding box established based on discrete grid data of all virtual faces;

[0007] A binary search tree is established based on all virtual edges, so as to determine the target virtual edge where the gap is located by using the binary search tree and the initial stitching tolerance, and a segmentation operation is performed on the target virtual edge to obtain an updated virtual edge and an updated virtual point; 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] The updated virtual edges and the updated virtual points are respectively fused 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] The discrete grid data between the target virtual surfaces are stitched to obtain a repaired CAD model.

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

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

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

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

[0014] Optionally, the step of establishing a binary search tree based on all virtual edges, determining a target virtual edge where a gap is located by using the binary search tree and the initial stitching tolerance, and performing a segmentation operation on the target virtual edge to obtain an updated virtual edge and an updated virtual point comprises:

[0015] Using the initial stitching tolerance and each virtual point to create a virtual point bounding box, searching the binary search tree for a first virtual edge bounding box intersecting with the virtual point bounding box, so as to calculate the shortest distance between the virtual point of the virtual point bounding box and the first target virtual edge where the first virtual edge bounding box is located;

[0016] When the closest distance is less than the initial stitching tolerance, a segmentation operation on the first target virtual edge is triggered to obtain an updated virtual edge and an updated virtual point.

[0017] Optionally, calculating the shortest distance between the virtual point 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 a plurality of virtual edge segments, calculate the target distances between the virtual point and the endpoints of each virtual edge segment, determine that the closest 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] Iteratively calculating the target virtual edge segment by a binary iteration method to obtain a parameter value of the closest point, so as to determine coordinate information of the closest point on the first target virtual edge;

[0020] The coordinate information of the virtual point and the coordinate information of the nearest point are used to calculate and determine the shortest distance.

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

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

[0023] Searching the binary search tree for a third virtual edge bounding box that intersects with the second virtual edge bounding box, and calculating an 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, merging the updated virtual edge with the second target virtual edge to obtain a super edge;

[0025] Merging the updated virtual points according to the edge merging operation of the updated virtual edges to obtain a super point;

[0026] The topological relationship between the target virtual surfaces on both sides of the gap is reconstructed based on the superedge and the superpoint, and the discrete grid data on the target virtual surface is updated.

[0027] Optionally, the step of stitching the discrete mesh data between the target virtual surfaces to obtain a repaired 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] Constructing a first grid point set according to a first boundary grid on adjacent edges of the first discrete grid to be stitched and the second discrete grid to be stitched;

[0030] Constructing a second grid point set according to a second boundary grid on adjacent edges of the second discrete grid to be stitched and the first discrete grid to be stitched;

[0031] Calculating the point pair distances of the grid point pairs between the first grid point set and the second grid point set, and selecting the grid point pairs whose point pair distances satisfy the fusion tolerance condition as target grid point pairs, so as to arrange the target grid point pairs in increasing order of distance, and obtain a set of point pairs to be stitched;

[0032] The target grid point pairs are sequentially triangle-fused from the set of point pairs to be stitched to obtain a repaired CAD model.

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

[0034] Check whether there are gaps in the repaired CAD model. If so, expand the initial stitching tolerance to obtain a new initial stitching tolerance, and jump to the step of 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 until there are no gaps in the repaired CAD model.

[0035] In a second aspect, the present application discloses a device for repairing gaps in a CAD model, comprising:

[0036] A virtual information creation module is used to 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;

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

[0038] A virtual information updating module is used 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 to perform a segmentation operation on the target virtual edge to obtain an updated virtual edge and an updated virtual point; 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, used for fusing 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;

[0040] The stitching module is used to stitch the discrete grid data between the target virtual surfaces to obtain a repaired CAD model.

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

[0042] Memory, used to store computer programs;

[0043] The processor is used to execute the computer program to implement the steps of the aforementioned method for repairing a gap in a CAD model.

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

[0045] It can be seen that the present application discloses a method for repairing gaps in a CAD model, comprising: importing an initial CAD model, and creating 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; setting an initial stitching tolerance according to the diagonal length of the model bounding box and the average length of the virtual edge; wherein the model bounding box is a bounding box established based on discrete grid data of all virtual faces; establishing a binary search tree based on all virtual edges, so as 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 segmentation operation on the target virtual edge to obtain an updated virtual edge and an updated virtual point; 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 fusion processing on the updated virtual edges and the updated virtual points 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; stitching processing is performed on the discrete grid data between the target virtual faces to obtain a repaired CAD model. It can be seen that when determining the target virtual edge where the gap is located, the structural characteristics of the binary search tree can be used to quickly locate it, which greatly reduces the search time compared to checking all virtual edges one by one; the updated virtual edges and updated virtual points are fused separately, and the topological relationship between the target virtual surfaces on both sides of the gap is reconstructed, 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 mesh stitching, is automated, without the need for a lot of manual interaction, reducing the time cost of manual repair. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0047] Figure 1 A flow chart of a method for repairing a gap in a CAD model disclosed in the present application;

[0048] Figure 2 A schematic diagram of the actual geometric boundary of a CAD model disclosed in this application;

[0049] Figure 3 A schematic diagram of super-point merging of a CAD model disclosed in this application;

[0050] Figure 4 A schematic diagram of the first hyper-edge fusion of a CAD model disclosed in this application;

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

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

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

[0054] FIG8( a ) is a schematic diagram of stitching a first discrete grid boundary of a gap in a CAD model disclosed in the present application;

[0055] FIG8( b ) is a schematic diagram of stitching a second discrete grid boundary of a CAD model gap disclosed in the present application;

[0056] FIG8( c ) is a schematic diagram of a third discrete grid boundary stitching of another CAD model gap disclosed in the present application;

[0057] FIG8( d ) is a schematic diagram of a fourth discrete grid boundary stitching of another CAD model gap disclosed in the present application;

[0058] Fig. 9 A schematic diagram of the structure of a CAD model gap repair device disclosed in this application;

[0059] Fig.10 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION

[0060] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0061] Digital models with complex geometric shapes such as airplanes and cars are often composed of thousands of B-spline surfaces, resulting in tiny gaps between the surface pieces. The existence of such problems will make it difficult to further process the CAD data, such as automatic generation of finite element meshes, die surface process design, etc. Therefore, repairing the gap problem in the CAD model is a necessary and important task.

[0062] The geometric shape of the CAD model of the body panel is relatively complex. Large models are often composed of thousands of B-spline surfaces, resulting in small gaps between the surface pieces. At present, the repair of CAD models can be divided into two main ways: one is grid-based data repair. This method first generates finite element meshes for the CAD model, and then eliminates the erroneous mesh data through mesh recognition, node merging and other processing methods, and finally generates a legal watertight mesh model; the other is geometric model-based data repair. This method directly targets the CAD geometric model and repairs the geometric or topological errors. The grid-based repair has the problem of low precision, while the geometric model-based repair has the problem that the repaired surface cannot meet the continuity requirements. In addition, this type of algorithm involves the calculation of unified node vectors, which will cause the node vectors to increase sharply, resulting in too many control vertices on the surface, and ultimately leading to low solution efficiency. In addition, this type of method relies on manual operation by users to repair large and complex models, which is inefficient and prone to errors.

[0063] To this end, the present invention provides a solution for repairing gaps in a CAD model, which can automatically, efficiently and accurately repair gaps in the CAD model.

[0064] Reference Figure 1 As shown, an embodiment of the present invention discloses a method for repairing a gap in a CAD model, comprising:

[0065] Step S11: importing the initial CAD model, and creating 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.

[0066] In this embodiment, the initial CAD model for numerical simulation is first imported, wherein the numerical source can be actual parameters of the parts such as part size and shape, wherein the parts can be mechanical parts in different fields, such as parts with complex curved surfaces such as automobile body parts and aircraft shells, which are not specifically limited. After importing and obtaining the initial CAD model, a watertight grid generation framework is used to create corresponding virtual surface objects, virtual edge objects and virtual point objects for each digital model surface, digital model line and digital model point of the initial CAD model. For example: when the numerical simulation scene is specifically a CAD simulation scene of an aircraft wing, the initial CAD model is an initial aircraft wing CAD model obtained by numerically simulating the actual parameters of the wing of the aircraft wing after the wing is imported. Among them, the actual parameters of the wing include: the span, chord length, sweep angle and airfoil parameters of the wing. Corresponding virtual surfaces, virtual edges and virtual points are created for each digital model surface, digital model line and digital model point of the 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 tip, etc. The created bounding box should accurately cover the area where gaps may exist, and the virtual edge is a virtual mapping of the actual wing surface in the initial aircraft wing CAD model (such as upper and lower wing surfaces, leading edge, trailing edge, wing tip transition surface, etc.). Each virtual surface corresponds to a physical surface patch, which is used 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 surfaces, for example: the boundary line between the upper and lower wing surfaces (the trailing edge of the wing). The connecting line between the wing tip surface and the main wing surface. The transition boundary where the wing and the fuselage are connected.

[0067] Step S12: 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 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, so as to set a preset length threshold according to the diagonal length; if the average length of the virtual edge is less than the preset length threshold, the initial stitching tolerance is set to the first initial stitching tolerance; if the average length of the virtual edge is greater than or equal to the preset length threshold, the initial stitching tolerance is set to the second initial stitching tolerance. It can be understood that the discrete grid data of all virtual faces in the CAD model is used to establish a bounding box containing the entire model. If the CAD model is an aircraft wing CAD model, then the bounding box is the smallest cuboid containing the entire aircraft wing model, which can define the scope of the model in three-dimensional space. The diagonal length of the current model bounding box is calculated using the diagonal vertex coordinates of the model bounding box. , then take As the preset length threshold, calculate the average length of the virtual edges in the current model. .if , then 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 simulation. For example, for high-precision wing aerodynamic simulation, the tolerance needs to be set smaller.

[0069] Step S13: 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 split operation on the target virtual edge to obtain an updated virtual edge and an updated virtual point; 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.

[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 tree, the large bounding box is continuously divided using a plane perpendicular to the coordinate axis until each small space contains only one virtual edge bounding box, i.e., a leaf node, and a tree of virtual edge objects is created. The bounding box of The algorithm is as follows:

[0071] ;

[0072] in, Virtual edge All points The minimum x-axis coordinate of Virtual edge All points The minimum y-axis coordinate of Virtual edge All points The minimum z-axis coordinate of Virtual edge All points The maximum x-axis coordinate of Virtual edge All points The maximum value of the y-axis coordinate, The top represents a virtual edge All points The maximum z-axis coordinate of .

[0073] In this way, by calculating the coordinate extreme values ​​of all points on the virtual edge, the bounding box is finally determined The spatial scope is used to realize the geometric definition of the virtual edge.

[0074] In this embodiment, a virtual point bounding box is created using the initial stitching tolerance and each virtual point, and the first virtual edge bounding box that intersects with the virtual point bounding box is searched from the binary search tree to calculate the closest distance between the virtual point 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, the splitting operation of the first target virtual edge is triggered to obtain the updated virtual edge and the updated virtual point. It can be understood that all virtual points are traversed, and a virtual point bounding box with the three-dimensional coordinates of the virtual point as the body center is created according to the second initial stitching tolerance or the first initial stitching tolerance (which stitching tolerance is specifically selected needs to be determined based on the previous calculation results). . Search in a binary tree with The intersecting virtual bounding boxes obtain the first virtual bounding box.

[0075] In this embodiment, the first target virtual edge is divided into several virtual edge segments, and the target distance between the virtual point and the endpoint of each virtual edge segment is calculated respectively, and the nearest point is determined to be 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 nearest point to determine the coordinate information of the nearest point on the first target virtual edge; the coordinate information of the virtual point and the coordinate information of the nearest point are used to calculate and determine the nearest distance. It can be understood that the nearest point to the first target virtual edge where the first virtual edge bounding box is located is calculated. The nearest point is calculated by the following formula: The first target virtual edge is divided into Segment, calculate the initial interval where the nearest point is located , that is, determine the target virtual edge segment where the nearest point is located, and then use the bisection iteration method to accurately calculate the parameter value of the nearest point.

[0076] Furthermore, if the shortest distance from the virtual point to the virtual edge satisfies the first initial stitching tolerance or the second initial stitching tolerance, the first target virtual edge splitting operation is performed to virtually split the first target virtual edge into two new virtual edge objects, and generate a new virtual point object to obtain an updated virtual edge and an updated virtual point.

[0077] Step S14: 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.

[0078] In this embodiment, the updated virtual edge is set as the center of the bounding box, the initial stitching tolerance is the bounding box size, and a second virtual edge bounding box is created for each updated virtual edge; a third virtual edge bounding box that intersects 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 is merged with the second target virtual edge to obtain a hyperedge; each updated virtual point is merged according to the edge merging operation of the updated virtual edge to obtain a superpoint; based on the hyperedge and the superpoint, the topological relationship between the target virtual surfaces on both sides of the gap is reconstructed and the discrete mesh data on the target virtual surface is updated. It can be understood that all updated virtual edges are traversed, and each updated virtual edge is created according to the initial stitching tolerance. The second virtual bounding box :

[0079] ;

[0080] Further, search the binary tree for the second virtual edge bounding box The intersecting virtual edge bounding box is used as the third virtual edge bounding box, and then the second target virtual edge where the third virtual edge bounding box is located is calculated The updated virtual edge where the second virtual edge bounding box is located Edge distance between two imaginary edges:

[0081] ;

[0082] in, Is the updated virtual edge The point on is the second target virtual edge If the calculated edge distance is less than the initial stitching tolerance , then the two virtual edges are merged into a hyperedge. A hyperedge is a type of edge object in a superset. A superset is a virtual entity that refers to two or more real entities. For example, the merged surface of two surfaces is called a hypersurface, the merged edge of two edges is called a hyperedge, and the merged edge of two virtual points is called a superpoint.

[0083] Furthermore, in order to prevent the generated mesh from being incomplete at the intersection of the digital and analog surfaces, the principles for handling super points during hyperedge fusion are as follows:

[0084] When a superpoint is already associated with a virtual superpoint, no virtual superpoint is generated and a replacement operation is performed;

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

[0086] When there are virtual super points that need to be merged, a virtual super point is obtained after fusion, and other virtual super points are randomly deleted. Finally, the obtained virtual super point is associated with the corresponding super point.

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

[0088] like Figure 2 As shown, Figure 2 is the actual geometric boundary of the original CAD model, where Figure 2 The boundary of a surface is composed of multiple surface patches, but due to modeling errors or data conversion problems, there are gaps between the surface patches that are broken, overlapped, or misaligned. Figure 2 The initial boundary of the surface is manifested as multiple discontinuous line segments or curves, with obvious gaps or misalignments between adjacent boundaries. In order to deal with the gap problem between surface patches, all boundary endpoints are first traversed, corresponding virtual points are created, and shared or close endpoints in adjacent boundaries are identified and marked as superpoint candidates (for example, endpoints of two boundaries that should be geometrically connected but are not aligned). Figure 3 In the process, the initial virtual topology begins to form, and superpoints are marked at key connections on the boundary (such as shared endpoints of adjacent edges). Figure 3 As shown, marked , , , , and then perform the first fusion of free hyperedges. Free hyperedges refer to virtual edges that have not been completely merged. Generally, the tolerance does not meet the initial stitching tolerance or the boundary topology is not closed and they exist temporarily independently. Among them, the specific operation of the first fusion is: search for endpoint pairs with a distance less than the tolerance among adjacent virtual edges, merge the virtual edges that meet the conditions into hyperedges, generate corresponding superpoints, update the virtual topology structure, and eliminate local gaps. Figure 4 In the example, some adjacent boundaries are connected by merging hyperedges, and the gaps in local areas are eliminated. The new hyperedge is obtained. (shown by the dotted line); based on the first merge, the tolerance range is further expanded to handle more complex fracture areas. The specific operations are as follows: according to the expanded tolerance, search for new merging virtual edge pairs; perform hyperedge fusion operations to generate new hyperedges and hyperpoints; update the virtual topology structure to further narrow the global gap. Figure 5In the process, more adjacent boundaries are connected by merging hyperedges, and the global gap is gradually reduced to obtain new hyperedges. The third fusion of free hyperedges: Continue to iteratively expand the tolerance and process the remaining free hyperedges. The specific operations are as follows: Search and merge new virtual edge pairs according to the latest tolerance; Update the virtual topology structure to ensure that all mergeable gaps are eliminated. Figure 6 In the example, most of the boundaries are connected by merging hyperedges, leaving only a few gaps in complex areas to be processed. The fourth fusion of free hyperedges is performed to complete the last hyperedge fusion operation to ensure that all gaps are eliminated. The specific operations are as follows: search and merge the remaining virtual edge pairs according to the maximum tolerance; update the virtual topology structure to ensure that all boundaries are connected completely and no gaps remain. Figure 7 In the example, all boundaries are seamlessly connected through hyperedge merging, and the virtual topology is completely closed. Figures 2 to 7 The complete demonstration of the process of starting from the fractured boundary 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, seamless virtual topology structure. The core of this process is to convert the fragmented original boundary into a high-quality virtual topology model (topological relationship) that can be used for subsequent mesh generation through dynamic tolerance adjustment and automated operation.

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

[0090] In this embodiment, the discrete meshes to be stitched on the two target virtual surfaces are determined to obtain a first discrete mesh to be stitched and a second discrete mesh to be stitched; a first grid point set is constructed based on the first boundary mesh on the adjacent edges of the first discrete mesh to be stitched and the second discrete mesh to be stitched; a second grid point set is constructed based on the second boundary mesh on the adjacent edges of the second discrete mesh to be stitched and the first discrete mesh to be stitched; the point pair distance between the first grid point set and the second grid point set is calculated, and the grid point pairs whose point pair distances meet the fusion tolerance conditions are selected as target grid point pairs, so as to arrange the target grid point pairs in increasing order of distance to obtain a set of point pairs to be stitched; triangles are sequentially fused for each of the target grid point pairs in the set of point pairs to be stitched 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 facets need to be stitched. The specific stitching operation is as follows. Get the target virtual surface The first discrete grid to be stitched on , get the virtual surface The second discrete grid to be stitched on Get and The set of boundary grid points on adjacent edges , to get the first grid point set, and similarly get and The set of boundary grid points on adjacent edges , to obtain the second grid point set. Calculate all grid point pairs The point-to-point distance between them is arranged in increasing order according to the point-to-point distance. The target grid point pairs are taken from the set of points to be stitched, and the set of points to be stitched is obtained. The target grid point pairs are taken out in turn from the set of points to be stitched, and the triangle fusion operation is performed to obtain the repaired CAD model; wherein the triangle fusion operation can be edge splitting, edge collapse, edge exchange, and moving point operation, which are not specifically limited to this, wherein the boundary grid points are obtained after the above fusion operation. With boundary grid points After fusion, we get The schematic diagram of the first discrete grid boundary stitching formed after the fusion operation is shown in Figure 8 (a). After the above fusion operation, the boundary grid points are obtained respectively. With boundary grid points After fusion, we get After removing the relevant degenerate surfaces, The schematic diagram of the second discrete grid boundary stitching is shown in Figure 8 (b); after the above fusion operation, the boundary grid points Move to boundary grid point With boundary grid points The schematic diagram of the third discrete grid boundary stitching formed after the edge is located is shown in Figure 8 (c); after the above fusion operation, the boundary grid points With boundary grid points The formed edges are deleted, thus forming a fusion point With boundary grid points , Fusion Point With boundary grid points The schematic diagram of the third discrete mesh boundary stitching formed after the new edges are stitched again is shown in Figure 8 (d). For the aircraft wing CAD model, it can be seen that the tiny gaps between the wing surface pieces (such as upper / lower wing surfaces, wing tips, flaps, etc.) in the repaired CAD model obtained after the gap repair are completely eliminated, and the adjacent surface pieces are seamlessly connected in 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 super edge, and the surface transition is smooth. The boundary line between the wing tip surface and the main wing surface is eliminated by the virtual point fusion operation to eliminate the position deviation. During the repair process, the parameterized calculation based on the virtual edge (such as the calculation of the nearest point by the binary iteration method) ensures that the original geometric features of the wing surface (such as the airfoil, sweep angle, and twist angle) are not destroyed, and at the same time improves the continuity of the surface piece splicing. The grid points at the leading edge of the wing form a complete closed loop through the triangle fusion operation to ensure that there is no leakage during airflow simulation.

[0091] In this embodiment, it is checked whether there is a gap in the repaired CAD model. If so, the initial stitching tolerance is expanded to obtain a new initial stitching tolerance, and 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 is executed until there is no gap in the repaired CAD model. It can be understood that it is checked whether there is still a gap problem in the current repaired CAD model. If there is still a gap, the current initial stitching tolerance is expanded. times, The default value is 10. Repeat the previous stitching steps until there are no gaps in the repaired model.

[0092] In this way, after the above steps, the topological relationship between the surface patches in the model is reconstructed and the gap overlap problem is repaired. The subsequent surface mesh generation program will perform a mesh regeneration operation with size based on the discrete mesh on each virtual surface, and the watertight mesh generation framework will use the solid geometric objects associated with the underlying layer of each virtual surface to correct the accuracy of the newly generated mesh points, thereby obtaining a high-quality shape-preserving watertight mesh.

[0093] It can be seen that this solution has the advantages of high efficiency based on the grid processing algorithm and high precision based on the solid geometry processing algorithm. In addition, the operation process of the present invention is fully automated, avoiding the problem that the traditional repair method is highly dependent on manual operation by the user, which is inefficient and prone to errors. Various unstructured surface grid generation algorithms can be used to generate high-quality grids that meet the needs of numerical calculations on the model repaired by this method, which has important engineering practical significance.

[0094] It can be seen that the present application discloses a method for repairing gaps in a CAD model, comprising: importing an initial CAD model, and creating 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; setting an initial stitching tolerance according to the diagonal length of the model bounding box and the average length of the virtual edge; wherein the model bounding box is a bounding box established based on discrete grid data of all virtual faces; establishing a binary search tree based on all virtual edges, so as 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 segmentation operation on the target virtual edge to obtain an updated virtual edge and an updated virtual point; 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 fusion processing on the updated virtual edges and the updated virtual points 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; stitching processing is performed on the discrete grid data between the target virtual faces to obtain a repaired CAD model. It can be seen that when determining the target virtual edge where the gap is located, the structural characteristics of the binary search tree can be used to quickly locate it, which greatly reduces the search time compared to checking all virtual edges one by one; the updated virtual edges and updated virtual points are fused separately, and the topological relationship between the target virtual surfaces on both sides of the gap is reconstructed, 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 mesh stitching, is automated, without the need for a lot of manual interaction, reducing the time cost of manual repair.

[0095] Reference Fig. 9 As shown, the present invention also discloses a CAD model gap repair device, comprising:

[0096] The virtual information creation module 11 is used to 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;

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

[0098] The virtual information updating module 13 is used 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 to perform a segmentation operation on the target virtual edge to obtain an updated virtual edge and an updated virtual point; 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] A relationship reconstruction module 14 is used 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 used to stitch the discrete grid data between the target virtual surfaces to obtain a repaired CAD model.

[0101] It can be seen that the present application discloses importing an initial CAD model, and creating 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; setting an initial stitching tolerance according to the diagonal length of the model bounding box and the average length of the virtual edge; wherein the model bounding box is a bounding box established based on the discrete grid data of all virtual faces; establishing a binary search tree based on all virtual edges, so as 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 segmentation operation on the target virtual edge to obtain an updated virtual edge and an updated virtual point; 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; the updated virtual edges and the updated virtual points are respectively fused 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; the discrete grid data between the target virtual faces are stitched to obtain a repaired CAD model. It can be seen that when determining the target virtual edge where the gap is located, the structural characteristics of the binary search tree can be used to quickly locate it, which greatly reduces the search time compared to checking all virtual edges one by one; the updated virtual edges and updated virtual points are fused separately, and the topological relationship between the target virtual surfaces on both sides of the gap is reconstructed, 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 mesh stitching, is automated, without the need for a lot of manual interaction, reducing the time cost of manual repair.

[0102] Furthermore, the present application also discloses an electronic device. Fig.10 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be regarded as any limitation on the scope of use of the present application.

[0103] Fig.10The present invention provides a schematic diagram of the structure of an electronic device 20 provided in 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. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the method for repairing a gap in a CAD model disclosed in any of the aforementioned 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 the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited 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 can be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 21 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

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

[0107] Among them, the operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20, so as to realize the operation and processing of the massive data 223 in the memory 22 by the processor 21, which can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the CAD model gap repair method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks. In addition to data received by the electronic device and transmitted from an external device, the data 223 can also include data collected by its own input and 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 aforementioned disclosed method for repairing a gap in a CAD model is implemented. The specific steps of the method can be referred to the corresponding contents disclosed in the aforementioned embodiments, and will not be described in detail here.

[0109] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between 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 method part.

[0110] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application. The steps of the method or algorithm described in conjunction with the embodiments disclosed herein can be implemented directly with hardware, a software module executed by a processor, or a combination of the two. The software module can be placed in a random access memory RAM (Random Access Memory), memory, read-only memory ROM (Read Only Memory), electrically programmable EPROM (Electrically Programmable Read Only Memory), electrically erasable programmable EEPROM (ElectricErasable Programmable Read Only Memory), register, hard disk, removable disk, CD-ROM (CompactDisc-Read Only Memory), or any other form of storage medium known in the technical field.

[0111] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0112] The scheme provided by the present invention is introduced in detail above. Specific examples are used in this article to illustrate the principle and implementation mode of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation mode and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A method for repairing gaps in a CAD model, characterized in that: include: Importing an initial CAD model, and creating 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; An initial stitching tolerance is set according to the diagonal length of the model bounding box and the average length of the virtual edge; wherein the model bounding box is a bounding box established based on discrete grid data of all virtual faces; A binary search tree is established based on all virtual edges, so as to determine the target virtual edge where the gap is located by using the binary search tree and the initial stitching tolerance, and a segmentation operation is performed on the target virtual edge to obtain an updated virtual edge and an updated virtual point; 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; The updated virtual edges and the updated virtual points are respectively fused 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; The discrete grid data between the target virtual surfaces are stitched to obtain a repaired CAD model.

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

3. The method for repairing a gap in a CAD model according to claim 1, characterized in that: The step of establishing a binary search tree based on all virtual edges, determining a target virtual edge where a gap is located by using the binary search tree and the initial stitching tolerance, and performing a segmentation operation on the target virtual edge to obtain an updated virtual edge and an updated virtual point comprises: Using the initial stitching tolerance and each virtual point to create a virtual point bounding box, searching the binary search tree for a first virtual edge bounding box intersecting with the virtual point bounding box, so as to calculate the shortest distance between the virtual point 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 segmentation operation on the first target virtual edge is triggered to obtain an updated virtual edge and an updated virtual point.

4. The method for repairing a gap in a CAD model according to claim 3, characterized in that: The calculating the shortest distance between the virtual point of the virtual point bounding box and the first target virtual edge where the first virtual edge bounding box is located includes: Divide the first target virtual edge into a plurality of virtual edge segments, calculate the target distances between the virtual point and the endpoints of each virtual edge segment, determine that the closest 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; Iteratively calculating the target virtual edge segment by a binary iteration method to obtain a parameter value of the closest point, so as to determine coordinate information of the closest point on the first target virtual edge; The coordinate information of the virtual point and the coordinate information of the nearest point are used to calculate and determine the shortest distance.

5. The method for repairing a gap in a CAD model according to claim 1, characterized in that: The step of fusing 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 includes: Set the updated virtual edge as the center of the bounding box, the initial stitching tolerance as the bounding box size, and create a second virtual edge bounding box for each of the updated virtual edges; Searching the binary search tree for a third virtual edge bounding box that intersects with the second virtual edge bounding box, and calculating an 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 with the second target virtual edge to obtain a super edge; Merging the updated virtual points according to the edge merging operation of the updated virtual edges to obtain a super point; The topological relationship between the target virtual surfaces on both sides of the gap is reconstructed based on the superedge and the superpoint, and the discrete grid data on the target virtual surface is updated.

6. The method for repairing a gap in a CAD model according to claim 1, characterized in that: The stitching process of the discrete mesh data between the target virtual surfaces to obtain a repaired CAD model includes: 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; Constructing a first grid point set according to a first boundary grid on adjacent edges of the first discrete grid to be stitched and the second discrete grid to be stitched; Constructing a second grid point set according to a second boundary grid on adjacent edges of the second discrete grid to be stitched and the first discrete grid to be stitched; Calculating the point pair distances of the grid point pairs between the first grid point set and the second grid point set, and selecting the grid point pairs whose point pair distances satisfy the fusion tolerance condition as target grid point pairs, so as to arrange the target grid point pairs in increasing order of distance, and obtain a set of point pairs to be stitched; The target grid point pairs are sequentially triangle-fused from the set of point pairs to be stitched to obtain a repaired CAD model.

7. The method for repairing a gap in a CAD model according to any one of claims 1 to 6, characterized in that: Also includes: Check whether there are gaps in the repaired CAD model. If so, expand the initial stitching tolerance to obtain a new initial stitching tolerance, and jump to the step of 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 until there are no gaps in the repaired CAD model.

8. A device for repairing gaps in a CAD model, characterized in that: include: A virtual information creation module is used to 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; A stitching tolerance determination module, used to set an initial stitching tolerance according to the diagonal length of the model bounding box and the average length of the virtual edge; wherein the model bounding box is a bounding box established based on discrete grid data of all virtual faces; A virtual information updating module is used 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 to perform a segmentation operation on the target virtual edge to obtain an updated virtual edge and an updated virtual point; 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, used for fusing 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; The stitching module is used to stitch the discrete grid data between the target virtual surfaces to obtain a repaired CAD model.

9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor is used to execute the computer program to implement the steps of the method for repairing a gap in a CAD model as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: Used to store computer programs; wherein, when the computer program is executed by a processor, the steps of the method for repairing a gap in a CAD model as described in any one of claims 1 to 7 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

  • Three-dimensional grid model generation method and device, storage medium and electronic equipment

    CN118447188A