A CAD-based Automatic Comparison Method and System for Model Consistency
By converting the three-dimensional CAD model into a unified STP format and comparing it with consistency comparison tools, the problem of difficulty in consistency comparison of three-dimensional CAD models is solved, and the differences between models are detected quickly and accurately, providing support for modeling accuracy analysis.
Patent Information
- Application Number
- CN202111361688.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-17
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2041-11-17
AI Technical Summary
There is a problem in the prior art that the consistency comparison of three-dimensional CAD models is difficult, and it is difficult to quickly and accurately detect subtle differences between two three-dimensional models.
By converting the three-dimensional CAD model to be compared to the intermediate file in a unified STP format, and using the consistency comparison tool to perform geometric shape comparison and MBD information comparison, the test results are automatically generated and displayed according to the difference mark.
It realizes the rapid and accurate detection of subtle differences between two three-dimensional models, providing a supporting tool for the modeling accuracy analysis of three-dimensional CAD software, and supports three-dimensional model consistency comparison of various mainstream file formats.
Smart Images

Figure CN114169031B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of 3D CAD software, and more specifically, to an automatic comparison method and system for model consistency based on CAD. Background Art
[0002] The automatic model consistency comparison tool is used to compare 3D models in STEP format, verify the correctness of the models, and intuitively present the difference points. For example, the geometric shape differences of the models are displayed in various ways such as colors, animations, and Boolean operations. Summary of the Invention
[0003] The present invention needs to solve the technical problem of difficult comparison of model consistency in 3D CAD in the prior art.
[0004] The present invention provides an automatic comparison method for model consistency based on CAD, including the following steps:
[0005] S1. Convert the model to be compared established by the 3D CAD software to be compared and the corresponding standard model into a unified STP format intermediate file to be compared and a comparison intermediate file respectively.
[0006] S2. Import the intermediate file to be compared and the comparison intermediate file into the consistency comparison tool, automatically perform geometric shape comparison and MBD information comparison to obtain test results, and mark and display the test results according to the differences.
[0007] Preferably, the standard model in S1 is obtained by performing operations in the standard 3D CAD software through corresponding functional operations.
[0008] Preferably, S2 specifically includes: after geometric shape comparison, presenting the differences in a dynamic flashing manner, a color marking manner, or a Boolean operation result display manner.
[0009] Preferably, S2 specifically includes: loading the two model files, namely the intermediate file to be compared and the comparison intermediate file, into an assembly in an assembly manner, and achieving a dynamic flashing effect by switching the display / hide state and the wireframe hidden state of the two models at different times, and intuitively displaying the differences between the two model files.
[0010] Preferably, S2 specifically includes: by comparing the differences in the face information of the models of the intermediate file to be compared and the comparison intermediate file, differentiating the faces with different colors. For example, using green to represent completely identical faces, orange to represent faces with only edge differences, and red to represent completely different faces.
[0011] Preferably, comparing the differences in the face information of the models of the intermediate file to be compared and the comparison intermediate file specifically includes:
[0012] S21. Compare the parameters of the faces and the parameters of the comparison edges in sequence.
[0013] S22. For the differences in face information, distinguish the faces with different colors. If they are all equal, display green; if they are all unequal, display red; otherwise, display orange.
[0014] Preferably, the S2 specifically includes:
[0015] Import the intermediate file to be compared into the test result directory of the consistency comparison tool, and import the intermediate comparison file into the baseline directory of the consistency comparison tool.
[0016] Select the corresponding files in the test result directory and the baseline directory respectively and put them into the corresponding tables for comparison to obtain the test results.
[0017] The present invention also provides a system for implementing the automatic comparison method of model consistency based on CAD, which is characterized by including:
[0018] A model conversion module for converting the model to be compared established by the three-dimensional CAD software to be compared and the corresponding standard model into the intermediate file to be compared and the intermediate comparison file in the unified STP format respectively.
[0019] A comparison and analysis module for importing the intermediate file to be compared and the intermediate comparison file into the consistency comparison tool, automatically performing geometric shape comparison and MBD information comparison to obtain the test results, and marking and displaying the test results according to the differences.
[0020] The present invention also provides an electronic device, including a memory and a processor, and the processor is used to implement the steps of the automatic comparison method of model consistency based on CAD when executing the computer management program stored in the memory.
[0021] The present invention also provides a computer-readable storage medium, on which a computer management program is stored, and the computer management program is used to implement the steps of the automatic comparison method of model consistency based on CAD when executed by the processor.
[0022] Beneficial effects: A method and system for automatically comparing the consistency of models based on CAD provided by the present invention. The method includes: S1, converting the model to be compared established by the 3D CAD software to be compared and the corresponding standard model into the intermediate file to be compared and the comparison intermediate file in the unified STP format respectively; S2, importing the intermediate file to be compared and the comparison intermediate file into the consistency comparison tool, automatically performing geometric shape comparison and MBD information comparison to obtain the test results, and marking and displaying the test results according to the differences. This solution only focuses on the modeling results for model comparison and does not focus on the modeling process data. First, convert the models established by different 3D CADs into a unified intermediate format (STP) and then perform the comparison. This solution can also be used to check the 3D CAD compatibility test results by comparing the results of model data conversion. It can quickly and accurately detect the subtle differences between two 3D models and provide a support tool for the modeling accuracy analysis of 3D CAD software. Brief Description of the Drawings
[0023] Figure 1 It is a flowchart of a method for automatically comparing the consistency of models based on CAD provided by the present invention;
[0024] Figure 2 It is a schematic diagram of the hardware structure of a possible electronic device provided by the present invention;
[0025] Figure 3 It is a schematic diagram of the hardware structure of a possible computer-readable storage medium provided by the present invention. Detailed Embodiments
[0026] The following will further describe in detail the specific embodiments of the present invention in conjunction with the drawings and embodiments. The following embodiments are used to illustrate the present invention but are not used to limit the scope of the present invention.
[0027] As Figure 1 shown, the embodiments of the present invention provide a method and system for automatically comparing the consistency of models based on CAD. The method includes: S1, converting the model to be compared established by the 3D CAD software to be compared and the corresponding standard model into the intermediate file to be compared and the comparison intermediate file in the unified STP format respectively; S2, importing the intermediate file to be compared and the comparison intermediate file into the consistency comparison tool, automatically performing geometric shape comparison and MBD information comparison to obtain the test results, and marking and displaying the test results according to the differences. This solution only focuses on the modeling results for model comparison and does not focus on the modeling process data. First, convert the models established by different 3D CADs into a unified intermediate format (STP) and then perform the comparison. This solution can also be used to check the 3D CAD compatibility test results by comparing the results of model data conversion. It can quickly and accurately detect the subtle differences between two 3D models and provide a support tool for the modeling accuracy analysis of 3D CAD software.
[0028] This solution supports a 3D model consistency comparison tool for various mainstream file formats (3D CAD file formats, which are required to be convertible to the STP file format) to quickly and accurately discover the subtle differences between two 3D models and provide a support tool for the modeling accuracy analysis of 3D CAD software. For model comparison, only the modeling results are concerned, and the modeling process data (the modeling process data of different 3D CAD software is different) is not concerned. The models established by different 3D CADs can be first converted to a unified intermediate format (STP) before performing the comparison. This tool can also be used to check the results of 3D CAD compatibility tests by comparing the results of model data conversion.
[0029] This solution supports the comparison of 3D model results, comprehensively comparing the models generated by automated function and performance testing tools with the standard models, including the geometric shapes, MBD information, etc. of the models. Verify the correctness of the models and intuitively present the difference points.
[0030] In a preferred solution, batch comparison is performed through a batch comparison module: execute the comparison function, and the testing tool automatically compares the files with the same name in the "baseline directory" and the "result directory" and feedbacks the comparison results. The comparison results of the specified models can be viewed. The batch comparison module can compare the files with the same name in the test result directory and the baseline directory and feedback the comparison results. The test result directory and the baseline directory are respectively specified through the "selection button", and the files in the directories are respectively placed in the corresponding lists. The file comparison is automatically completed in the background, and the comparison results are displayed on the interface. Red indicates the files with differences; green indicates the files that are exactly the same; black indicates the files for which no files with the same name are found for comparison. Select a file in any list to view the differences and the time.
[0031] Specifically, the geometric shape comparison results can be presented in various ways such as dynamic flashing, color-coding the differences, and displaying the results of Boolean operations. The specific display process of the geometric shape comparison results is as follows:
[0032] (1) Display in the dynamic flashing mode:
[0033] Load the two model files, the intermediate file to be compared and the comparison intermediate file, into an assembly in an assembled manner, and achieve the dynamic flashing effect by switching the display / hide state and the wireframe hidden state of the two models at different times, intuitively showing the differences between the two model files.
[0034] (2) Display in the way of color-coding the differences:
[0035] By comparing the differences in the face information of the two models, different colors are used to distinguish the faces. For example:
[0036] Green: represents the faces that are exactly the same;
[0037] Orange: represents the faces with only edge differences;
[0038] Red: represents the completely different faces.
[0039] The MBD information results are shown as follows: The system supports the comparison of MBD information, and the system can display the difference information in different colors on the interface. MBD is the abbreviation of Model Based Definition, that is, an integrated three-dimensional digital entity model expresses the complete product definition information and becomes the only basis in the manufacturing process.
[0040] The comparison criteria of the model can be selected by the user according to needs. For example, for the comparison criteria of the same faces, when all the edges are the same or only the external edges are the same, it is considered the same, and the user can select according to needs. In addition, it also includes comparison accuracy, etc., all of which can be customized. These parameters are set manually in the system settings interface.
[0041] The present invention also provides a system for implementing an automatic comparison method for CAD-based model consistency, including:
[0042] A model conversion module for converting the model to be compared established by the three-dimensional CAD software to be compared and the corresponding standard model into a unified STP format intermediate file to be compared and a comparison intermediate file respectively;
[0043] A comparison and analysis module for importing the intermediate file to be compared and the comparison intermediate file into a consistency comparison tool, automatically performing geometric shape comparison and MBD information comparison to obtain test results, and marking and displaying the test results according to differences.
[0044] Specifically, the model consistency comparison system comprehensively compares the test result data in STEP format of the three-dimensional model generated by the automatic test tool with the standard model, verifies the correctness of the model, and intuitively presents the difference points, such as displaying the geometric shape differences of the model in various ways such as color, animation, and Boolean operation. It mainly includes the following functional modules:
[0045] (1) Model selection module: Select the model files in the specified directory and compare a single file.
[0046] (2) Consistency comparison module: Specify two model files, execute the consistency comparison function, comprehensively compare the two models, and intuitively present the difference points.
[0047] (3) Batch comparison module: It executes the comparison function. The test tool automatically compares the files with the same name in the "baseline directory" and the "result directory" and feedbacks the comparison results. The comparison results of a specified model can be viewed. The batch comparison module can compare the files with the same name in the test result directory and the baseline directory and feedback the comparison results. The test result directory and the baseline directory are respectively specified through the "selection button", and the files in the directories are placed in the corresponding lists respectively. The file comparison is automatically completed in the background, and the comparison results are displayed on the interface.
[0048] Please refer to Figure 2 which is a schematic diagram of an embodiment of the electronic device provided by the embodiment of the present invention. As Figure 2 shown, the embodiment of the present invention provides an electronic device, including a memory 1310, a processor 1320, and a computer program 1311 stored in the memory 1310 and operable on the processor 1320. When the processor 1320 executes the computer program 1311, the following steps are implemented: S1, converting the to-be-compared model established by the to-be-compared 3D CAD software and the corresponding standard model into a unified STP format of the to-be-compared intermediate file and the comparison intermediate file respectively;
[0049] S2, importing the to-be-compared intermediate file and the comparison intermediate file into the consistency comparison tool, automatically performing geometric shape comparison and MBD information comparison to obtain test results, and respectively marking and displaying the test results according to the differences.
[0050] Please refer to Figure 3 which is a schematic diagram of an embodiment of a computer-readable storage medium provided by the present invention. As Figure 3 shown, this embodiment provides a computer-readable storage medium 1400, on which a computer program 1411 is stored. When the computer program 1411 is executed by a processor, the following steps are implemented: S1, converting the to-be-compared model established by the to-be-compared 3D CAD software and the corresponding standard model into a unified STP format of the to-be-compared intermediate file and the comparison intermediate file respectively;
[0051] S2, importing the to-be-compared intermediate file and the comparison intermediate file into the consistency comparison tool, automatically performing geometric shape comparison and MBD information comparison to obtain test results, and respectively marking and displaying the test results according to the differences.
[0052] It should be noted that in the above embodiments, the descriptions of the various embodiments have their own emphases. For the parts not detailedly described in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0053] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0054] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present invention. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram, can be realized by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded computer, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate means for realizing the functions specified in one Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0055] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing devices to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including instruction means that realizes the functions specified in one Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0056] These computer program instructions can also be loaded onto a computer or other programmable data processing devices, such that a series of operation steps are executed on the computer or other programmable devices to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable devices provide steps for realizing the functions specified in one Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0057] Although the preferred embodiments of the present invention have been described, those skilled in the art can make additional changes and modifications once they know the basic inventive concept. Therefore, the appended claims are intended to be construed as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0058] Obviously, those skilled in the art can make various modifications and variations to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention is also intended to include these modifications and variations.
Claims
1. An automatic comparison method for model consistency based on CAD, characterized in that, it includes the following steps: S1. Convert the model to be compared established by the 3D CAD software to be compared and the corresponding comparison target model into the intermediate file to be compared and the comparison intermediate file in the unified STP format respectively; S2. Import the intermediate file to be compared and the comparison intermediate file into the consistency comparison tool, automatically perform geometric shape comparison and MBD information comparison to obtain the comparison test result, and mark and display the comparison test result according to the differences; The specific content of S2 includes: after geometric shape comparison, present the differences through dynamic flashing, color identification or Boolean operation result display methods; The specific content of S2 includes: load the two model files of the intermediate file to be compared and the comparison intermediate file into an assembly in an assembly manner, and achieve the dynamic flashing effect by switching the display / hide state and wireframe hidden state of the two models at different times, and intuitively display the differences between the two model files.
2. The automatic comparison method for model consistency based on CAD according to claim 1, characterized in that, the comparison target model in S1 is obtained by performing operations in the standard 3D CAD software through corresponding functional operations.
3. The automatic comparison method for model consistency based on CAD according to claim 1, characterized in that, the specific content of S2 includes: by comparing the differences in the face information of the models of the intermediate file to be compared and the comparison intermediate file, distinguish the faces with different colors, including: using green to represent completely identical faces, orange to represent faces with only edge differences, and red to represent completely different faces.
4. The automatic comparison method for model consistency based on CAD according to claim 3, characterized in that, specifically, comparing the differences in the face information of the models of the intermediate file to be compared and the comparison intermediate file includes: S21. Compare the parameters of the faces and the parameters of the edges in sequence; S22. For the differences in face information, distinguish with different colors, including: if they are all equal, display green; if they are all not equal, display red; otherwise display orange.
5. The automatic comparison method for model consistency based on CAD according to claim 1, characterized in that, the specific content of S2 includes: Import the intermediate file to be compared into the test result directory of the consistency comparison tool, and import the comparison intermediate file into the baseline directory of the consistency comparison tool; Select the corresponding files in the test result directory and the baseline directory respectively and put them into the corresponding tables for comparison to obtain the test result.
6. A system for implementing the automatic comparison method for model consistency based on CAD according to any one of claims 1 to 5, characterized in that, it includes: A model conversion module for converting the model to be compared established by the 3D CAD software to be compared and the corresponding standard model into the intermediate file to be compared and the comparison intermediate file in the unified STP format respectively; The comparison and analysis module is used to import the intermediate file to be compared and the comparison intermediate file into the consistency comparison tool, automatically perform geometric shape comparison and MBD information comparison to obtain test results, and mark and display the test results according to the differences respectively; Specifically, after geometric shape comparison, the comparison and analysis module presents the differences in a dynamic flashing manner, a color identification manner, or a Boolean operation result display manner; Specifically, the comparison and analysis module loads the two model files, namely the intermediate file to be compared and the comparison intermediate file, into an assembly in an assembled manner, and achieves a dynamic flashing effect by switching the display / hide state and the wireframe hidden state of the two models at different times, and intuitively displays the differences between the two model files.
7. An electronic device, Characterized in that, It includes a memory and a processor. When the processor executes the computer management program stored in the memory, it implements the steps of the CAD-based model consistency automatic comparison method according to any one of claims 1-5.
8. A computer-readable storage medium, Characterized in that, A computer management program is stored thereon. When the computer management program is executed by a processor, it implements the steps of the CAD-based model consistency automatic comparison method according to any one of claims 1-5.
Citation Information
Patent Citations
Model or drawing online difference comparison method, device and system
CN109670222A