Geometric model repairing method, device, equipment and program product
By acquiring error region images and descriptive information from the whole vehicle simulation model, and combining feature extraction and pre-trained visual language models, error repair strategies are determined and optimized. This addresses the shortcomings of rule-based repair algorithms in repairing complex geometric errors, thereby improving the success rate and accuracy of repairing the whole vehicle simulation model.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHONGQING LANDIAN AUTOMOBILE TECHNOLOGY CO LTD
- Filing Date
- 2026-03-25
- Publication Date
- 2026-07-10
AI Technical Summary
Existing rule-based repair algorithms have a low success rate in repairing complex geometric errors in vehicle simulation models, making it difficult to meet the geometric repair requirements of vehicle simulation models.
By acquiring the error region image and description information of the model to be repaired, feature extraction is performed by combining the error region image and description information to determine the matching error repair strategy. Then, a pre-trained visual language model is used to identify and repair the error type, and the repair strategy is optimized to improve the success rate.
It improves the success rate of repairing geometric errors in the whole vehicle simulation model, realizes accurate repair of complex geometric errors, and enhances the reliability and accuracy of the simulation model.
Smart Images

Figure CN121921212B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, device, and program product for repairing geometric models. Background Technology
[0002] Fluid dynamics-based simulation models are increasingly being used in vehicle design; however, these full-vehicle simulation models often contain geometric defects. Therefore, geometric error correction is typically required during the full-vehicle simulation phase.
[0003] Generally, rule-based repair algorithms can be used to correct geometric errors in vehicle simulation models. However, for complex geometric errors in vehicle simulation models, the success rate of commonly used rule-based repair algorithms is relatively low.
[0004] Therefore, improving the success rate of geometric error repair in vehicle simulation models is an urgent problem to be solved. Summary of the Invention
[0005] Based on this, this application addresses the aforementioned technical problems by providing a geometric model repair method, apparatus, device, storage medium, and program product that can improve the success rate of repairing geometric errors in a vehicle simulation model.
[0006] In a first aspect, this application provides a geometric model repair method, including:
[0007] Obtain the error region image of the target geometric error in the model to be repaired, as well as the error description information of the target geometric error;
[0008] Based on the error region image and error description information, determine the error repair strategy that matches the target geometric error;
[0009] Based on the error repair strategy, the target geometric errors are repaired.
[0010] The aforementioned geometric model repair method can analyze the geometric error features contained in the error region image based on the error region image, and analyze the geometric error features contained in the error description information based on the error description information. Therefore, by combining the error region image and the error description information, the geometric error features of the target geometric error can be analyzed more comprehensively, thereby accurately determining the error repair strategy that matches the target geometric error and improving the success rate of repairing the target geometric error.
[0011] In one embodiment, determining an error repair strategy that matches the target geometric error based on the error region image and error description information includes: determining the target error type corresponding to the target geometric error based on the error region image and error description information; and determining an error repair strategy that matches the target error type based on the target error type and the mapping relationship between each preset error type and the corresponding error repair strategy.
[0012] In this embodiment, by determining the target error type corresponding to the target geometric error, an error repair strategy matching the target geometric error can be determined more accurately based on the target error type, laying the foundation for improving the success rate of repairing the target geometric error in the future.
[0013] In one embodiment, determining the target error type corresponding to the target geometric error based on the error region image and error description information includes: performing a first feature extraction on the error region image to obtain image features; performing a second feature extraction on the error description information to obtain text features; fusing the image features and text features to obtain fused features; and determining the target error type corresponding to the target geometric error based on the fused features.
[0014] In this embodiment, by extracting the image features of the error region image and the text features of the error description information, the geometric error features of the target geometric error can be determined more comprehensively. This allows for a more accurate determination of the target error type corresponding to the target geometric error, laying the foundation for accurately determining the error repair strategy that matches the target geometric error.
[0015] In one embodiment, after repairing the target geometric error according to the error repair strategy, the geometric model repair method further includes: updating the repair success rate corresponding to the error repair strategy based on the repair result obtained from repairing the target geometric error; and updating the mapping relationship based on the updated repair success rate.
[0016] In this embodiment, by updating the mapping relationship after repairing the target geometric error, the system's repair capability can be continuously optimized, thereby continuously improving the success rate of geometric error repair.
[0017] In one embodiment, obtaining the error region image of the target geometric error in the model to be repaired includes: performing error detection on the model to be repaired to obtain the error detection result of at least one target geometric error; and for each target geometric error, taking a screenshot of the model to be repaired based on the error detection result of the target geometric error to obtain the error region image of the target geometric error.
[0018] In this embodiment, by taking a screenshot of the model to be repaired, an error region image of the target geometric error is obtained. This allows for the extraction of geometric error features of the target geometric error from the error region image, laying the foundation for accurately obtaining the error repair strategy by combining the geometric error features in the error region image with the geometric error features in the error description information.
[0019] In one embodiment, the error detection result includes the erroneous geometric entity and the location of the error region; based on the error detection result of the target geometric error, a screenshot is taken of the model to be repaired to obtain an error region image of the target geometric error, including: adjusting the currently displayed model to be repaired based on the erroneous geometric entity; and cropping the adjusted model to be repaired based on the error region location to obtain an error region image containing the geometric error features corresponding to the target geometric error.
[0020] In this embodiment, by adjusting the currently displayed model to be repaired, the error region image of the target geometric error can be obtained more accurately, laying the foundation for subsequently obtaining the geometric error features contained in the error region image and thus obtaining a more accurate target error type.
[0021] In one embodiment, acquiring an error region image of a target geometric error in a model to be repaired includes: performing error detection on the model to be repaired to obtain an error detection result for at least one reference geometric error; for each reference geometric error, performing primary repair on the reference geometric error based on the error detection result of the reference geometric error to obtain a primary repair result corresponding to the reference geometric error; if the primary repair result indicates that the preset repair requirements have not been met, taking the reference geometric error as the target geometric error and acquiring an error region image corresponding to the target geometric error.
[0022] In this embodiment, by performing preliminary repair on the reference geometric error, the workload of subsequent geometric errors to be repaired can be reduced to a certain extent, and the repair efficiency of the target geometric error can be improved to a certain extent.
[0023] Secondly, this application also provides a geometric model repair apparatus, comprising:
[0024] The acquisition module is used to acquire the error region image of the target geometric error in the model to be repaired, as well as the error description information of the target geometric error;
[0025] The determination module is used to determine an error repair strategy that matches the target geometric error based on the error region image and the error description information;
[0026] The repair module is used to repair the target geometric error according to the error repair strategy.
[0027] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method described above.
[0028] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described above.
[0029] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the method described in any of the above aspects.
[0030] Regarding the beneficial effects of any of the technical solutions in the second to fifth aspects mentioned above, refer to the beneficial effects of the corresponding technical solutions in the first aspect; repeated examples will not be listed here. Attached Figure Description
[0031] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0032] Figure 1 This is a schematic diagram illustrating an optional application environment for a geometric model repair method in one embodiment.
[0033] Figure 2 This is a schematic diagram of an optional process for a geometric model repair method in one embodiment;
[0034] Figure 3 This is a schematic diagram of an optional flowchart for determining the error repair strategy in one embodiment;
[0035] Figure 4 This is a schematic diagram of an optional flowchart for the step of obtaining the error region image in one embodiment;
[0036] Figure 5 This is an optional flowchart illustrating the error region image acquisition step in another embodiment;
[0037] Figure 6 This is a schematic diagram of an optional process for a geometric model repair method in another embodiment;
[0038] Figure 7 This is a schematic diagram of an optional process for a geometric model repair method in yet another embodiment;
[0039] Figure 8 This is a schematic diagram of an optional structure of a geometric model repair device in one embodiment;
[0040] Figure 9 This is a schematic diagram of an optional internal structure of a computer device in one embodiment. Detailed Implementation
[0041] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of this application.
[0042] The terms “first,” “second,” etc., used in this application may be used to describe various elements, but these elements are not limited by these terms. These terms are used only to distinguish the first element from the second element. The terms “comprising” and “having,” and any variations thereof, used in this application, are intended to cover non-exclusive inclusion.
[0043] The geometric model repair method provided in this application can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or located on the cloud or other network servers. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, drones, low-altitude aircraft, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, projection devices, etc. Portable wearable devices can include smartwatches, smart bracelets, head-mounted devices, etc. Head-mounted devices can be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. Server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0044] In one exemplary embodiment, such as Figure 2 As shown, a geometric model repair method is provided, which can be applied to... Figure 1 Taking the server in the example, the following steps are included:
[0045] S210, Obtain the error region image of the target geometric error in the model to be repaired, as well as the error description information of the target geometric error.
[0046] Here, the model to be repaired can be understood as the geometric model to be repaired. Optionally, the model to be repaired can be a three-dimensional geometric model to be repaired. For example, the model to be repaired can be a three-dimensional computer-aided design (CAD) model of the whole vehicle to be repaired.
[0047] In some embodiments, the model to be repaired may be a geometric model that has already undergone preliminary repair of the original geometric model and is awaiting further repair. For example, the model to be repaired may be a geometric model that has undergone preliminary repair of the original geometric model using Advanced Numerical Simulation Analysis (ANSA) software during the Computational Fluid Dynamics (CFD) simulation stage or the Computer Aided Engineering (CAE) processing stage and is awaiting further repair.
[0048] In some embodiments, the model to be repaired may also be an unrepaired geometric model.
[0049] Among them, the target geometric error can be understood as a relatively complex, semantically related geometric error in the model to be repaired that is difficult to be completely repaired by the regularization algorithm of ANSA software.
[0050] In this context, the error region image can be understood as a region image containing the geometric error features of the target geometric error.
[0051] In some embodiments, a screenshot can be taken of the error region corresponding to the target geometric error to obtain an image of the error region.
[0052] Error description information can be understood as linguistic information used to describe the geometric error characteristics of the target geometric error.
[0053] In some embodiments, error detection can be performed on the model to be repaired to obtain the error detection result of the target geometric error.
[0054] In some embodiments, the error description information may be determined based on error detection results. The error description information may include at least one of the following: initial error type, error severity type, error code, error geometry, error number, error cause, error region location, and repair method. The initial error type can be a rough error type obtained by using the error detection interface in the ANSA software to detect errors in the model to be repaired. For example, the initial error type can include gaps, overlaps, free edges, non-manifold edges, normal errors, microfacets, narrow faces, broken surfaces (Sliver or Bad Surface), open volumes, etc. The error severity type can include a first type and a second type, where the first type can be an Error type and the second type can be a Warning type. The error type has a higher severity than the Warning type. In specific implementations, the repair is mainly aimed at geometric errors of the Error type. The error code can be understood as a code used to characterize the error type. The error geometric entity can include the face, line, or point corresponding to the target geometric error. The error number can be understood as an identifier used to distinguish the target geometric error. The error cause can be understood as the reason for the occurrence of the target geometric error. The error region location can be understood as the three-dimensional coordinate information of the target geometric error in the model to be repaired. The repair method can include automatic repair using the repair interface in the ANSA software, repair using a determined error repair strategy, etc.
[0055] S220, based on the error region image and error description information, determine an error repair strategy that matches the target geometric error.
[0056] The error region image and error description information contain geometric error features of the target geometric error. Therefore, based on the error region image and error description information, an error repair strategy matching the geometric error features of the target geometric error can be determined. Thus, the target geometric error can be repaired using the determined error repair strategy.
[0057] S230, Repair the target geometric error according to the error repair strategy.
[0058] In some embodiments, a repair interface call instruction can be determined according to the error repair strategy, and the corresponding second error repair interface can be called through the repair interface call instruction to perform a repair operation on the target geometric error.
[0059] In some embodiments, when the error repair strategy matching the target geometric error includes at least one, the repair success rate corresponding to each error repair strategy can be obtained, the repair order can be determined according to the repair success rate, and the target geometric error can be repaired according to the repair order.
[0060] In some embodiments, for each target geometric error, after the target geometric error is successfully repaired, the display mode of the error area corresponding to the target geometric error in the model to be repaired can be updated, such as canceling the highlighting of the error area, to prompt the user that the target geometric error has been successfully repaired.
[0061] The aforementioned geometric model repair method can analyze the geometric error features contained in the error region image based on the error region image, and analyze the geometric error features contained in the error description information based on the error description information. Therefore, by combining the error region image and the error description information, the geometric error features of the target geometric error can be analyzed more comprehensively, thereby accurately determining the error repair strategy that matches the target geometric error and improving the success rate of repairing the target geometric error.
[0062] Based on the technical solutions of the above embodiments, this application also provides another optional embodiment, in which the steps for determining the error repair strategy are refined.
[0063] See Figure 3 The error repair strategy determination steps shown include:
[0064] S310, Based on the error region image and error description information, determine the target error type corresponding to the target geometric error.
[0065] The target error type can be understood as a more refined error type compared to the initial error type.
[0066] In some embodiments, a first feature extraction can be performed on the error region image to obtain the image features corresponding to the error region image; a second feature extraction can be performed on the error description information to obtain the text features corresponding to the error description information; then the image features and text features are fused to obtain fused features; finally, the target error type corresponding to the target geometric error is determined based on the fused features.
[0067] The process involves first feature extraction on the error region image to obtain image features corresponding to the error region image. This involves extracting information describing the geometric error attributes of the target, such as shape, texture, color, and spatial relationships, while reducing data dimensionality, removing redundant information, and retaining image features that characterize the error type. In some embodiments, the error region image may undergo preprocessing such as normalization (adjusting image size, brightness, contrast, etc.), filtering and denoising, and edge enhancement. In some embodiments, during the first feature extraction process to obtain the image features corresponding to the error region image, feature detection can be performed to locate feature points or feature regions with significant characteristics. The detected feature points or feature regions can then be converted into feature vectors. Next, the feature vectors can be dimensionality reduced to retain the main feature information. Then, the dimensionality-reduced feature vectors can be normalized. Finally, image features characterizing the error type can be selected from the normalized feature vectors.
[0068] In this process, a second feature extraction is performed on the error description information to obtain the corresponding text features. This involves converting the unstructured, text-based error description information into a structured, computable feature vector, capturing the semantic features that characterize the error type. In some embodiments, the error description information can be preprocessed to standardize the data format and reduce noise. In some embodiments, during the second feature extraction to obtain the corresponding text features, the feature words in the error description information can be represented as feature vectors. Then, the feature vectors are dimensionality-reduced to retain the main feature information. The dimensionality-reduced feature vectors are then normalized. Finally, the normalized feature vectors are weighted to obtain the semantic features that characterize the error type.
[0069] The fusion feature can be understood as a new feature vector obtained based on image features and text features. The fusion feature integrates the visual information corresponding to the image and the semantic information corresponding to the text, and includes the association between the image and the text. In some embodiments, the image features and text features can be uniformly encoded to obtain features of a uniform dimension. In some embodiments, the image features and text features can be concatenated along their dimensions to obtain the concatenated fusion feature. In some embodiments, the image features and text features can also be dot-producted to obtain the concatenated fusion feature.
[0070] In some embodiments, the error region image and error description information can be input into an open-source pre-trained visual-language model (VLM) embedded in ANSA software, and the target error type corresponding to the target geometric error can be determined using the open-source pre-trained visual-language model embedded in ANSA software.
[0071] In the above embodiments, by extracting the image features of the error region image and the text features of the error description information, the geometric error features of the target geometric error can be determined more comprehensively. This allows for a more accurate determination of the target error type corresponding to the target geometric error, laying the foundation for accurately determining the error repair strategy that matches the target geometric error.
[0072] S320, based on the target error type and the mapping relationship between each preset error type and the corresponding error repair strategy, determine the error repair strategy that matches the target error type.
[0073] In some embodiments, an open-source pre-trained visual language model embedded in ANSA software can be used to determine an error repair strategy matching the target error type based on the target error type and the mapping relationship between each preset error type and its corresponding error repair strategy. By leveraging the mapping relationship between each preset error type and its corresponding error repair strategy, an error repair strategy matching the target error type can be determined relatively quickly, thereby enabling timely repair of the target geometric error.
[0074] The mapping relationship between each preset error type and its corresponding error repair strategy can be predefined. In some embodiments, each preset error type may correspond to at least one error repair strategy. For example, when the preset error type is a face error, the corresponding error repair strategy may be to separate intersecting facets using Boolean operations or a mesh cutting tool, or to enable an automatic intersection repair algorithm.
[0075] In this embodiment, by determining the target error type corresponding to the target geometric error, an error repair strategy matching the target geometric error can be determined more accurately based on the target error type, laying the foundation for improving the success rate of repairing the target geometric error in the future.
[0076] In some embodiments, at least one candidate error repair strategy matching the target error type corresponding to the target geometric error can be determined; the repair success rate corresponding to each candidate error repair strategy can be obtained; and an error repair strategy with a repair success rate greater than a preset success rate threshold can be selected from each candidate error repair strategy as the error repair strategy matching the target error type.
[0077] To improve the success rate of repairing geometric models, in some embodiments, after repairing the target geometric error according to the error repair strategy, the repair success rate corresponding to the error repair strategy is updated based on the repair result obtained from repairing the target geometric error; and the mapping relationship is updated based on the updated repair success rate.
[0078] In some embodiments, the repair result may include the confidence level of the repair of the target geometric error. In some embodiments, the repair result may include a successful repair result or a failed repair result for the target geometric error.
[0079] In some embodiments, the repair success rate corresponding to the error repair strategy can be updated based on the repair results of the target geometric error using the current error repair strategy and the repair results of historical geometric errors using the same error repair strategy.
[0080] In some embodiments, for each preset error type, the recommended priority of each error repair strategy can be updated based on the repair success rate corresponding to each error repair strategy under that preset error type, thereby updating the mapping relationship. Specifically, for any error repair strategy under each preset error type, the higher the recommended priority of that error repair strategy, the earlier its recommended order. By updating the mapping relationship after repairing the target geometric error, continuous optimization of the system's repair capabilities can be achieved, thereby continuously improving the success rate of geometric error repair.
[0081] Based on the technical solutions of the above embodiments, this application also provides another optional embodiment, in which the steps for obtaining the error region image are refined.
[0082] See Figure 4 The steps for obtaining the error region image shown include:
[0083] S410, perform error detection on the model to be repaired to obtain error detection results for at least one target geometric error.
[0084] The error detection result may include at least one of the following: the initial error type, the error geometric entity, and the location of the error region.
[0085] In some embodiments, the error detection interface in ANSA can be used to perform error detection on the model to be repaired, and obtain error detection results for at least one target geometric error.
[0086] S420: For each target geometric error, based on the error detection results of the target geometric error, a screenshot of the model to be repaired is taken to obtain the error region image of the target geometric error.
[0087] In some embodiments, the error region image can be obtained using the image acquisition interface in the ANSA software. For example, the screenshot interface in the ANSA software can be used to take a screenshot of the error region corresponding to the target geometric error to obtain the error region image.
[0088] In some embodiments, the error detection results can be refined into error geometric entities and error region locations. Accordingly, the currently displayed model to be repaired can be adjusted based on the error geometric entities; and the adjusted model to be repaired can be cropped based on the error region locations to obtain an error region image containing the geometric error features corresponding to the target geometric error.
[0089] In some embodiments, ANSA software can be used to display the model to be repaired. Based on the erroneous geometric entity, the display view, scaling ratio, and display mode of the currently displayed model to be repaired can be adjusted. In some embodiments, at least one of the following display views of the currently displayed model to be repaired can be adjusted: Top View, Front View, Back View, Right View, Left View, and Isometric View. In some embodiments, for smaller geometric errors, such as points or short line entities, the display scale of the model to be repaired can be enlarged. In some embodiments, a first display mode can be used to display the error area, and a second display mode can be used to display the neighboring area of the error area. For example, the display parameters corresponding to the first display mode and the display parameters corresponding to the second display module can be different, where the display parameters may include at least one of display brightness, display color, etc. By displaying the error area and its neighboring area based on different display parameters, the error area and the neighboring area can be intuitively divided, and the error area can be accurately and quickly located, achieving precise screenshots of the error area.
[0090] In some embodiments, the screenshot interface in ANSA software can be used to crop images of the adjusted model to be repaired. In some embodiments, to improve the accuracy of the error repair strategy, images of the error region of the model to be repaired from at least one display viewpoint can be cropped. Especially in the process of determining the target error type corresponding to the target geometric error using an open-source pre-trained visual language model embedded in ANSA software, cropping images of the error region of the model to be repaired from at least one display viewpoint can improve the understanding ability of the open-source pre-trained visual language model embedded in ANSA software to the error region image, thereby obtaining a more accurate target error type and laying the foundation for obtaining a more accurate error repair strategy.
[0091] Based on the technical solutions of the above embodiments, this application also provides another optional embodiment, in which the steps for obtaining the error region image are refined.
[0092] See Figure 5 The steps for obtaining the error region image shown include:
[0093] S510, perform error detection on the model to be repaired, and obtain error detection results for at least one reference geometric error.
[0094] The reference geometric error can include any geometric error present in the model to be repaired. The reference geometric error can include relatively simple geometric errors that can be completely repaired using the rule-based algorithms of ANSA software, as well as more complex, semantically related geometric errors that are difficult to completely repair using the rule-based algorithms of ANSA software.
[0095] In some embodiments, the error detection interface in ANSA can be used to perform error detection on the model to be repaired, and obtain error detection results for at least one reference geometric error.
[0096] S520: For each reference geometry error, perform primary repair on the reference geometry error based on the error detection result, and obtain the primary repair result corresponding to the reference geometry error.
[0097] In some embodiments, the first error repair interface in ANSA can be used to perform preliminary repair on reference geometry errors, obtaining a preliminary repair result corresponding to the reference geometry errors. The first error repair interface can be understood as an interface encapsulating a preset rule-based repair algorithm, which can quickly repair reference geometry errors according to the preset rule-based repair algorithm. Generally, the preset rule-based repair algorithm can successfully repair relatively simple reference geometry errors, but it cannot successfully repair more complex, semantically related reference geometry errors, or the repair confidence level cannot reach the preset confidence level. In some embodiments, the initial repair result may include the repair confidence level. In some embodiments, the initial repair result may include repair success or repair failure.
[0098] S530: If the initial repair result indicates that the preset repair requirements have not been met, the reference geometric error is used as the target geometric error, and the error area image corresponding to the target geometric error is obtained.
[0099] In some embodiments, the preset repair requirements may include a preset confidence level or a repair result indicating successful repair. In some embodiments, a primary repair result indicating that the preset repair requirements have not been met may include a repair confidence level that cannot reach the preset confidence level. In some embodiments, a primary repair result indicating that the preset repair requirements have not been met may include a repair result indicating repair failure.
[0100] In some embodiments, the process of obtaining the error region image corresponding to the target geometric error can refer to the steps of S420 described above, and will not be repeated here.
[0101] In this embodiment, by performing preliminary repair on the reference geometric error, the workload of subsequent geometric errors to be repaired can be reduced to a certain extent, and the repair efficiency of the target geometric error can be improved to a certain extent.
[0102] Based on the technical solutions of the above embodiments, this application also provides another optional embodiment, in which the geometric model repair method is described in detail.
[0103] See Figure 6 The geometric model repair method shown includes:
[0104] S601, perform error detection on the model to be repaired, and obtain error detection results for at least one reference geometric error.
[0105] The error detection results can include the erroneous geometric entity, the location of the erroneous region, and the error description information.
[0106] S602, for each reference geometry error, perform primary repair on the reference geometry error based on the error detection result of the reference geometry error, and obtain the primary repair result corresponding to the reference geometry error.
[0107] S603, if the primary repair result indicates that the preset repair requirements have not been met, the reference geometric error will be used as the target geometric error.
[0108] S604, for each target geometric error, adjust the currently displayed model to be repaired based on the erroneous geometric entity of the target geometric error.
[0109] S605, based on the location of the error region, perform image cropping on the adjusted model to be repaired to obtain an error region image containing the geometric error features corresponding to the target geometric error.
[0110] S606, perform the first feature extraction on the image of the erroneous region to obtain image features.
[0111] S607, perform second feature extraction on the error description information to obtain text features.
[0112] S608 fuses image features and text features to obtain fused features.
[0113] S609, Based on the fusion features, determine the target error type corresponding to the target geometric error.
[0114] S610, based on the target error type and the mapping relationship between each preset error type and the corresponding error repair strategy, determine the error repair strategy that matches the target error type.
[0115] S611, Repair the target geometry error according to the error repair strategy.
[0116] In one exemplary embodiment, such as Figure 7 As shown, a method for geometric model repair is provided. Figure 7 The geometric model repair method shown can utilize ANSA software embedded in an open-source pre-trained visual language model to perform geometric repair on the model to be repaired. The model to be repaired can be an unrepaired geometric model.
[0117] In the aforementioned geometric model repair method, the model to be repaired (which can be in formats such as Standard for the Exchange of Product Model Data (STEP) or Initial Graphics Exchange Specification (IGES)) can be imported into the ANSA software processing environment to complete the topology construction and basic geometric analysis of the model to be repaired. Then, the built-in error detection interface `ansa.base.CheckAndFixGeometry()` in the ANSA software can be called to perform various geometric error checks on the model to be repaired, including free edges, overlapping surfaces, non-manifold edges, unclosed volumes, normal errors, and microfacets, and to determine whether a first type of reference geometric error exists. The first type can be of type `Error`, and the second type can be of type `Warring`, with the severity of `Error` errors being higher than that of `Warring` errors.
[0118] If no Type I reference geometry error exists, the process ends.
[0119] If a first-type reference geometry error exists, the error detection result of the reference geometry error is output. The error detection result of each reference geometry error may include information such as the preliminary error type (e.g., free edge, overlap, etc.), the erroneous geometric entity (face, line, or point), and the error spatial location (e.g., the range of three-dimensional coordinates).
[0120] Then, the first error repair interface in the ANSA software's error repair module can be called to perform geometric repair on the reference geometric errors using a rule-based algorithm. This first error repair interface can encapsulate repair functions for simpler geometric errors. Finally, it is determined whether the repair is complete.
[0121] If the repair is complete, the result process will proceed.
[0122] If the repair is incomplete, the reference geometric error can be used as the target geometric error. Based on the error detection results of the target geometric error, the `ansa.base.GetEntity()` function is used to extract the entity (face, line, or point) of the target geometric error entity based on its identifier. This automatically locates the corresponding 3D geometric region. The 3D visualization and screenshot module is then used to adjust the viewpoint, scaling, and display mode of the model to be repaired. Finally, the screenshot interface in the 3D visualization and screenshot module can be used to capture a screenshot of the adjusted model to obtain the error region image corresponding to the target geometric error. Here, "incomplete repair" indicates that the first error repair interface failed to repair the reference geometric error or that the repair confidence level could not reach the preset confidence level.
[0123] Then, the error region image corresponding to the target geometric error and the error description information of the target geometric error output by the error detection module can be input into the open-source pre-trained visual language model embedded in ANSA software. The model performs inference on the error region image and error description information to obtain the target error type corresponding to the target geometric error. Then, based on the target error type and the mapping relationship between each preset error type and corresponding error repair strategy stored in the error repair strategy knowledge base, the open-source pre-trained visual language model outputs the target error type, the cause of the target geometric error, and the error repair strategy matching the target geometric error. For example, if the target error type of the target geometric error is a surface error, the error repair strategy could be to use Boolean operations or mesh cutting tools to separate intersecting surfaces or to enable an automatic intersection repair algorithm. The error description information can be determined based on the error detection results.
[0124] The error correction strategy can then be input into the function call module. The function call module converts the error correction strategy into executable, predefined function call instructions, generating corresponding function names and parameter sets. Through the function calling mechanism, it invokes the second error correction interface corresponding to the error correction strategy based on the function call instructions to perform geometric correction operations on the target geometric error. The second error correction interface can encapsulate correction functions for more complex geometric errors. The function call module supports multiple combinations of correction functions and adaptive parameter adjustment, enabling continuous operation of multiple geometric correction operations to complete the correction of the target geometric error. A geometric check can be re-performed on the corrected model; if errors still exist, the next round of the correction process begins.
[0125] The error repair strategy knowledge base stores image features of each geometric error, preset error types, repair function combinations, repair results of each historical geometric repair, and repair result evaluation information, as well as the mapping relationship between each preset error type and the corresponding error repair strategy. The error repair strategy knowledge base is automatically updated after each repair process. It is used to update the repair success rate corresponding to the error repair strategy based on the repair results obtained from repairing the target geometric error; and to update the mapping relationship based on the updated repair success rate.
[0126] For example, an open-source pre-trained visual language model can be the Qwen3-VL-30B-Instruct model. The Qwen3-VL-30B-Instruct model has approximately 30 billion parameters, with about 3 billion actual activation parameters; it includes 16 MoEs (Mixture of Experts), with two MoEs dynamically activated at each layer. The Qwen3-VL-30B-Instruct model mainly includes a Vision Encoder, a Language Model, and a multimodal interaction module.
[0127] The visual encoder includes ViT (Vision Transformer) and a DeepStack feature fusion layer. ViT segments the input error region image into 3D (time × width × height) patch images through a Conv3D patch embedding layer, and extracts features from these 3D patch images using convolution operations to obtain an initial feature vector. The 3D patch image size is 2 × 16 × 16; the output feature dimension of ViT is 1152. The DeepStack feature fusion layer extracts features from the initial feature vector using a shallow encoder to obtain 4608-dimensional shallow features (edge / texture features), extracts features from the shallow features using a mid-level encoder to obtain 2048-dimensional mid-level features (structural features), and extracts features from the mid-level features using a deep encoder to obtain 2048-dimensional deep features (semantic features). It then fuses the features of each layer using weights assigned to each layer to obtain the visual features. The language model has a hidden layer dimension of 2048 dimensions and 32 attention heads, meaning each attention head is 64-dimensional. The MoE routing threshold is 2 (i.e., two MoEs are selected per layer). The language model includes an input embedding layer and 48 Transformer decoder layers. The input embedding layer maps discrete text tokens (such as words or phrases) into fixed-dimensional vectors. Learnable positional embeddings are added to these fixed-dimensional vectors to preserve sequence order information, resulting in the input vector. Each Transformer decoder layer includes a self-attention layer and a feedforward network. The self-attention layer projects the input vector into three different spaces through a linear transformation: query, key, and value. The similarity between the query and key is calculated to determine the contribution weight of each token to the current token. Then, for each token, the corresponding value vector is weighted and summed based on the contribution weights of each token, resulting in the context vector of that token. The feedforward network performs a non-linear transformation on the context vector, yielding the non-linearly transformed context vector, i.e., the text features.
[0128] The multimodal interaction module features a frequency base of 10,000 for its Multi-dimensional Rotary Position Embedding (MRoPE) encoding; a text-timestamp alignment error of less than 0.3 seconds; a maximum inference context length of 256,000 tokens, expandable to 1M; a maximum concurrent sequence count of 8; and a swap space size of 16 gigabytes. The multimodal interaction module includes a multimodal encoder, a cross-modal attention layer, and a multimodal encoder. The multimodal encoder unifies the encoding of visual features output from the visual encoder and text features output from the language model, resulting in unified-dimensional visual and text features. The cross-modal attention layer uses visual features as queries and text features as keys / values to generate visually perceived text representations, and vice versa, generating text-perceived visual representations. These visually perceived text representations and text-perceived visual representations are then fused to obtain fused features. Based on these fused features, the multimodal encoder determines the target error type corresponding to the target geometric error.
[0129] In some embodiments, an open-source pre-trained visual language model can be trained according to the following steps:
[0130] 1) Obtain the sample error region image and sample error description information corresponding to at least one reference geometric error.
[0131] 2) Input the sample error region image and sample error description information corresponding to each reference geometric error into the visual language model to be trained. The visual encoder in the visual language model first uses the Conv3D patch embedding layer to segment the sample error region image corresponding to each input reference geometric error into sample 3D patch images, and performs feature extraction on the sample 3D patch images through convolution operation to obtain the initial feature vector of the sample. Then, the DeepStack feature fusion layer is used to extract the shallow features, middle features and deep features in the initial feature vector of the sample, and the features of the corresponding layers are fused by weights assigned to the features of each layer to obtain the sample visual features, and the sample visual features are input into the multimodal interaction module in the visual language model.
[0132] 3) In the visual language model, the language model maps the discrete text tokens in the sample error description information corresponding to each reference geometric error to a fixed-dimensional vector, and adds learnable positional embeddings to the fixed-dimensional vector to obtain the sample input vector. Then, the self-attention layers in each Transformer decoder layer project the sample input vector into three different spaces, namely Query, Key, and Value, through linear transformation. By calculating the similarity between Query and Key, the contribution weight of each token to the current token is obtained. Then, for each token, the value vector corresponding to the token is weighted and summed according to the contribution weight of each token to the token to obtain the sample context vector of the token. The feedforward network performs a nonlinear transformation on the sample context vector to obtain the nonlinearly transformed sample context vector, i.e., the sample text features, and inputs the sample text features into the multimodal interaction module in the visual language model.
[0133] 4) In the visual language model, the multimodal interaction module uses a multimodal encoder to uniformly encode the sample visual features and sample text features corresponding to each reference geometric error, resulting in sample visual features and sample text features of a unified dimension. Then, using a cross-modal attention layer, the sample visual features can be used as the query and the sample text features as the key / value to generate a visually perceived text representation, and the sample text features can be used as the query and the sample visual features as the key / value to generate a text-aware visual representation. The visually perceived text representation and the text-aware visual representation are then fused to obtain sample fusion features. Finally, the multimodal encoder uses these fusion features to obtain the prediction error type corresponding to the reference geometric error.
[0134] 5) For each reference geometric error, the visual features and text features of the sample corresponding to the reference geometric error are taken as positive samples, and the visual features of the sample corresponding to the reference geometric error and the text features of the sample corresponding to other reference geometric errors are taken as negative samples. The similarity between the positive and negative samples is determined. Based on the similarity corresponding to each reference geometric error, a contrast loss is constructed. Based on the contrast loss, the parameters of the visual language model are tuned to obtain the trained visual language model.
[0135] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.
[0136] Based on the same inventive concept, this application also provides a geometric model repair apparatus for implementing the geometric model repair method described above. The solution provided by this apparatus is similar to the solution described in the above method; therefore, the specific limitations in one or more geometric model repair apparatus embodiments provided below can be found in the limitations of the geometric model repair method described above, and will not be repeated here.
[0137] In one exemplary embodiment, such as Figure 8 As shown, a geometric model repair device is provided, including: an acquisition module 810, a determination module 820, and a repair module 830, wherein:
[0138] The acquisition module 810 is used to acquire the error region image of the target geometric error in the model to be repaired, as well as the error description information of the target geometric error;
[0139] The determination module 820 is used to determine an error repair strategy that matches the target geometric error based on the error region image and the error description information;
[0140] The repair module 830 is used to repair the target geometric error according to the error repair strategy.
[0141] In one embodiment, the determining module 820 includes: a first determining unit, configured to determine the target error type corresponding to the target geometric error based on the error region image and error description information; and a second determining unit, configured to determine an error repair strategy matching the target error type based on the target error type and the mapping relationship between each preset error type and the corresponding error repair strategy.
[0142] In one embodiment, the first determining unit is specifically configured to: extract a first feature from the error region image to obtain image features; extract a second feature from the error description information to obtain text features; fuse the image features and text features to obtain fused features; and determine the target error type corresponding to the target geometric error based on the fused features.
[0143] In one embodiment, after the target geometric error is repaired according to the error repair strategy, the geometric model repair device further includes: a first update module, used to update the repair success rate corresponding to the error repair strategy according to the repair result obtained from repairing the target geometric error; and a second update module, used to update the mapping relationship according to the updated repair success rate.
[0144] In one embodiment, the acquisition module 810 includes: a first detection unit, used to perform error detection on the model to be repaired to obtain an error detection result of at least one target geometric error; and a screenshot unit, used to take a screenshot of the model to be repaired for each target geometric error based on the error detection result of the target geometric error to obtain an error region image of the target geometric error.
[0145] In one embodiment, the screenshot unit is specifically used to: adjust the currently displayed model to be repaired based on the erroneous geometric entity; and perform image cropping on the adjusted model to be repaired based on the location of the erroneous region to obtain an erroneous region image containing the geometric error features corresponding to the target geometric error.
[0146] In one embodiment, the acquisition module 810 includes: a second detection unit, configured to perform error detection on the model to be repaired, and obtain error detection results for at least one reference geometric error; a repair unit, configured to perform primary repair on each reference geometric error based on the error detection results of the reference geometric error, and obtain a primary repair result corresponding to the reference geometric error; and an acquisition unit, configured to, when the primary repair result indicates that the preset repair requirements have not been met, take the reference geometric error as the target geometric error and acquire the error region image corresponding to the target geometric error.
[0147] Each module in the aforementioned geometric model repair device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0148] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 9As shown, this computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores the mapping relationship between preset error types and corresponding error repair strategies. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When executed by the processor, the computer program implements a geometric model repair method.
[0149] Those skilled in the art will understand that Figure 9 The structure shown is a block diagram of a partial structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.
[0150] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0151] In one exemplary embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above-described method embodiments.
[0152] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0153] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program mentioned can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0154] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0155] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for repairing a geometric model, characterized in that, The method includes: Error detection is performed on the model to be repaired to obtain error detection results for at least one reference geometric error; For each of the aforementioned reference geometry errors, a preliminary repair is performed on the reference geometry error based on the error detection result of the reference geometry error, thereby obtaining the preliminary repair result corresponding to the reference geometry error; If the initial repair result indicates that the preset repair requirements have not been met, the reference geometric error will be used as the target geometric error. For each target geometric error, based on the error detection result of the target geometric error, a screenshot of the model to be repaired is taken to obtain the error region image of the target geometric error; Obtain error description information of the target geometric error; the error description information is determined based on the error detection results of the target geometric error; The first feature extraction is performed on the image of the error region to obtain image features; the second feature extraction is performed on the error description information to obtain text features; the image features and the text features are fused to obtain fused features; and the target error type corresponding to the target geometric error is determined based on the fused features. Based on the target error type and the mapping relationship between each preset error type and the corresponding error repair strategy, determine the error repair strategy that matches the target error type; The target geometric error is repaired according to the error repair strategy.
2. The method according to claim 1, characterized in that, After repairing the target geometric error according to the error repair strategy, the method further includes: Based on the repair results obtained from repairing the target geometric error, update the repair success rate corresponding to the error repair strategy; The mapping relationship is updated based on the updated repair success rate.
3. The method according to claim 1, characterized in that, The error detection result includes the location of the erroneous geometric entity and the error region; based on the error detection result of the target geometric error, a screenshot is taken of the model to be repaired to obtain an image of the error region of the target geometric error, including: Adjust the currently displayed model to be repaired based on the erroneous geometric entity; Based on the location of the error region, the adjusted model to be repaired is cropped to obtain an error region image containing the geometric error features corresponding to the target geometric error.
4. The method according to claim 3, characterized in that, Based on the erroneous geometric entity, adjust the currently displayed model to be repaired, including: Based on the erroneous geometric entity, adjust at least one display perspective of the currently displayed model to be repaired; Image cropping is performed on the adjusted model to be repaired, including: Capture the image of the error area of the model to be repaired from at least one display viewpoint.
5. The method according to any one of claims 1 to 4, characterized in that, The error correction strategy includes at least one; according to the error correction strategy, the target geometric error is corrected, including: Obtain the success rate of each error repair strategy; Based on the repair success rate, determine the repair order for repairing the target geometric error; The target geometric error is repaired according to the repair order.
6. The method according to any one of claims 1 to 4, characterized in that, Determining an error remediation strategy that matches the target error type includes: Identify at least one candidate error repair strategy that matches the target error type; Obtain the success rate of each candidate error repair strategy; From the candidate error repair strategies, select the error repair strategy with a repair success rate greater than a preset success rate threshold as the error repair strategy that matches the target error type.
7. The method according to any one of claims 1 to 4, characterized in that, The method further includes: For each target geometric error, after the target geometric error is successfully repaired, the display mode of the error area corresponding to the target geometric error in the model to be repaired is updated.
8. A geometric model repair device, characterized in that, The device includes: An acquisition module is used to perform error detection on the model to be repaired, and obtain error detection results for at least one reference geometric error; for each reference geometric error, based on the error detection results of the reference geometric error, perform primary repair on the reference geometric error, and obtain a primary repair result corresponding to the reference geometric error; if the primary repair result indicates that the preset repair requirements are not met, the reference geometric error is taken as a target geometric error; for each target geometric error, based on the error detection results of the target geometric error, a screenshot of the model to be repaired is taken to obtain an error region image of the target geometric error, and error description information of the target geometric error is obtained; the error description information is determined based on the error detection results of the target geometric error; The determination module is used to perform a first feature extraction on the error region image to obtain image features; perform a second feature extraction on the error description information to obtain text features; fuse the image features and the text features to obtain fused features; determine the target error type corresponding to the target geometric error based on the fused features; and determine the error repair strategy matching the target error type based on the target error type and the mapping relationship between each preset error type and the corresponding error repair strategy. The repair module is used to repair the target geometric error according to the error repair strategy.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
CN117830162A