Method, device and equipment for automatic repair of entity gap and storage medium

CN123013207APending Publication Date: 2026-10-30SANY HEAVY IND CO LTD (CN)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611224012.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-12
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0005]有鉴于此,本发明实施例致力于提供一种实体间隙的自动修复方法、装置、设备及存储介质,以解决现有技术中,由于无法根据间隙两侧几何面的实际相对位置关系自适应地生成过渡连接,经常出现无法自动形成有效过渡实体的情况,致使仍须依赖大量人工手动操作来完成实体连接,严重制约了仿真分析流程的自动化水平和效率的技术问题

Benefits of technology

[0019]在本发明的上述实现方式中,通过获取三维模型中第一实体和第二实体之间间隙的几何数据;基于所述几何数据,确定所述间隙两侧几何面的相对位置关系,其中,所述间隙两侧几何面包括源面和目标面;根据所述相对位置关系,从预先定义的多种拓扑重构策略中选择目标拓扑重构策略;通过执行所述目标拓扑重构策略,自动生成用于连接所述第一实体和所述第二实体的过渡实体。通过分析间隙两侧几何面的相对位置关系,并从预先定义的多种拓扑重构策略中自适应选择目标策略,解决了因固化单一几何重构策略而无法有效处理非平行面、异形缺口或复杂曲面间隙的问题,从而将成功修复的对象从简单的平行间隙扩展到多样化的复杂间隙形态,提升了对复杂间隙形态的适应性和修复成功率。克服了相关技术中因缺乏动态决策机制而导致修复失败、必须依赖大量人工手动操作的局限,实现了修复流程的自动化与稳定性,减少了人工干预。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123013207A_ABST
    Figure CN123013207A_ABST
Patent Text Reader

Abstract

The present application provides an automatic repairing method and device for entity gap, equipment and storage medium, comprising: acquiring geometric data of the gap between the first entity and the second entity in the three-dimensional model; determining the relative position relationship of the geometric faces on both sides of the gap based on the geometric data, wherein the geometric faces on both sides of the gap include source face and target face; according to the relative position relationship, selecting the target topology reconstruction strategy from the pre-defined multiple topology reconstruction strategies; automatically generating the transition entity for connecting the first entity and the second entity by executing the target topology reconstruction strategy. The adaptability to complex gap form and the repairing success rate are improved, the automation and stability of the repairing process are realized, and the manual intervention is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of simulation technology, and specifically to an automatic repair method, apparatus, device, and storage medium for physical gaps. Background Technology

[0002] In the structural simulation analysis of large assemblies such as engineering machinery, the accuracy of the finite element model directly affects the reliability of the verification results. Due to the numerous components and unavoidable design tolerances and model-to-digital conversion errors, small gaps, misalignments, or non-coplanarities often exist between adjacent entities after importing into finite element preprocessing software. To ensure the continuity of finite element calculations, these separate entities need to be connected into a topologically continuous whole for subsequent mesh generation and load transfer. Therefore, how to efficiently and accurately automatically repair gaps between entities is an urgent need in this technical field.

[0003] In related technologies, to complete the aforementioned entity connections, common CAD modeling commands or simple automated scripting methods are typically employed. For example, gaps are filled by stretching in a fixed direction, or by automatically stitching adjacent entities using global tolerances. These methods employ relatively fixed geometric reconstruction strategies, lacking the ability to adaptively distinguish the relative positional relationships of the geometric surfaces on either side of the gap when performing gap repair. While fixed-direction extension may work when the surfaces on either side of the gap are parallel, it often fails to generate effective transition geometry when dealing with diverse gap shapes such as non-parallel surfaces, stepped gaps, or complex curved surfaces, easily leading to entity deformation, interference, or Boolean operation failures. Furthermore, when processing entity surfaces containing fillets or chamfers, these technologies typically treat all surfaces indiscriminately, easily causing unexpected extensions on non-functional decorative features, further exacerbating the risk of geometric distortion.

[0004] The aforementioned limitations make it difficult to reliably repair a large number of solid gaps with varying shapes in the finite element preprocessing of complex assemblies using existing automated tools. This is particularly true for engineering machinery structures containing numerous irregularly shaped parts, braces, and curved surface matings. Because the transition connections cannot be adaptively generated based on the actual relative positions of the geometric surfaces on both sides of the gap, situations frequently arise where effective transition entities cannot be automatically formed. This necessitates a significant amount of manual operation to complete the solid connections, severely restricting the automation level and efficiency of the simulation analysis process. Summary of the Invention

[0005] In view of this, the present invention aims to provide an automatic repair method, apparatus, device and storage medium for solid gaps, in order to solve the technical problem in the prior art that, due to the inability to adaptively generate transition connections based on the actual relative positional relationship of the geometric surfaces on both sides of the gap, effective transition solids often cannot be automatically formed, resulting in the need to rely on a large amount of manual operation to complete solid connections, which seriously restricts the automation level and efficiency of the simulation analysis process.

[0006] This invention provides an automatic repair method for gaps between solids, the method comprising: Obtain the geometric data of the gap between the first and second entities in the 3D model; Based on the geometric data, the relative positional relationship of the geometric surfaces on both sides of the gap is determined, wherein the geometric surfaces on both sides of the gap include the source surface and the target surface; Based on the relative positional relationship, a target topology reconstruction strategy is selected from a variety of predefined topology reconstruction strategies; By executing the target topology reconstruction strategy, a transition entity is automatically generated to connect the first entity and the second entity.

[0007] In one possible embodiment, the multiple topology reconstruction strategies include at least one of the following: normal offset mode, edge bridging mode, and point projection ruling mode.

[0008] In one possible embodiment, when the target topology reconstruction strategy is the normal offset mode, the automatic generation of a transition entity for connecting the first entity and the second entity includes: Calculate the dot product of the unit normal vector of the source surface at the centroid and the direction vector of the target surface; If the dot product is less than 0, the normal of the source surface is automatically flipped to correct the offset direction; An offset operation is performed along the corrected normal direction to generate the transition entity.

[0009] In one possible embodiment, when the target topology reconstruction strategy is the edge bridging mode, the automatic generation of a transition entity for connecting the first entity and the second entity includes: A weighted score is calculated based on the Euclidean distance and tangential deviation angle between the endpoints to be paired, and the target endpoints are selected for pairing based on the score results; Based on the selected target endpoint pairing, a bridging operation is performed to generate a transition entity connecting the first entity and the second entity.

[0010] In one possible embodiment, the step of performing a bridging operation based on the selected target endpoint pairing to generate a transition entity connecting the first entity and the second entity includes: Before merging the selected target endpoint pairs, a pre-check for self-intersection conflicts is performed on the geometric elements associated with the selected target endpoint pairs. For geometric regions that still have free edges after the merging operation, degenerate bridging edges are automatically generated to complete the generation of the transition entity.

[0011] In one possible embodiment, when the target topology reconstruction strategy is the point projection ruled pattern, the automatic generation of a transition entity to connect the first entity and the second entity includes: The boundary sampling points of the source surface are orthogonally projected onto the target surface to obtain a set of projection points; The projection point set is fitted and corrected to eliminate irregular jitter of the projection points caused by local geometric distortion of the target surface; Based on the fitted and corrected sequence of projection point pairs, the ruled surface constituting the transition entity is constructed.

[0012] In one possible embodiment, after automatically generating the transition entity for connecting the first entity and the second entity, the method further includes: Perform a Boolean merge operation between the transition entity and the first entity and the second entity; Calculate and compare the volumes of the entities before and after the Boolean merge operation; If the volume of a newly generated entity after the Boolean merge operation differs from the volume of the original entity before the Boolean merge operation by more than a dynamic threshold, then the newly generated entity is identified as a deformed fragment and automatically deleted.

[0013] In one possible embodiment, after automatically generating the transition entity for connecting the first entity and the second entity, the method further includes: Scan the new edge lines generated after the Boolean merge operation, and detect whether there are edge lines that are associated with only a single geometric surface based on the new edge lines; If there exists an edge that is associated with only a single geometric face, then that edge is marked as a free edge indicating that the entity is not closed.

[0014] In one possible embodiment, the geometric data includes surface feature recognition, and after acquiring the geometric data, the method further includes: Surface feature recognition is performed on the surfaces of the first entity and / or the second entity. Surface features with a radius of curvature less than a preset threshold are identified as non-functional decorative features, and these non-functional decorative features are removed from the candidate geometric data to obtain the geometric data.

[0015] Secondly, the present invention provides an automatic repair device for solid gaps, the device comprising: The acquisition module is used to acquire the geometric data of the gap between the first entity and the second entity in the 3D model; The determination module is used to determine the relative positional relationship of the geometric surfaces on both sides of the gap based on the geometric data, wherein the geometric surfaces on both sides of the gap include a source surface and a target surface; The selection module is used to select a target topology reconstruction strategy from a variety of predefined topology reconstruction strategies based on the relative positional relationship. A generation module is used to automatically generate a transition entity for connecting the first entity and the second entity by executing the target topology reconstruction strategy.

[0016] Thirdly, the present invention provides an electronic device, the device comprising: a memory and a processor; the memory being used to store related program code; the processor being used to call the program code to execute the automatic repair method for physical gaps described in any implementation of the first aspect.

[0017] Fourthly, the present invention provides a computer-readable storage medium for storing a computer program for executing the automatic repair method for physical gaps described in any implementation of the first aspect.

[0018] Fifthly, the present invention provides a computer program product comprising a computer program / instruction, wherein when the computer program / instruction is executed by a processor, it implements the automatic repair method for physical gaps described in any of the implementations of the first aspect.

[0019] In the above implementation of the present invention, geometric data of the gap between a first entity and a second entity in a three-dimensional model are acquired; based on the geometric data, the relative positional relationship of the geometric surfaces on both sides of the gap is determined, wherein the geometric surfaces on both sides of the gap include a source surface and a target surface; according to the relative positional relationship, a target topology reconstruction strategy is selected from a variety of predefined topology reconstruction strategies; by executing the target topology reconstruction strategy, a transition entity for connecting the first entity and the second entity is automatically generated. By analyzing the relative positional relationship of the geometric surfaces on both sides of the gap and adaptively selecting a target strategy from a variety of predefined topology reconstruction strategies, the problem of not being able to effectively handle non-parallel surfaces, irregular gaps, or complex curved surface gaps due to the fixation of a single geometric reconstruction strategy is solved. This expands the successfully repaired objects from simple parallel gaps to diverse complex gap shapes, improving the adaptability to complex gap shapes and the repair success rate. It overcomes the limitations of related technologies that lack a dynamic decision-making mechanism leading to repair failure and require a large amount of manual operation, achieving automation and stability of the repair process and reducing manual intervention. Attached Figure Description

[0020] Figure 1 This is a schematic diagram of the architecture of an automatic repair system for physical gaps according to an embodiment of the present invention.

[0021] Figure 2 This is a flowchart of an automatic repair method for solid gaps provided in an embodiment of the present invention.

[0022] Figure 3 This is a schematic diagram of typical gap states under different relative positional relationships provided in the embodiments of the present invention.

[0023] Figure 4 This is a schematic structural diagram of the normal offset mode provided in an embodiment of the present invention.

[0024] Figure 5 This is a schematic structural diagram of the edge bridging mode provided in an embodiment of the present invention.

[0025] Figure 6 This is a schematic structural diagram of the dot projection straight-line pattern provided in an embodiment of the present invention.

[0026] Figure 7 A schematic diagram of an automatic repair device for solid gaps provided in an embodiment of the present invention.

[0027] Figure 8 This is a schematic diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0028] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0029] In the structural simulation analysis of large assemblies such as engineering machinery, the accuracy of the finite element model directly affects the reliability of the verification results. Due to the numerous components and unavoidable design tolerances and model-to-digital conversion errors, small gaps, misalignments, or non-coplanarities often exist between adjacent entities after importing into finite element preprocessing software. To ensure the continuity of finite element calculations, these separate entities need to be connected into a topologically continuous whole for subsequent mesh generation and load transfer. Therefore, how to efficiently and accurately automatically repair gaps between entities is an urgent need in this technical field.

[0030] In related technologies, to complete the aforementioned entity connections, common CAD modeling commands or simple automated scripting methods are typically employed. For example, gaps are filled by stretching in a fixed direction, or by automatically stitching adjacent entities using global tolerances. These methods employ relatively fixed geometric reconstruction strategies, lacking the ability to adaptively distinguish the relative positional relationships of the geometric surfaces on either side of the gap when performing gap repair. While fixed-direction extension may work when the surfaces on either side of the gap are parallel, it often fails to generate effective transition geometry when dealing with diverse gap shapes such as non-parallel surfaces, stepped gaps, or complex curved surfaces, easily leading to entity deformation, interference, or Boolean operation failures. Furthermore, when processing entity surfaces containing fillets or chamfers, these technologies typically treat all surfaces indiscriminately, easily causing unexpected extensions on non-functional decorative features, further exacerbating the risk of geometric distortion.

[0031] The aforementioned limitations make it difficult to reliably repair a large number of solid gaps with varying shapes in the finite element preprocessing of complex assemblies using existing automated tools. This is particularly true for engineering machinery structures containing numerous irregularly shaped parts, braces, and curved surface matings. Because the transition connections cannot be adaptively generated based on the actual relative positions of the geometric surfaces on both sides of the gap, situations frequently arise where effective transition entities cannot be automatically formed. This necessitates a significant amount of manual operation to complete the solid connections, severely restricting the automation level and efficiency of the simulation analysis process.

[0032] To overcome the aforementioned contradictions, this invention obtains the relative positional relationship between the geometric surfaces on both sides of the gap and adaptively selects a target strategy from a pre-constructed set of various topology reconstruction strategies, including normal offset, edge bridging, and point projection ruling, based on this relationship. This automatically generates a transition entity to connect the first and second entities. By introducing a posture-aware and strategy distribution mechanism into the geometric reconstruction stage, this method improves the generation logic during gap filling, effectively enhancing adaptability to non-parallel and curved surface gaps without significantly sacrificing parallel gap processing efficiency, thus avoiding the generation of deformed entities. In other words, it provides an automatic repair method that adaptively selects a topology reconstruction strategy based on the relative relationship of the gap's geometric surfaces. This solves the problem in related technologies where a single reconstruction strategy cannot adapt to varying gap geometries, leading to transition entity generation failures, and achieves the technical effect of stably generating watertight connected entities in complex assemblies.

[0033] Figure 1 This is a schematic diagram of the architecture of the automatic repair system for solid gaps provided in an embodiment of the present invention.

[0034] This system operates within a computer-aided design and finite element analysis environment to handle gaps and defects in three-dimensional solid models. (Refer to...) Figure 1Logically, the system may include a feature filtering module 10, a gap search module 20, an adaptive reconstruction engine 30, a Boolean fusion module 40 and a cleaning module 50, as well as a recursive control module 60.

[0035] The feature filtering module receives the geometric data of the source and target entities selected by the user, traverses and analyzes the entity surfaces, and identifies and filters out the valid surfaces for subsequent connection operations based on the geometric attributes of the surfaces. The gap search module is connected to the feature filtering module, and uses the filtered valid surfaces to calculate the gap distance and relative orientation between the source and target surfaces, generating a set of geometric parameters representing the gap.

[0036] The adaptive reconstruction engine is the core of topology generation in the system, integrating normal offset elements, edge bridging elements, and point projection ruled elements. Based on the geometric parameters passed from the gap search module, the engine automatically matches and calls the corresponding elements to generate transitional entity geometry for connecting the source and target entities. The generated transitional entity data is then fed into the Boolean fusion and cleaning module.

[0037] The Boolean fusion and cleaning module performs a Boolean merge operation on the transition entity, source entity, and target entity, and performs volume verification and free edge detection on the merged result to remove any abnormal fragments that may be generated during the merging process, ensuring the topological integrity and geometric continuity of the output entity. The recursive control module monitors the gap repair status. If there are still unclosed regions, it feeds back the updated entity data to the feature filtering module or gap search module, driving the system to enter the next round of iteration repair until all gaps are eliminated or the preset number of iterations is reached. Through the collaborative work of the above modules, the system finally outputs a watertight entity model with gaps eliminated, which can be directly used for subsequent mesh generation.

[0038] Figure 2 The diagram shown is a schematic flowchart of an automatic solid gap repair method according to an embodiment of the present invention. This method can be executed by an automatic solid gap repair system running in a computer-aided design and finite element analysis environment, or by a general-purpose computing device loading a script program for execution. (In conjunction with...) Figure 1 The system architecture and Figure 2 The process shown includes steps S210 to S240. The system can handle gap regions between a first entity and a second entity in a 3D model caused by design tolerances, digital-to-analog conversion errors, assembly misalignment, or non-coplanar relationships. It generates transition entities to create a continuous solid structure suitable for subsequent meshing. The 3D model can be a solid model imported from CAD or a collection of geometric entities in a finite element preprocessing environment. The gaps include not only slits between two parallel surfaces but also misaligned gaps between oblique surfaces, irregular transition areas between curved surfaces, and stepped notches. Figure 2 As shown, steps S210-S240 specifically include: S210: Obtain the geometric data of the gap between the first entity and the second entity in the 3D model.

[0039] In this embodiment, geometric data representing the gap between a first entity and a second entity in a 3D model can be obtained. As a specific implementation, after receiving the source and target entities selected by the user, the system first traverses the outer surfaces of the first and second entities to establish a candidate surface set. Then, it uses information such as surface centroids, nearest face, boundary lines, normal vectors, radii of curvature, free edge distribution, and inter-surface distances to form a geometric dataset representing the gap region. For example, several candidate source faces can be extracted from the first entity, and the centroid coordinates of each source face can be calculated. The nearest face search logic is then called to obtain the corresponding target face on the second entity and the shortest distance between them. Using this method, subsequent judgments do not depend on mesh node density, thus reflecting the true geometric gap more stably.

[0040] Furthermore, the geometric data can be obtained in various ways. For example, it can be obtained directly by traversing the outer surface of the entity; it can also be obtained by reading pre-stored surface attributes, boundary topology relationships, and spatial index information in the model database; or it can be obtained by first coarsely filtering using bounding boxes and then performing precise distance calculations on the candidate regions. All of the above methods can achieve geometric representation of the gap region. In some embodiments, the geometric data may include at least one or more of the following: source surface identifier, target surface identifier, surface centroid coordinates, surface normal vector, shortest distance between surfaces, boundary line set, endpoint coordinates, and local curvature information.

[0041] In this invention, geometric data refers to a set of data that can be used to describe the spatial and topological relationships between the first entity and the second entity. Specifically, it can refer to simple distance and normal data, or it can encompass derived parameters such as boundary endpoints, edge tangents, radii of curvature, projection point sets, free edges, and volume information. The source surface and target surface are not limited to being provided by a fixed entity; in actual execution, any surface to be extended can be selected as the source surface based on user input, distance field results, or repair direction, and the corresponding receiving surface can be used as the target surface.

[0042] In some embodiments, before determining the gap geometry data, surface feature identification and filtering can be performed on the surfaces of the first entity and the second entity. Specifically, the outer surface of the first entity may include functional surfaces and non-functional decorative feature surfaces. The system can call the geometry recognition interface to calculate or read the radius of curvature of the surfaces, and identify surfaces with a radius of curvature less than a preset threshold as decorative surfaces, such as rounded or chamfered surfaces. These surfaces are then removed from the candidate geometry data, leaving only planar or large-curvature functional surfaces for subsequent gap search. The preset threshold can be a single threshold or a threshold range; for example, 0.1 mm can be used as the lower limit recognition value, combined with a larger upper limit value to identify rounded features, thereby excluding surfaces that are clearly decorative transitions from the connecting surfaces.

[0043] As a specific implementation, the system can first establish a complete set of external surface markers for the first entity, then call the fillet recognition command to obtain a list of suspected fillet faces, and filter the faces in the list based on the radius of curvature threshold and functional indicators. If a face is identified as a decorative face, it is skipped directly in subsequent search loops; if a face is a plane or a functional surface with a large radius of curvature, it is retained as a candidate source face. For example, in engineering machinery structural components, the working surfaces corresponding to the web, lugs, connecting seats, and box end plates are usually retained, while small fillets and chamfers at the edges can be excluded. This reduces the probability of generating deformed transitions on decorative local features from the source.

[0044] S220, Based on the geometric data, determine the relative positional relationship of the geometric surfaces on both sides of the gap, wherein the geometric surfaces on both sides of the gap include the source surface and the target surface.

[0045] In this embodiment, based on the geometric data, the relative positional relationship of the geometric surfaces on both sides of the gap is determined, wherein the geometric surfaces on both sides of the gap include the source surface and the target surface. See also Figure 3 , Figure 3 Typical gap states under different relative positional relationships are shown. Among them, Figure 3 The diagram shows parallel gap 31, non-parallel gap 32, and complex curved surface gap 33. After obtaining the source surface, target surface, normal vector, boundary line, and distance parameters, the system can classify the relative positional relationship between the source surface and the target surface based on information such as the included angle of the normal vector, boundary shape, distance distribution continuity, and projection relationship.

[0046] As a specific implementation method, the system can first calculate the unit normal vector of the source surface at its centroid and the directional characteristics of the corresponding position or nearest point of the target surface. Then, combining the correspondence between the source surface boundary and the target surface boundary or projection curve, it can determine whether the two are basically parallel, obviously non-parallel, or complex surface mating. For example, when the normals of the two surfaces are approximately parallel and the spacing varies little in a local area, it can be determined as a parallel surface gap; when the boundaries of the two surfaces are obviously misaligned, the angle between the normals is large, and the gap is stepped or irregularly shaped, it can be determined as a non-parallel surface or a gap-type gap; when the target surface is a free-form surface and the projection of the source surface boundary points forms a non-linear distribution, it can be determined as a complex surface gap. Using this method, the generation method of subsequent transition entities can be made more consistent with the actual geometric shape.

[0047] Specifically, the determination of relative positional relationships can be achieved through various classification logics. For example, rule-based determination based on normal angle thresholds and distance variance thresholds can be used; hierarchical determination based on boundary point projection residuals and curvature changes can also be used; alternatively, normal, tangential, boundary closure, and local curvature can be used as inputs, and a training model can be used to output gap type labels. All of the above schemes can achieve the identification of relative positional relationships. In this invention, the term "relative positional relationship" refers to a relationship description that reflects whether the source surface and the target surface are suitable for a certain type of topology reconstruction strategy in terms of spatial attitude and boundary constraints, and is not limited to whether they are strictly parallel.

[0048] In some embodiments, to reduce misclassification, dual or multiple decision conditions can be set. For example, in parallel surface determination, not only is it required that the included angle of the normals be less than a preset angle threshold, but it can also be required that the deviation between the shortest distance from the centroid of the source surface to the target surface and the distance from several sampling points on the source surface boundary to the target surface be less than a consistency threshold; in complex surface determination, it can be required that the projection point set has a continuous surface parameter mapping and that the local projection direction does not change abruptly. By introducing multiple decision conditions, the phenomenon of misselection strategies caused by relying on a single parameter can be reduced.

[0049] By accurately determining the geometric fit between the source and target surfaces, it is possible to switch appropriately between different topology generation paths such as offset, bridging, and point projection ruling.

[0050] S230, based on the relative positional relationship, select a target topology reconstruction strategy from a variety of predefined topology reconstruction strategies.

[0051] In this embodiment, a target topology reconstruction strategy is selected from a variety of predefined topology reconstruction strategies based on the relative positional relationship. The system can include normal offset units, edge bridging units, and point projection ruled units. After obtaining the relative positional relationship, matching can be performed among the various topology reconstruction strategies to select the target topology reconstruction strategy corresponding to the current gap shape.

[0052] As a specific implementation method, when the system identifies that the source and target surfaces are basically parallel and the local spacing is stable, the normal offset mode can be selected as the target topology reconstruction strategy; when the system identifies the gap region as a non-parallel surface mating, a stepped notch, or an irregular opening, the edge bridging mode can be selected; when the system identifies that at least one of the source and target surfaces is a complex curved surface and is suitable for constructing a ruled surface through a sequence of point pairs, the point projection ruled surface mode can be selected. This method of streamlining based on gap type avoids the risk of failure caused by a single fixed algorithm processing all gaps uniformly.

[0053] Specifically, the predefined topology reconstruction strategies can include at least one of the following: normal offset mode, edge bridging mode, and point projection ruling mode. Other compatible entity generation strategies can also be added on top of these. For example, a local trimming and splicing mode, a hybrid transition mode, or a segmented reconstruction mode can also be added. However, as long as the selection logic is still based on relative positional relationships for strategy matching, they can all be included in the adaptive strategy framework described in this invention. Specific means of implementing the above selection function can include: establishing a rule base, decision tree, state machine, or strategy mapping table at the software level; and establishing a correspondence between gap types and the set of callable commands at the data level.

[0054] In this invention, the so-called target topology reconstruction strategy refers to a specific geometric reconstruction path selected for generating transition entities in the current gap region. It can be a single strategy or a combination of a main strategy with accompanying local correction operations. For example, in the edge bridging mode, endpoint merging, self-intersection pre-checking, and degenerate bridging edge generation can be further added; in the point projection ruling mode, B-spline fitting correction of projection points can be further added. As long as the final result is the selection of a generation path from the candidate strategy set that matches the current relative positional relationship, it can be considered an implementation of the target topology reconstruction strategy.

[0055] S240, by executing the target topology reconstruction strategy, a transition entity for connecting the first entity and the second entity is automatically generated.

[0056] In this embodiment, by executing the target topology reconstruction strategy, a transition entity for connecting the first entity and the second entity is automatically generated. See also Figures 4 to 6 , Figure 4 A schematic structure of the normal offset mode is shown. Figure 5 A schematic structure of the edge bridging mode is shown. Figure 6 A schematic structure of the point projection ruled pattern is shown. When executing the target topology reconstruction strategy, the system can call the corresponding geometric processing commands according to different patterns to generate the top surface, side surface, or bridging surface, and encapsulate them as a watertight transition entity.

[0057] As a specific implementation method, in the normal offset mode, the system can select the source surface as the offset base surface, generate an offset surface along the corrected normal direction based on the gap distance, then close the corresponding boundary between the source surface and the offset surface with ruled side surfaces, and finally form a solid block-shaped transition entity through a stitching operation. This method is suitable for parallel surface gaps with relatively uniform inter-surface distances and can achieve closed connections with less geometric deformation.

[0058] In edge bridging mode, the system can extract free edges or boundary lines to be bridged from the source and target surfaces, obtain the endpoint set, perform matching, construct a bridging surface based on the matching results, and then stitch the bridging surface with the adjacent surfaces to form a transition entity. This method is suitable for non-parallel surfaces, stepped gaps, and irregularly shaped gap regions, and can complete topology closure without relying on a fixed offset direction.

[0059] In the point projection ruled mode, the system samples the source surface boundary to obtain an ordered set of points, then orthogonally projects these sampled points onto the target surface to form a projection point set. After correcting the projection point set, a ruled surface is constructed, and this ruled surface, together with the original surface, is encapsulated as a transition entity. This method is suitable for gaps between complex curved surfaces, preserving the geometric trend of the target surface to a large extent and reducing distortion and wrinkles in the transition region.

[0060] Specifically, the automatic generation of transition entities is not limited to generating a single complete entity. The system can also first generate several intermediate surfaces, and then trim, extend, stitch, and solidify them to form the final entity; or first generate several local transition blocks, and then combine them using Boolean operations to form a unified connected body. Both of these methods can achieve automatic connection between the first entity and the second entity. In this invention, the term "transition entity" refers to a new entity structure used to cross gap regions and connect the entities on both sides geometrically and topologically. It can be a regular offset block, an irregular bridging body, or a ruled surface encapsulation body.

[0061] To further illustrate the specific implementation of the normal offset mode, in one embodiment, when the target topology reconstruction strategy is the normal offset mode, the automatic generation of a transition entity to connect the first entity and the second entity includes: Calculate the dot product of the unit normal vector of the source surface at the centroid and the direction vector of the target surface; If the dot product is less than 0, the normal of the source surface is automatically flipped to correct the offset direction; An offset operation is performed along the corrected normal direction to generate the transition entity.

[0062] The direction vector of the target surface can be either a displacement vector pointing from the centroid of the source surface to the nearest point on the target surface, or a locally connected vector pointing from the source surface to the target surface. A dot product less than 0 indicates that the source surface normal and the direction pointing to the target surface are completely opposite. If a direct offset is performed in this case, the vector may be generated towards the side furthest from the target surface, leading to problems such as self-intersection, overlap, or failure to reach the target surface. Therefore, performing a normal consistency check before offsetting ensures that the offset direction better meets the gap closure requirements.

[0063] As a specific implementation, the system first calls the centroid calculation interface to obtain the centroid position of the source surface, then calls the surface normal interface to obtain the unit normal vector at that point. Simultaneously, it finds the nearest point on the target surface and obtains the direction vector by connecting the nearest point to the centroid. Subsequently, the system performs a dot product operation on the two vectors; if the result is negative, it calls the normal flip command to flip the source surface; if the result is zero or positive, it keeps the current normal unchanged. After correction, it executes the offset command to generate an offset surface according to the gap distance obtained in step S220. Using this method, the problem of inconsistent normals can be automatically corrected when batch processing multiple entity pairs.

[0064] The judgment condition for normal consistency verification is not limited to the single expression of dot product being less than 0. It can also be achieved by using dot product less than a certain negative threshold, vector angle greater than 90 degrees, or detecting whether it is far from the target surface after probing along the offset, etc. Specific means to implement the above correction function can include: executing vector operations, flipping commands, and offset commands at the software level; and recording flipping flags, source surface status, and offset history at the data level.

[0065] It should be noted that there is a direct causal relationship between normal correction and subsequent offset generation. If the normal direction is correct, the generated offset surface is more likely to form the expected gap closure relationship with the target surface, providing a geometric basis for side closure and solidification; if the normal direction is incorrect, even if the offset distance is accurate, it may lead to the solid self-intersecting or deviating from the target region. Therefore, the above dot product verification and flipping operations help solve the modeling failure problem caused by inconsistent surface normals in related technologies.

[0066] To further improve the endpoint matching effect during irregular gap repair, in another embodiment, when the target topology reconstruction strategy is the edge bridging mode, the automatic generation of a transition entity to connect the first entity and the second entity includes: A weighted score is calculated based on the Euclidean distance and tangential deviation angle between the endpoints to be paired, and the target endpoints are selected for pairing based on the score results; Based on the selected target endpoint pairing, a bridging operation is performed to generate a transition entity connecting the first entity and the second entity.

[0067] In this embodiment, endpoint matching is not based solely on the closest distance, but rather incorporates both spatial distance and geometric continuity into the score. The Euclidean distance, referred to here, can be the three-dimensional straight-line distance between endpoints; the tangential deviation angle can be the tangential angle between the boundary lines containing the endpoints at the corresponding endpoints. The system can calculate the distance score and tangential score separately, and then weight them according to preset weights, for example, using a distance weight of 0.6 and a tangential weight of 0.4 to form a comprehensive score. The system then selects the endpoint pair with the highest score from the same candidate cluster as the target endpoint pair. This not only ensures that the endpoints are spatially close but also takes into account the boundary continuity after bridging.

[0068] As a specific implementation, the system can first perform spatial hash clustering on the free edge endpoints, grouping endpoints with distances less than the tolerance into the same candidate cluster, reducing the computational cost of the full search. Then, pairwise scoring is performed within each candidate cluster, filtering out endpoint pairs with scores below a predetermined threshold. For example, pairs with a comprehensive score below 0.6 can be considered unreliable and skipped, only merging and bridging target endpoint pairs that meet the scoring requirements. This can reduce erroneous merging caused by blind nearest neighbor matching.

[0069] In one embodiment, in edge bridging mode, a bridging operation is performed based on the selected target endpoint pairing to generate a transition entity connecting the first entity and the second entity, including: Before merging the selected target endpoint pairs, a pre-check for self-intersection conflicts is performed on the geometric elements associated with the selected target endpoint pairs. For geometric regions that still have free edges after the merging operation, degenerate bridging edges are automatically generated to complete the generation of the transition entity.

[0070] In one implementation, before merging the selected target endpoint pairs, the system can perform a pre-check for self-intersection conflicts on the geometric elements associated with the selected target endpoint pairs; for geometric regions that still have free edges after the merging operation, the system can automatically generate degenerate bridging edges to complete the generation of transition entities.

[0071] In this implementation, the self-intersection conflict pre-check involves predicting whether a node merging or boundary connection operation will result in self-penetration, self-intersection, or non-manifold connections on bridging surfaces, adjacent boundaries, or local entities before execution. If the detection result indicates a conflict, the current endpoint pairing can be abandoned, and a pairing with the next best score but no conflict can be selected instead, or the local region can be preserved for subsequent processing. This reduces topology anomalies caused by erroneous merging.

[0072] The term "degenerate bridging edge" refers to an auxiliary topological edge automatically generated to ensure watertightness when local boundary gaps still exist after the two endpoints are merged. This bridging edge can correspond to a zero-area degenerate surface or a topological connecting line used to complete boundary closure relationships. For example, when three points are approximately collinear but lack an edge connecting them, the system can directly generate a bridging edge and form a locally closed structure accordingly. The term "free edge" refers to an edge line that is only associated with a single geometric surface and cannot form a shared boundary with another adjacent surface; it can be considered an indication of an unclosed entity.

[0073] Specifically, self-intersection pre-checks can be achieved through geometric Boolean prediction, local bounding box interference analysis, mesh trial projection checks, or topological adjacency checks; the generation of degenerate bridging edges can be achieved through automatic line drawing, creating auxiliary surfaces, edge and surface patching, or local stitching. These methods can all compensate for topological closure when unclosed regions still exist after bridging.

[0074] By employing the aforementioned pre-checking and degenerate bridging edge generation scheme, good watertight output can be maintained even with irregular gaps and locally complex boundaries. This further helps to solve the problems of erroneous bridging and residual free edges caused by relying solely on distance tolerance merging, and enhances the adaptability of the edge bridging mode in complex scenarios.

[0075] To further improve the quality of the transition surface between complex curved surfaces, in another embodiment, when the target topology reconstruction strategy is the point projection ruled pattern, the automatic generation of the transition entity for connecting the first entity and the second entity includes: The boundary sampling points of the source surface are orthogonally projected onto the target surface to obtain a set of projection points; The projection point set is fitted and corrected to eliminate irregular jitter of the projection points caused by local geometric distortion of the target surface; Based on the fitted and corrected sequence of projection point pairs, the ruled surface constituting the transition entity is constructed.

[0076] In this implementation scheme, the boundary sampling points of the source surface can be an ordered sequence of points discretized along the boundary of the source surface using an equal arc length method. The sampling step size can be set according to the boundary length, curvature variation, or user tolerance; for example, 0.5 mm can be used as a typical sampling step size. For high curvature areas, the sampling step size can be further refined. The orthogonal projection refers to mapping the boundary points onto the target surface along a direction adapted to the local normal of the target surface to obtain the corresponding projection points. The fitting correction can specifically be performed by B-spline fitting, which involves smoothing the curve of the projection point set to make the variation trend between adjacent points smoother.

[0077] As a specific implementation, the system can first generate a point sequence according to the boundary order, then call the projection interface point by point to obtain the point set, and then use third-order B-spline fitting to obtain a smoothed point sequence. Finally, based on the one-to-one correspondence between the original sampling points and the smoothed projection points, several ruled patches are constructed, and these patches are combined to form a continuous ruled surface. Compared with directly using the original projection points to construct a ruled surface, the smoothed point sequence can reduce the patch distortion caused by local distortion of the target surface, sampling errors, or projection jitter.

[0078] More specifically, projection point correction is not limited to B-spline fitting; it can also be achieved using Bezier fitting, moving least squares smoothing, local mean filtering, or surface parameter domain smoothing. As long as the goal is to eliminate irregular jitter in the projection point set and improve the continuity of the point pair sequence, it can be considered an equivalent implementation. The ruled surface is also not limited to generating the entire transition surface at once; it can be formed by splicing together multiple adjacent ruled sub-surfaces.

[0079] It should be noted that there is a continuous data transfer relationship between point projection, smoothing correction, and ruling surface construction. If only projection is completed without correcting the point set, the point set is prone to sawtooth fluctuations when there is local geometric distortion on the target surface, which in turn causes wrinkles in the ruled surface. However, after B-spline fitting, the continuity of the point pair sequence is improved, making it easier to mesh the transition entity in the scenario of repairing surface gaps.

[0080] In some embodiments, after automatically generating the transition entity, the system can also perform fusion and result verification on the first entity, the second entity, and the transition entity. Specifically: After automatically generating the transition entity for connecting the first entity and the second entity, the method further includes: Perform a Boolean merge operation between the transition entity and the first entity and the second entity; Calculate and compare the volumes of the entities before and after the Boolean merge operation; If the volume of a newly generated entity after the Boolean merge operation differs from the volume of the original entity before the Boolean merge operation by more than a dynamic threshold, then the newly generated entity is identified as a deformed fragment and automatically deleted.

[0081] Specifically, the transition entity is merged with the first entity and the second entity using a Boolean merge operation to obtain a new entity after merging. Then, the volume of the entities before and after the Boolean merge operation is calculated and compared. If the volume of a newly generated entity after the Boolean merge differs from the volume of the original entity before the Boolean merge operation from the volume of the first entity, the newly generated entity is identified as a deformed fragment and automatically deleted.

[0082] The dynamic threshold referred to here can be a proportional threshold associated with the original entity volume, rather than a fixed absolute value. In one specific implementation, the dynamic threshold can be set to 10% of the original entity volume. For example, if the original entity volume is V0 and the newly generated entity volume is V1, then when |V1-V0| is greater than 0.1V0, the new entity can be marked as an abnormal entity and added to the deletion list. Using this threshold method that adapts to the original volume can balance the sensitivity of anomaly detection in both large and small entity scenarios.

[0083] The term "abnormal fragments" can broadly refer to unexpected small blocks, pseudo-entities, or entities with abnormal volumes that arise during Boolean operations due to geometric instability, abnormal handling of overlapping surfaces, local self-intersections, or topological errors. These are not necessarily characterized by very small volumes; they may also manifest as sudden increases in volume, negative volumes, abnormal shapes, or isolated existence. Volume comparison can effectively screen out these unexpected geometric remnants.

[0084] More specifically, Boolean merging can be implemented using a two-stage approach of first removing overlapping surfaces and then merging the entire entity, or it can be implemented using a single-stage merging approach. Volume verification can also be performed after each local merge or uniformly after the overall merge is completed. As long as abnormal new entities are identified by comparing the volume differences before and after the transition entity is generated, they can all be classified into the above cleaning scheme.

[0085] It should be noted that volume verification is related to the quality of the transition entity generation. The more accurate the aforementioned strategy selection and reconstruction, the lower the probability of subsequent Boolean fusion producing anomalous fragments. However, in complex real-world models, even if reconstruction is successful, Boolean results may still be unstable due to local topological conditions. Therefore, introducing volume verification after transition entity generation creates a secondary constraint on the Boolean output, thereby improving the usability of the final model.

[0086] In addition to volume verification, after automatically generating the transition entity to connect the first entity and the second entity, the method further includes: Scan the new edge lines generated after the Boolean merge operation, and detect whether there are edge lines that are associated with only a single geometric surface based on the new edge lines; If there exists an edge that is associated with only a single geometric face, then that edge is marked as a free edge indicating that the entity is not closed.

[0087] As a specific implementation, after obtaining a new entity, the system can traverse its newly generated set of edges and count the number of geometric faces associated with each edge. If an edge is associated with only one geometric face, it indicates that a closed shell has not been formed at that location, and the system can add the edge to the free edge list and prompt for further processing. This method can supplement the detection of local topological defects that are difficult to detect by relying solely on volume comparison.

[0088] More specifically, free edge detection can be performed at both the entity level and the local transition surface level; it can serve as both an alarm output and a conditional input to a recursive control module to trigger further repairs. By using free edges as indicators of unclosed states, the topological integrity of the output model can be further improved.

[0089] To further improve the simplicity of entities after multiple rounds of repair, in some embodiments, the system can perform topology cleanup after completing entity connection operations. The new entity obtained after Boolean fusion may contain redundant dividing lines, which are often introduced by extension, stitching, or local merging operations. By comparing the point and line relationships before and after the operation, newly created dividing lines that are only associated with two lines and are located inside the entity are identified, and suppression operations are performed on them.

[0090] As a specific implementation, the system can extract a set of points on a new entity and query the associated set of lines point by point. If the number of lines corresponding to a certain point meets a preset condition, such as only two associated lines, and these two lines are located inside the entity and not on the outer contour boundary, then the corresponding line segment can be determined to be a redundant dividing line. Subsequently, the system can call the edge suppression command to eliminate the redundant dividing line to obtain a simpler entity topology. Using this method can reduce the problem of mesh failure or a surge in the number of meshes caused by internal fragmented tangents during subsequent hexahedral mesh generation.

[0091] In this invention, the term "redundant dividing line" refers to an internal cutting edge introduced by the automatic repair process that does not necessarily contribute to the shape representation and topological closure of the target entity. It can be either an extension trace or a residual boundary line after multiple Boolean superpositions. The term "suppression" can refer to edge elimination at the geometric level or correlation reorganization at the topological level.

[0092] Furthermore, topology cleanup can also be achieved by combining point coincidence detection, boundary classification, local collinearity determination, or patch simplification algorithms. As long as the purpose is to reduce unnecessary internal segmentation and make the final entity more suitable for mesh generation, it can be considered an extension of the topology cleanup described in this invention.

[0093] In some embodiments, if unclosed regions, free edges, or remaining gaps still exist after a single repair, the entity state can be automatically updated and the geometric data acquisition, relative position relationship determination, strategy selection, and transition entity generation processes can be executed again until the gaps are eliminated or the preset maximum number of iterations is reached. As a specific implementation, the maximum number of iterations can be set to 5 to avoid infinite loops in abnormal scenarios. The recursion referred to here is not limited to recursion in the sense of function calls, but can also refer to cyclical, repeated repair scheduling.

[0094] By employing the recursive control described above, the system can handle not only simple gaps that can be closed in a single generation, but also complex situations such as multi-level steps, composite gaps, or series gaps. After each iteration, the system can re-execute candidate surface screening, gap search, and strategy matching, ensuring that subsequent steps are based on the updated geometry. This approach helps to further improve the automatic repair coverage in complex assemblies.

[0095] Based on the method provided in the above embodiments, By acquiring geometric data of the gap between a first entity and a second entity in a 3D model; determining the relative positional relationship of the geometric surfaces on both sides of the gap based on the geometric data, wherein the geometric surfaces on both sides of the gap include a source surface and a target surface; selecting a target topology reconstruction strategy from a variety of predefined topology reconstruction strategies according to the relative positional relationship; and automatically generating a transition entity to connect the first entity and the second entity by executing the target topology reconstruction strategy. By analyzing the relative positional relationship of the geometric surfaces on both sides of the gap and adaptively selecting a target strategy from a variety of predefined topology reconstruction strategies, the problem of not being able to effectively handle non-parallel surfaces, irregular gaps, or complex curved surface gaps due to the rigidity of a single geometric reconstruction strategy is solved. This expands the successfully repaired objects from simple parallel gaps to diverse and complex gap shapes, improving the adaptability to complex gap shapes and the repair success rate. It overcomes the limitations of related technologies that lack a dynamic decision-making mechanism leading to repair failures and require a large amount of manual operation, achieving automation and stability of the repair process and reducing human intervention.

[0096] Based on the above method embodiments, this invention also provides an automatic repair device for solid gaps. See also... Figure 7 This is a schematic diagram of an automatic repair device for solid gaps provided in an embodiment of the present invention.

[0097] The device 700 includes: The acquisition module 701 is used to acquire the geometric data of the gap between the first entity and the second entity in the 3D model; The determining module 702 is used to determine the relative positional relationship of the geometric surfaces on both sides of the gap based on the geometric data, wherein the geometric surfaces on both sides of the gap include a source surface and a target surface; Selection module 703 is used to select a target topology reconstruction strategy from a variety of predefined topology reconstruction strategies based on the relative positional relationship; The generation module 704 is used to automatically generate a transition entity for connecting the first entity and the second entity by executing the target topology reconstruction strategy.

[0098] In one possible implementation, the multiple topology reconstruction strategies include at least one of the following: normal offset mode, edge bridging mode, and point projection ruling mode.

[0099] In one possible implementation, when the target topology reconstruction strategy is the normal offset mode, the automatic generation of a transition entity to connect the first entity and the second entity includes: Calculate the dot product of the unit normal vector of the source surface at the centroid and the direction vector of the target surface; If the dot product is less than 0, the normal of the source surface is automatically flipped to correct the offset direction; An offset operation is performed along the corrected normal direction to generate the transition entity.

[0100] In one possible implementation, when the target topology reconstruction strategy is the edge bridging mode, the automatic generation of a transition entity to connect the first entity and the second entity includes: A weighted score is calculated based on the Euclidean distance and tangential deviation angle between the endpoints to be paired, and the target endpoints are selected for pairing based on the score results; Based on the selected target endpoint pairing, a bridging operation is performed to generate a transition entity connecting the first entity and the second entity.

[0101] In one possible implementation, the step of performing a bridging operation based on the selected target endpoint pairing to generate a transition entity connecting the first entity and the second entity includes: Before merging the selected target endpoint pairs, a pre-check for self-intersection conflicts is performed on the geometric elements associated with the selected target endpoint pairs. For geometric regions that still have free edges after the merging operation, degenerate bridging edges are automatically generated to complete the generation of the transition entity.

[0102] In one possible implementation, when the target topology reconstruction strategy is the point projection ruled pattern, the automatic generation of a transition entity to connect the first entity and the second entity includes: The boundary sampling points of the source surface are orthogonally projected onto the target surface to obtain a set of projection points; The projection point set is fitted and corrected to eliminate irregular jitter of the projection points caused by local geometric distortion of the target surface; Based on the fitted and corrected sequence of projection point pairs, the ruled surface constituting the transition entity is constructed.

[0103] In one possible implementation, after automatically generating the transition entity for connecting the first entity and the second entity, the method further includes: Perform a Boolean merge operation between the transition entity and the first entity and the second entity; Calculate and compare the volumes of the entities before and after the Boolean merge operation; If the volume of a newly generated entity after the Boolean merge operation differs from the volume of the original entity before the Boolean merge operation by more than a dynamic threshold, then the newly generated entity is identified as a deformed fragment and automatically deleted.

[0104] In one possible implementation, after automatically generating the transition entity for connecting the first entity and the second entity, the method further includes: Scan the new edge lines generated after the Boolean merge operation, and detect whether there are edge lines that are associated with only a single geometric surface based on the new edge lines; If there exists an edge that is associated with only a single geometric face, then that edge is marked as a free edge indicating that the entity is not closed.

[0105] In one possible implementation, the geometric data includes surface feature recognition, and after acquiring the geometric data, the method further includes: Surface feature recognition is performed on the surfaces of the first entity and / or the second entity. Surface features with a radius of curvature less than a preset threshold are identified as non-functional decorative features, and these non-functional decorative features are removed from the candidate geometric data to obtain the geometric data.

[0106] See Figure 8 , Figure 8 This is a schematic diagram of an electronic device provided in an embodiment of the present invention.

[0107] The electronic device 800 includes a memory 801 and a processor 802; the memory 801 is used to store relevant program code; the processor 802 is used to call the program code to execute the automatic repair method for physical gaps described in the above method embodiments.

[0108] Furthermore, embodiments of the present invention also provide a computer-readable storage medium for storing a computer program for executing the automatic repair method for entity gaps described in the above method embodiments.

[0109] This invention also provides a computer program product, which includes a computer program / instruction. When the computer program / instruction is executed by a processor, it implements the automatic repair method for physical gaps described in the above method embodiments.

[0110] It should be noted that the computer-readable medium described above in this invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof.

[0111] The computer program product can be written in any combination of one or more programming languages ​​to perform the operations of the embodiments of the present invention. The programming languages ​​include object-oriented programming languages ​​such as Java and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0112] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. In particular, for system or device embodiments, since they are basically similar to method embodiments, the description is relatively simple, and relevant parts can be referred to the descriptions in the method embodiments. The device embodiments described above are merely illustrative. The units or modules described as separate components may or may not be physically separate. The components shown as units or modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network units. Some or all of the units or modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0113] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functions, and operations that may be implemented according to various embodiments of the invention, including methods, apparatus, and devices. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0114] It should be understood that in this invention, "at least one (item)" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0115] It should also be noted that, in this invention, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0116] The steps of the methods or algorithms described in conjunction with the embodiments disclosed in this invention can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0117] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. An automatic repair method for gaps between solids, characterized in that, The method includes: Obtain the geometric data of the gap between the first and second entities in the 3D model; Based on the geometric data, the relative positional relationship of the geometric surfaces on both sides of the gap is determined, wherein the geometric surfaces on both sides of the gap include the source surface and the target surface; Based on the relative positional relationship, a target topology reconstruction strategy is selected from a variety of predefined topology reconstruction strategies; By executing the target topology reconstruction strategy, a transition entity is automatically generated to connect the first entity and the second entity.

2. The method according to claim 1, characterized in that, The various topology reconstruction strategies include at least one of the following: normal offset mode, edge bridging mode, and point projection ruling mode.

3. The method according to claim 2, characterized in that, When the target topology reconstruction strategy is the normal offset mode, the automatic generation of a transition entity to connect the first entity and the second entity includes: Calculate the dot product of the unit normal vector of the source surface at the centroid and the direction vector of the target surface; If the dot product is less than 0, the normal of the source surface is automatically flipped to correct the offset direction; An offset operation is performed along the corrected normal direction to generate the transition entity.

4. The method according to claim 2, characterized in that, When the target topology reconstruction strategy is the edge bridging mode, the automatic generation of a transition entity to connect the first entity and the second entity includes: A weighted score is calculated based on the Euclidean distance and tangential deviation angle between the endpoints to be paired, and the target endpoints are selected for pairing based on the score results; Based on the selected target endpoint pairing, a bridging operation is performed to generate a transition entity connecting the first entity and the second entity.

5. The method according to claim 4, characterized in that, The step of performing a bridging operation based on the selected target endpoint pairing to generate a transition entity connecting the first entity and the second entity includes: Before merging the selected target endpoint pairs, a pre-check for self-intersection conflicts is performed on the geometric elements associated with the selected target endpoint pairs. For geometric regions that still have free edges after the merging operation, degenerate bridging edges are automatically generated to complete the generation of the transition entity.

6. The method according to claim 2, characterized in that, When the target topology reconstruction strategy is the point projection ruling mode, the automatic generation of transition entities to connect the first entity and the second entity includes: The boundary sampling points of the source surface are orthogonally projected onto the target surface to obtain a set of projection points; The projection point set is fitted and corrected to eliminate irregular jitter of the projection points caused by local geometric distortion of the target surface; Based on the fitted and corrected sequence of projection point pairs, the ruled surface constituting the transition entity is constructed.

7. The method according to claim 1, characterized in that, After automatically generating the transition entity for connecting the first entity and the second entity, the method further includes: Perform a Boolean merge operation between the transition entity and the first entity and the second entity; Calculate and compare the volumes of the entities before and after the Boolean merge operation; If the volume of a newly generated entity after the Boolean merge operation differs from the volume of the original entity before the Boolean merge operation by more than a dynamic threshold, then the newly generated entity is identified as a deformed fragment and automatically deleted.

8. The method according to claim 7, characterized in that, After automatically generating the transition entity for connecting the first entity and the second entity, the method further includes: Scan the new edge lines generated after the Boolean merge operation, and detect whether there are edge lines that are associated with only a single geometric surface based on the new edge lines; If there exists an edge that is associated with only a single geometric face, then that edge is marked as a free edge indicating that the entity is not closed.

9. The method according to claim 1, characterized in that, The geometric data includes surface feature recognition. After acquiring the geometric data, the method further includes: Surface feature recognition is performed on the surfaces of the first entity and / or the second entity. Surface features with a radius of curvature less than a preset threshold are identified as non-functional decorative features, and these non-functional decorative features are removed from the candidate geometric data to obtain the geometric data.

10. An automatic repair device for solid gaps, characterized in that, The device includes: The acquisition module is used to acquire the geometric data of the gap between the first entity and the second entity in the 3D model; The determination module is used to determine the relative positional relationship of the geometric surfaces on both sides of the gap based on the geometric data, wherein the geometric surfaces on both sides of the gap include a source surface and a target surface; The selection module is used to select a target topology reconstruction strategy from a variety of predefined topology reconstruction strategies based on the relative positional relationship. A generation module is used to automatically generate a transition entity for connecting the first entity and the second entity by executing the target topology reconstruction strategy.

11. An electronic device, characterized in that, The device includes: a memory and a processor; the memory is used to store relevant program code; the processor is used to call the program code to execute the automatic repair method for physical gaps according to any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store a computer program for performing the automatic repair method for the physical gaps according to any one of claims 1 to 9.