Feature updating method and device based on geometric matching and computer equipment
Through the feature update method based on geometric matching, the model generation failure caused by feature execution failure in CAD software is solved, and the final repair of the model and the improvement of construction efficiency are achieved.
Patent Information
- Application Number
- CN202411939677.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-03-21
AI Technical Summary
In CAD software, failure to execute features leads to program errors during the model establishment process, which cannot be redefined or regenerated, resulting in failure to generate the model and needs to be manually repaired, which reduces the efficiency of model construction.
Provide a feature update method based on geometric matching. By obtaining the reconstruction model, matching the target geometric object and generating permanent naming, updating the permanent naming of the target geometric object in subsequent features, and re-executing the three-dimensional model construction task.
The feature repair efficiency and model construction efficiency are improved, the final repair of the model is realized, the normal execution of subsequent features is ensured, and the design process is optimized.
Smart Images

Figure CN119670178A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of computer-aided design, and in particular to a feature updating method, device and computer equipment based on geometric matching. Background Art
[0002] During the operation of CAD (Computer Aided Design) software, models are established in a certain order through various feature operations. However, the graphic design process has a huge amount of data and many operations, and it is inevitable that program errors such as feature execution failure will occur, resulting in the failure of feature execution at a certain step in the model building process and the inability to redefine or regenerate. For example, calculation errors. When performing an operation of sweeping along a curve, the software may lose floating point precision in calculating the sweep path, resulting in cumulative errors and resulting in errors in the generated geometry; for another example, insufficient memory leads to program errors. When trying to create a complex multi-layer cutting feature, the program may fail to complete the operation due to insufficient memory.
[0003] If a feature at a certain step in the history tree cannot be redefined or regenerated, the subsequent features that depend on the erroneous feature will also fail, making the history tree unable to be fully executed, resulting in model generation failure. At this time, the features need to be manually repaired step by step, reducing the efficiency of model construction. Summary of the invention
[0004] Based on this, it is necessary to provide a feature updating method, device, computer equipment, computer-readable storage medium and computer program product based on geometric matching that can improve the efficiency of feature repair and model building in order to address the above technical problems.
[0005] In a first aspect, an embodiment of the present application provides a feature updating method based on geometric matching. The method comprises:
[0006] In the case where there is an error feature in the three-dimensional model construction task, a reconstructed model is obtained; the error feature is a feature of abnormal execution result, and the reconstructed model is a model that the error feature intends to construct but fails to construct;
[0007] Obtaining a target geometric object from the reconstructed model by matching, and generating a permanent name for the target geometric object; the target geometric object is a geometric object in the reconstructed model that is consistent with a reference object of the erroneous feature;
[0008] Based on the generated permanent name, the permanent name of the target geometric object in the subsequent feature is updated to obtain an updated feature; the subsequent feature is a feature whose execution order is after the erroneous feature in the history tree where the erroneous feature is located, and the updated feature is used to re-execute the three-dimensional model construction task.
[0009] In one embodiment, before the step of matching and obtaining the target geometric object from the reconstructed model, the method further includes:
[0010] In the case where any feature reference in the three-dimensional model building task has geometric information, the geometric information of the reference is recorded as the target geometric information;
[0011] The target geometric information is used to match and obtain the target geometric object from the reconstructed model.
[0012] In one embodiment, the step of matching and obtaining a target geometric object from the reconstructed model includes:
[0013] Determine the target geometric information corresponding to the erroneous feature from the target geometric information;
[0014] Based on the target geometric information corresponding to the erroneous feature, matching is performed in the reconstructed model to obtain a geometric object consistent with the reference object of the erroneous feature;
[0015] A geometric object that is consistent with the reference object of the erroneous feature is used as the target geometric object.
[0016] In one embodiment, matching the target geometric information corresponding to the erroneous feature in the reconstructed model includes:
[0017] Identifying the geometry type of the erroneous feature reference;
[0018] Matching is performed in the reconstructed model according to the geometric parameters corresponding to the geometric type.
[0019] In one embodiment, matching the target geometric information corresponding to the erroneous feature in the reconstructed model includes:
[0020] Converting the target geometric information corresponding to the erroneous feature to obtain converted parameters; the converted parameters are used to describe a geometric object of any geometric type;
[0021] Based on the converted parameters, matching is performed in the reconstructed model.
[0022] In one embodiment, before the step of obtaining the reconstruction model, the method further includes:
[0023] When there are error features in the three-dimensional model construction task, generating prompt information for the error features; the prompt information is used to prompt the user to input the reconstructed model;
[0024] The reconstructed model includes a model obtained by re-executing the erroneous features and a model based on manual reconstruction.
[0025] In a second aspect, the present application also provides a feature updating device based on geometric matching. The device comprises:
[0026] A reconstruction model acquisition module is used to acquire a reconstruction model when there is an error feature in the three-dimensional model construction task; the error feature is a feature of abnormal execution result, and the reconstruction model is a model that is intended to be constructed with the error feature but fails to be constructed;
[0027] A geometric matching and permanent naming generation module, used to match a target geometric object from the reconstructed model and generate a permanent name for the target geometric object; the target geometric object is a geometric object in the reconstructed model that is consistent with a reference object of the erroneous feature;
[0028] A subsequent feature updating module is used to update the permanent name of the target geometric object in the subsequent feature based on the generated permanent name to obtain an updated feature; the subsequent feature is a feature whose execution order is after the erroneous feature in the history tree where the erroneous feature is located, and the updated feature is used to re-execute the three-dimensional model construction task.
[0029] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0030] In the case where there is an error feature in the three-dimensional model construction task, a reconstructed model is obtained; the error feature is a feature of abnormal execution result, and the reconstructed model is a model that the error feature intends to construct but fails to construct;
[0031] Obtaining a target geometric object from the reconstructed model by matching, and generating a permanent name for the target geometric object; the target geometric object is a geometric object in the reconstructed model that is consistent with a reference object of the erroneous feature;
[0032] Based on the generated permanent name, the permanent name of the target geometric object in the subsequent feature is updated to obtain an updated feature; the subsequent feature is a feature whose execution order is after the erroneous feature in the history tree where the erroneous feature is located, and the updated feature is used to re-execute the three-dimensional model construction task.
[0033] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0034] In the case where there is an error feature in the three-dimensional model construction task, a reconstructed model is obtained; the error feature is a feature of abnormal execution result, and the reconstructed model is a model that the error feature intends to construct but fails to construct;
[0035] Obtaining a target geometric object from the reconstructed model by matching, and generating a permanent name for the target geometric object; the target geometric object is a geometric object in the reconstructed model that is consistent with a reference object of the erroneous feature;
[0036] Based on the generated permanent name, the permanent name of the target geometric object in the subsequent feature is updated to obtain an updated feature; the subsequent feature is a feature whose execution order is after the erroneous feature in the history tree where the erroneous feature is located, and the updated feature is used to re-execute the three-dimensional model construction task.
[0037] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0038] In the case where there is an error feature in the three-dimensional model construction task, a reconstructed model is obtained; the error feature is a feature of abnormal execution result, and the reconstructed model is a model that the error feature intends to construct but fails to construct;
[0039] Obtaining a target geometric object from the reconstructed model by matching, and generating a permanent name for the target geometric object; the target geometric object is a geometric object in the reconstructed model that is consistent with a reference object of the erroneous feature;
[0040] Based on the generated permanent name, the permanent name of the target geometric object in the subsequent feature is updated to obtain an updated feature; the subsequent feature is a feature whose execution order is after the erroneous feature in the history tree where the erroneous feature is located, and the updated feature is used to re-execute the three-dimensional model construction task.
[0041] The above-mentioned feature updating method, device, computer equipment, storage medium and computer program product based on geometric matching first identify the erroneous features in the three-dimensional model construction task and obtain the reconstructed model, then match the target geometric object from the reconstructed model and generate the corresponding permanent name, and then update the permanent name of the target geometric object in the subsequent features based on the generated permanent name to obtain the updated feature, and finally regenerate the history tree by using the updated feature, and re-execute the three-dimensional model construction task to successfully complete the construction of the final model; this embodiment uses effective erroneous feature recognition, accurate geometric matching and adaptive permanent naming update technology to quickly repair the model when a feature error occurs, ensure the normal execution of subsequent features, so as to achieve the final repair of the model, improve the reliability and continuity of model construction, optimize the design process, improve the feature repair efficiency, and thus improve the model construction efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0043] Figure 1 It is a flowchart of a feature updating method based on geometric matching in one embodiment;
[0044] Figure 2 It is a flowchart of a feature updating method based on geometric matching in another embodiment;
[0045] Figure 3 is a flow chart of a feature updating method based on geometric matching in yet another embodiment;
[0046] Figure 4 It is a structural block diagram of a feature updating device based on geometric matching in one embodiment;
[0047] Figure 5 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0048] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0049] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0050] In one embodiment, Figure 1 As shown, a feature update method based on geometric matching is provided. This embodiment takes the method applied to a terminal as an example. It can be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0051] S101, when there are error features in the three-dimensional model construction task, obtaining a reconstructed model.
[0052] The three-dimensional model building task refers to the task executed in the CAD software to build a model.
[0053] Among them, features refer to operations used to create or modify models, and these operations can be classified into features, such as stretching, rotating, etc. The characteristic of these features is that the driving parameters are separated from the calculation results.
[0054] The error feature is a feature of abnormal execution results, and the reconstructed model is a model that the error feature attempts to construct but fails to construct.
[0055] The reconstructed model is a model reconstructed by the user based on the operation content corresponding to the error feature, and is used to complete subsequent model construction tasks based on the reconstructed model.
[0056] S102, obtaining a target geometric object by matching from the reconstructed model, and generating a permanent name for the target geometric object.
[0057] The target geometric object is a geometric object in the reconstructed model that is consistent with the reference object of the error feature. For example, a circle is referenced in the stretch feature. When the stretch feature fails, the stretched model needs to be reconstructed and the geometric parameters of the recorded circle are used to perform geometric matching in the reconstructed model. At this time, the circle is the target geometric object.
[0058] Permanent naming refers to a permanent semantic description of topological elements that can reflect parametric design. The generation process of permanent naming is based on certain generation rules. For example, the permanent name of a circle can be represented by "Circle_Plane_Radius", where Plane is the plane (such as the XY plane) and Radius is the radius value.
[0059] S103, based on the generated permanent name, updating the permanent name of the target geometric object in the subsequent feature to obtain an updated feature.
[0060] Among them, the subsequent feature is a feature whose execution order is after the erroneous feature in the history tree where the erroneous feature is located. For example, a history tree includes three features, namely sketching, stretching and chamfering. If the stretching feature is the erroneous feature, the execution order of the chamfer feature is after the stretching feature, so the chamfer feature is the subsequent feature.
[0061] The history tree refers to a series of operations (such as features, datums, sketches or curves) that are executed in sequence to create a model. The combination of operations that records the steps of model creation is called a history tree. Datums, sketches or curves can exist independently of modeling features and may not be used by features. Multiple features can share a sketch or datum. A feature can also use multiple sketches or datums.
[0062] Exemplarily, the process of updating permanent naming can be replacement, such as replacing the original permanent name of the subsequent feature before the error with the newly generated permanent name to update the subsequent feature. Furthermore, the history tree can be regenerated using the updated feature to re-execute the corresponding three-dimensional model construction task and complete the construction of the final model.
[0063] In the above-mentioned feature updating method based on geometric matching, firstly, the erroneous features are identified in the three-dimensional model construction task and the reconstructed model is obtained, then the target geometric objects are matched from the reconstructed model and the corresponding permanent names are generated, and then the permanent names of the target geometric objects in the subsequent features are updated based on the generated permanent names to obtain the updated features, and finally the history tree is regenerated by using the updated features, and the three-dimensional model construction task is re-executed to successfully complete the construction of the final model; this embodiment uses effective erroneous feature recognition, precise geometric matching and adaptive permanent naming update technology to quickly repair the model in the event of feature errors, ensure the normal execution of subsequent features, so as to achieve the final repair of the model, improve the reliability and continuity of model construction, optimize the design process, improve the feature repair efficiency, and thus improve the model construction efficiency.
[0064] In one embodiment, before the step of matching and obtaining the target geometric object from the reconstructed model, the method further includes: when any feature reference in the three-dimensional model construction task has geometric information, recording the referenced geometric information as the target geometric information.
[0065] The target geometric information is used to match the target geometric object from the reconstructed model.
[0066] Generally speaking, the target geometry information is recorded when the feature is created or modified (redefined). In addition, it can also be recorded before the feature is executed. This application does not impose specific restrictions on the recording of target geometry information. It only needs to be available when a feature error requires geometric matching.
[0067] In this embodiment, the geometric information of any feature is first identified in the three-dimensional model construction task and recorded as the target geometric information. Then, when the target geometric object needs to be matched from the reconstructed model in the future, the recorded target geometric information is used for matching, thereby ensuring that the necessary geometric data can be effectively obtained when the feature is erroneous or redefined. Finally, in this way, the traceability and accuracy of the geometric information in the model construction process are improved. This embodiment improves the efficiency of feature repair by effectively recording the target geometric information, and reduces the obstacles to feature repair caused by missing geometric data.
[0068] In one embodiment, a target geometric object is obtained by matching from a reconstructed model, including: determining target geometric information corresponding to an erroneous feature from the target geometric information; matching in the reconstructed model based on the target geometric information corresponding to the erroneous feature to obtain a geometric object consistent with a reference object of the erroneous feature; and using the geometric object consistent with the reference object of the erroneous feature as the target geometric object.
[0069] The target geometric information is the information used to reflect the characteristics of the geometric object during the geometric object matching process. For example, if the erroneous feature refers to a circle as a geometric object, then the coordinates of the center of the circle, the plane it is located in, the radius and other parameters are the target geometric information.
[0070] In this embodiment, the target geometric information corresponding to the erroneous feature is first determined from the target geometric information, and then geometric object matching is performed in the reconstructed model based on the target geometric information to obtain a geometric object consistent with the reference object of the erroneous feature, and finally the obtained geometric object is used as the target geometric object to support the subsequent permanent naming update process; this embodiment improves the matching efficiency of reference geometric objects through precise geometric information matching technology, thereby improving the processing efficiency of erroneous features.
[0071] In one embodiment, matching is performed in the reconstructed model based on target geometric information corresponding to the erroneous feature, including: identifying the geometric type of the erroneous feature reference; and matching in the reconstructed model according to geometric parameters corresponding to the geometric type.
[0072] Among them, the geometry type is related to the classification of geometry. The geometry parameters corresponding to this category are determined by identifying the geometry type, and then the parameters are used for matching. Various geometry types can be fully represented by mathematical methods. Therefore, the matching method of this embodiment needs to compare the type and the parameters required for the complete mathematical description of the type.
[0073] For example, when the geometry type is a line segment, only the start point and the end point are needed to describe the line segment, so the comparison parameters are the coordinates of the start point and the end point; when the geometry type is a circle, the parameters such as the xy plane where the circle is located, the center of the circle at the origin, and the radius of 10 cm can fully describe the circle, so the parameters that need to be matched are the plane, the center of the circle, and the radius.
[0074] In this embodiment, the geometric type to which the erroneous feature refers is first identified, and then a match is performed in the reconstructed model according to the geometric parameters corresponding to the geometric type, and then the relevant geometric parameters are determined by classifying the geometric types to achieve effective parameter-based matching. This systematic geometric matching method improves the efficiency of geometric matching, thereby improving the efficiency of repairing erroneous features during the model construction process.
[0075] In one embodiment, matching is performed in the reconstructed model based on the target geometric information corresponding to the erroneous feature, including: converting the target geometric information corresponding to the erroneous feature to obtain converted parameters; and matching is performed in the reconstructed model based on the converted parameters.
[0076] The converted parameters are used to describe geometric objects of any geometric type, such as the parameter types of NURBS curves and NURBS surfaces. Since NURBS curves and NURBS surfaces can describe any geometric type, the matching target geometry can be converted into NURBS form, and then all the geometry in the reconstructed model can be converted into NURBS form, and then the NURBS parameters can be compared for consistency. In this method, the parameters that need to be matched are the parameters of NURBS.
[0077] In this embodiment, the target geometric information corresponding to the erroneous feature is first converted to obtain converted parameters, and then matching is performed in the reconstructed model based on the converted parameters, and then the target geometric information is converted into a specific form, and then the parameter consistency is used to achieve matching of geometric objects; this embodiment improves the versatility of matching by using the converted parameters to describe the characteristics of any geometric type, thereby improving the versatility of erroneous feature repair during model construction.
[0078] In one embodiment, before the step of obtaining the reconstructed model, the method further includes: if there are erroneous features in the three-dimensional model building task, generating prompt information for the erroneous features; the prompt information is used to prompt the user to input the reconstructed model.
[0079] The reconstructed model includes a model obtained by re-executing the erroneous features and a model based on manual reconstruction.
[0080] Specifically, the reconstruction model can be constructed by redefining the erroneous features according to the original model construction method, such as redefining feature 2 and selecting the stretching object as grass. Figure 1 , the stretching direction is the z-axis, the stretching length is 20cm, and a reconstructed cylindrical model is obtained; manual reconstruction can also be performed based on other construction methods different from the erroneous features, such as deleting feature 2 (stretching 1), selecting the cylinder command, and directly creating a cylinder with the ground in the xy plane, the center as the origin, the radius of 10cm, the direction as the z-axis, and the height of 20cm to obtain a reconstructed cylindrical model.
[0081] In this embodiment, when a feature error occurs, a prompt message for the erroneous feature is generated to prompt the user to input a reconstruction model, and a variety of reconstruction methods are provided for the reconstruction model, thereby improving the flexibility and diversity of model reconstruction, and further improving the efficiency of feature repair using the reconstructed model.
[0082] In another embodiment, Figure 2 As shown, a feature updating method based on geometric matching is provided, comprising the following steps:
[0083] S201, when any feature reference in the three-dimensional model building task has geometric information, record the referenced geometric information as target geometric information;
[0084] S202, when there are error features in the three-dimensional model building task, generating prompt information for the error features to prompt the user to input a reconstruction model;
[0085] S203, determining the target geometric information corresponding to the error feature from the target geometric information;
[0086] S204, performing matching in the reconstructed model based on the target geometric information corresponding to the erroneous feature to obtain a geometric object consistent with the reference object of the erroneous feature;
[0087] S205, taking a geometric object that is consistent with the reference object of the erroneous feature as a target geometric object;
[0088] S206, generating a permanent name for the target geometric object;
[0089] S207, based on the generated permanent name, updating the permanent name of the target geometric object in the subsequent feature to obtain an updated feature.
[0090] It should be noted that the specific limitations of the above steps can be found in the above specific limitations of a feature updating method based on geometric matching, which will not be repeated here.
[0091] The present application embodiment provides a feature updating method based on geometric matching. To facilitate the understanding of those skilled in the art, Figure 3 A flow chart of a feature updating method based on geometric matching is provided. Figure 3 , a feature updating method based on geometric matching is described in detail with a specific embodiment. It is worth noting that the following description is only an exemplary description and not a specific limitation of the application.
[0092] In order to improve the efficiency of model repair and quickly repair the model when a feature error occurs, the feature update method based on geometric matching provided in this application automatically repairs the subsequent features that depend on the error feature after a feature error occurs in a certain step on the history tree, ensuring the normal execution of the subsequent features to achieve the final repair of the model. Specifically, it includes:
[0093] After a feature error occurs, the reconstructed model that was intended to be constructed by the erroneous feature but failed is first reconstructed. Then, geometric matching is performed through the geometric information corresponding to the feature error step recorded in advance to obtain new permanent names for the geometric elements in the reconstructed model in subsequent features, and the new names are replaced in subsequent features to update the subsequent features, and then the updated subsequent features are executed to realize the final construction of the model.
[0094] The core steps of the feature updating method based on geometric matching provided by the present application include: (1) pre-recording of geometric information; (2) permanent naming matching; (3) permanent naming replacement. That is, the necessary geometric information is recorded in advance, a new permanent naming is obtained by geometric matching, and the subsequent features are updated using the new permanent naming. The geometric information recorded in advance, which is used to create the erroneous feature and is referenced by the subsequent features, is used as the target, and the reconstructed model is used as the search set to match the geometric information, obtain the geometric information in the reconstructed model that is consistent with the target, and then update the permanent naming of the geometric information. Specifically, it includes:
[0095] Step 1: When the feature references geometry, record the geometric information.
[0096] When creating or redefining a feature, if the feature references geometry, the geometric information is recorded; the geometric information includes points, lines, and surfaces.
[0097] For example, for a model building task of generating a cylinder and chamfering it, the corresponding history tree includes the following features:
[0098] Feature 1: Drawing Grass Figure 1 , draw a circle with the center at the origin and a radius of 10 cm in the XY plane;
[0099] Feature 2: For the circle drawn in Feature 1, stretch 1 in the vertical direction of the circle, the stretching length is 20cm, and the stretching direction is the Z axis to obtain a stretched cylinder;
[0100] Feature 3: For the cylinder stretched by feature 2, chamfer 1 is performed on the circular edge of the top surface of the cylinder at z=20cm to obtain the chamfered cylinder.
[0101] When executing feature 1, determine whether feature 1 references geometric information; if no geometry is referenced, no record is required.
[0102] When executing feature 2, determine whether feature 2 references geometric information. Figure 1 , a circle on the XY plane with its center at the origin and a radius of 10 cm. This information is sufficient to completely represent a circle in three-dimensional space. Therefore, feature 2 refers to the geometric information record, which includes: the coordinates of the center of the circle, the radius of the circle, and the plane where the circle is located.
[0103] When executing feature 3, determine whether feature 3 refers to geometric information. Because chamfer 1 refers to the top circular edge of the cylinder generated by stretch 1, a circle with a radius of 10 cm and coordinates at the origin in the z=20 plane, this information is sufficient to fully represent a circle in three-dimensional space, so feature 3 refers to geometric information and needs to be recorded.
[0104] Step 2: After feature error, rebuild consistent geometry.
[0105] During regeneration, check the execution results of the feature command; if there is a failed feature, it may cause inconsistency in the subsequent geometric model; at this time, roll back to the failed feature and rebuild a consistent geometric model; the reconstruction methods include: redefining the erroneous feature, and deleting the erroneous feature and directly adding compensating geometry.
[0106] Among them, redefinition refers to rolling back the history to a certain step before feature creation and restoring the scene, modifying its feature parameters (such as datum, sketch or curve list), and re-executing the feature operation; feature parameters can be datum, sketch or curve, or they can be vertices, edges, faces and other geometric information; or they can be without geometric information, such as pure numerical length and angle, Boolean yes or no.
[0107] The regeneration command refers to a process of regenerating model information data and regenerating history tree features by recalculating parameterized data based on known user input.
[0108] Exemplarily, it is detected that the execution result of the feature 1 command is normal, and the execution result of feature 2 is: a program error occurs during execution, resulting in failure to generate a stretched cylinder; therefore, a reconstruction model of a cylinder needs to be manually rebuilt.
[0109] Step 3: Get a new permanent name through geometric matching.
[0110] Continue to regenerate subsequent features and check whether the following situations exist: the feature has a parameter that is a permanent name, and the permanent name cannot find a corresponding entity; if so, use the recorded geometric information to compare with the current model (reconstructed model) to find the same geometry; the reconstructed model is consistent with the feature before failure, so the same geometry can be matched. For example, the circle recorded in the xy plane must be found on the bottom surface of the reconstructed cylinder; after matching the new geometry, the new permanent name is obtained according to the naming rules of the permanent name; the specific judgment criteria for the match are: if the geometry is completely consistent, the match is considered successful. Then the feature uses the new permanent name to replace the old permanent name. Since step 2 is in the regeneration process, after replacing the permanent name, continue to regenerate all subsequent features until the entire model is successfully regenerated.
[0111] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0112] Based on the same inventive concept, the embodiment of the present application also provides a feature updating device based on geometric matching for implementing the feature updating method based on geometric matching involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more embodiments of the feature updating device based on geometric matching provided below can refer to the limitations of the feature updating method based on geometric matching above, and will not be repeated here.
[0113] In one embodiment, Figure 4 As shown, a feature updating device based on geometric matching is provided, comprising: a reconstruction model acquisition module 401, a geometric matching and permanent naming generation module 402, and a subsequent feature updating module 403, wherein:
[0114] The reconstruction model acquisition module 401 is used to acquire the reconstruction model when there is an error feature in the three-dimensional model construction task; the error feature is a feature of abnormal execution result, and the reconstruction model is a model that is intended to be constructed with the error feature but fails to be constructed;
[0115] The geometric matching and permanent name generation module 402 is used to match the target geometric object from the reconstructed model and generate a permanent name for the target geometric object; the target geometric object is a geometric object in the reconstructed model that is consistent with the reference object of the erroneous feature;
[0116] The subsequent feature update module 403 is used to update the permanent name of the target geometric object in the subsequent feature based on the generated permanent name to obtain the updated feature; the subsequent feature is the feature whose execution order in the history tree where the erroneous feature is located is after the erroneous feature, and the updated feature is used to re-execute the three-dimensional model construction task.
[0117] Each module in the feature updating device based on geometric matching can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0118] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 5As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a feature update method based on geometric matching is realized. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0119] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0120] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0121] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0122] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0123] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile 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), magnetoresistive 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. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0124] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, 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 specification.
[0125] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the present application. It should be noted that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A feature updating method based on geometric matching, characterized in that: The method comprises: In the case where there is an error feature in the three-dimensional model construction task, a reconstructed model is obtained; the error feature is a feature of abnormal execution result, and the reconstructed model is a model that the error feature intends to construct but fails to construct; Obtaining a target geometric object from the reconstructed model by matching, and generating a permanent name for the target geometric object; the target geometric object is a geometric object in the reconstructed model that is consistent with a reference object of the erroneous feature; Based on the generated permanent name, the permanent name of the target geometric object in the subsequent feature is updated to obtain an updated feature; the subsequent feature is a feature whose execution order is after the erroneous feature in the history tree where the erroneous feature is located, and the updated feature is used to re-execute the three-dimensional model construction task.
2. The method according to claim 1, characterized in that Before the step of matching and obtaining the target geometric object from the reconstructed model, the method further includes: In the case where any feature reference in the three-dimensional model building task has geometric information, the geometric information of the reference is recorded as the target geometric information; The target geometric information is used to match and obtain the target geometric object from the reconstructed model.
3. The method according to claim 2, characterized in that The step of obtaining a target geometric object by matching from the reconstructed model comprises: Determine the target geometric information corresponding to the erroneous feature from the target geometric information; Based on the target geometric information corresponding to the erroneous feature, matching is performed in the reconstructed model to obtain a geometric object consistent with the reference object of the erroneous feature; A geometric object that is consistent with the reference object of the erroneous feature is used as the target geometric object.
4. The method according to claim 3, characterized in that The matching of the target geometric information corresponding to the erroneous feature in the reconstructed model includes: Identifying the geometry type of the erroneous feature reference; Matching is performed in the reconstructed model according to the geometric parameters corresponding to the geometric type.
5. The method according to claim 3, characterized in that: The matching of the target geometric information corresponding to the erroneous feature in the reconstructed model includes: Converting the target geometric information corresponding to the erroneous feature to obtain converted parameters; the converted parameters are used to describe a geometric object of any geometric type; Based on the converted parameters, matching is performed in the reconstructed model.
6. The method according to any one of claims 1 to 5, characterized in that Before the step of obtaining the reconstruction model, the method further includes: When there are error features in the three-dimensional model construction task, generating prompt information for the error features; the prompt information is used to prompt the user to input the reconstructed model; The reconstructed model includes a model obtained by re-executing the erroneous features and a model based on manual reconstruction.
7. A feature updating device based on geometric matching, characterized in that: The device comprises: A reconstruction model acquisition module is used to acquire a reconstruction model when there is an error feature in the three-dimensional model construction task; the error feature is a feature of abnormal execution result, and the reconstruction model is a model that is intended to be constructed with the error feature but fails to be constructed; A geometric matching and permanent naming generation module, used to match a target geometric object from the reconstructed model and generate a permanent name for the target geometric object; the target geometric object is a geometric object in the reconstructed model that is consistent with a reference object of the erroneous feature; A subsequent feature updating module is used to update the permanent name of the target geometric object in the subsequent feature based on the generated permanent name to obtain an updated feature; the subsequent feature is a feature whose execution order is after the erroneous feature in the history tree where the erroneous feature is located, and the updated feature is used to re-execute the three-dimensional model construction task.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.