Simulation method, device, equipment, medium and program product
By establishing the relationship between machining toolpaths and mesh models, generating and rendering difference field datasets, the problem of difficulty in locating differences between blank models and ideal workpieces in existing technologies is solved. This enables fast and accurate erroneous toolpath location and local tolerance management, improving user convenience.
Patent Information
- Application Number
- CN202511639407.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-11
- Publication Date
- 2026-02-17
AI Technical Summary
Existing CAD simulation platforms cannot accurately locate the differences between the blank model and the ideal workpiece, causing users to spend a lot of time analyzing erroneous cutting data, and they cannot achieve tolerance management and secondary business analysis of local areas.
By establishing the relationship between the machining toolpath and the triangular facets of the mesh model, data expansion processing is performed to generate a difference field dataset, which is then used for rendering to directly indicate the differences and the machining toolpaths that cause them.
It improves user-friendliness, reduces the risk of manual intervention and misjudgment, can quickly and accurately locate erroneous toolpaths, and supports local tolerance management and secondary business analysis.
Smart Images

Figure CN121543324A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of workpiece processing technology, and in particular to a simulation method, apparatus, equipment, medium, and program product. Background Technology
[0002] In the machining field, due to the high value of cutting consumables and the high cost of machine tool startup, a significant waste of materials, labor, and machine tool costs occurs if the resulting blank differs greatly from the ideal workpiece after cutting. Currently, some CAD simulation platforms have been developed that can simulate machine tool cutting based on user-provided material dimensions and toolpath data, thereby obtaining a simulated cutting result model, generally referred to as a blank model. This blank model is typically stored based on a mesh structure.
[0003] However, current CAD simulation platforms can only perform a rough global comparison between the blank model and the ideal workpiece model, and color-code the blank model based on a color scale to indicate unsatisfactory processing locations, such as over-cutting or under-cutting. For operators, this color rendering of the model can provide some reference, but users still need to spend a lot of time analyzing the model's erroneous cutting data. Summary of the Invention
[0004] This application provides a simulation method, apparatus, device, medium, and program product to solve the problem in related technologies where users spend a lot of time analyzing incorrectly segmented data in models.
[0005] To solve the above-mentioned technical problems, this application is implemented as follows: In a first aspect, embodiments of this application provide a simulation method, including: The original mesh model is processed by cutting simulation based on the toolpath process set to obtain the first mesh model. The original mesh model is a three-dimensional model of the workpiece to be processed, and the toolpath process set is a set of machining toolpaths for the workpiece to be processed. A correlation analysis is performed on the toolpath process set and the first mesh model to obtain correlation information. The correlation information is used to indicate the correlation relationship between the triangular facets of the first mesh model and the machining toolpaths in the toolpath process set. Based on the association information, the first grid model is subjected to data expansion processing to obtain a second grid model, the second grid model including the first grid model and the association information; The second mesh model is compared with a preset ideal workpiece model to obtain a difference field dataset, wherein the ideal workpiece is the ideal workpiece of the workpiece to be processed, and the difference field dataset is used to characterize the difference between the second mesh model and the ideal workpiece model; The second mesh model is rendered based on the difference field dataset to obtain a rendering result. The rendering result includes prompt information, which indicates the difference between the first mesh model and the ideal workpiece model, as well as the name of the machining toolpath corresponding to the difference.
[0006] Secondly, embodiments of this application provide a simulation device, including: The first processing module is used to perform cutting simulation processing on the original mesh model based on the toolpath process set to obtain the first mesh model. The original mesh model is a three-dimensional model of the workpiece to be processed, and the toolpath process set is a set of machining toolpaths for the workpiece to be processed. The analysis module is used to perform correlation analysis on the toolpath process set and the first mesh model to obtain correlation information. The correlation information is used to indicate the correlation relationship between the triangular facets of the first mesh model and the machining toolpaths in the toolpath process set. The second processing module is used to perform data expansion processing on the first grid model based on the association information to obtain a second grid model, the second grid model including the first grid model and the association information; The comparison module is used to compare the second mesh model with a preset ideal workpiece model to obtain a difference field dataset, wherein the ideal workpiece is the ideal workpiece of the workpiece to be processed, and the difference field dataset is used to characterize the difference between the second mesh model and the ideal workpiece model; The rendering module is used to render the second mesh model based on the difference field dataset to obtain a rendering result. The rendering result includes prompt information, which is used to indicate the difference between the first mesh model and the ideal workpiece model and the name of the machining toolpath corresponding to the difference.
[0007] Thirdly, embodiments of this application provide an electronic device, which includes a processor and a memory. The memory stores programs or instructions that can run on the processor, and when the programs or instructions are executed by the processor, they implement the steps of the simulation method described in the first aspect above.
[0008] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the simulation method described in the first aspect above.
[0009] Fifthly, embodiments of this application provide a computer program product, including computer instructions, which, when executed by a processor, implement the steps of the simulation method described in the first aspect above.
[0010] In this embodiment, a cutting simulation is performed on the original mesh model based on the toolpath process set to obtain a first mesh model. The original mesh model is a three-dimensional model of the workpiece to be processed, and the toolpath process set is a set of machining toolpaths for the workpiece to be processed. A correlation analysis is performed on the toolpath process set and the first mesh model to obtain correlation information. This correlation information indicates the relationship between the triangular facets of the first mesh model and the machining toolpaths in the toolpath process set. Based on the correlation information, the first mesh model undergoes data expansion processing to obtain a second mesh model. The second mesh model includes the first mesh model and the correlation information. The second mesh model is compared with a preset ideal workpiece model to obtain a difference field dataset. The ideal workpiece is the ideal workpiece of the workpiece to be processed, and the difference field dataset characterizes the difference between the second mesh model and the ideal workpiece model. Based on the difference field dataset, the second mesh model is rendered to obtain a rendering result. The rendering result includes prompt information indicating the difference between the first mesh model and the ideal workpiece model, as well as the name of the machining toolpath corresponding to the difference. In this way, by establishing the relationship between the machining toolpath and the triangular facets in the mesh model, the geometric difference between the first mesh model and the ideal model can be directly located to the specific machining toolpath that caused the difference. This allows users to quickly and accurately identify the erroneous machining toolpath, thereby improving the ease of operation for users and reducing the risk of manual intervention and misjudgment. Attached Figure Description
[0011] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 This is a flowchart of a simulation method provided in an embodiment of this application; Figure 2 This is an application flowchart of a simulation method provided in an embodiment of this application; Figure 3 This is a schematic diagram of an ideal workpiece model provided in an embodiment of this application; Figure 4 This is a schematic diagram of a blank model to be cut according to an embodiment of this application; Figure 5 This is a schematic diagram of a resulting blank model provided in an embodiment of this application; Figure 6 This is a schematic diagram of the model comparison rendering result of a related technology provided in an embodiment of this application; Figure 7 This is one of the schematic diagrams of a rendering result provided in an embodiment of this application; Figure 8 This is a second schematic diagram of a rendering result provided in an embodiment of this application; Figure 9 This is a schematic diagram of the structure of a simulation device provided in an embodiment of this application; Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0013] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0014] For ease of understanding, the following describes some aspects of the embodiments of this application: The related technologies have the following drawbacks: (1) The results of the Mesh model comparison analysis function in related technologies are difficult to correlate with toolpath data. Users need to conduct secondary analysis to determine which toolpaths caused the differences, especially in overcutting scenarios.
[0015] (2) The model differentiation analysis results cannot be dynamically adjusted and appropriately modified. For example, users need to ignore overcut alarms in scenarios such as all chamfered parts and pre-drilled holes of threaded holes in the blank model (in the machining field, the ideal workpiece model is generally not chamfered, and all edges are ideal acute angles; however, in actual cutting, due to burrs on the edges, in order to reduce mutual friction and scratches between parts, facilitate installation and improve workpiece quality, additional chamfering toolpath operations need to be set, so that the simulated blank model naturally differs from the ideal workpiece model at all chamfers). Related technologies cannot achieve precise tolerance management in such local areas, which leads users to compare by eye and ignore such chamfered areas, including other differences that need to be ignored, which is time-consuming, laborious and prone to errors.
[0016] (3) Due to the limitations of the Mesh model, it is impossible to perform secondary business analysis on the simulated blank model. For example, users need to obtain the maximum depth of the drilling area, calculate the height and width of the local residual material, and other geometric data.
[0017] In this application embodiment, a simulation method, apparatus, device, medium, and program product are proposed to solve the problem in related technologies that require users to spend a lot of time analyzing incorrectly segmented data of the model.
[0018] See Figure 1 , Figure 1 This is a flowchart of a simulation method provided in an embodiment of this application, such as... Figure 1 As shown, the method includes the following steps: Step 101: Perform cutting simulation processing on the original mesh model based on the toolpath process set to obtain the first mesh model. The original mesh model is a three-dimensional model of the workpiece to be processed, and the toolpath process set is a set of machining toolpaths for the workpiece to be processed.
[0019] In this step, the aforementioned toolpath process set can be a collection of CNC machining instructions arranged in the machining sequence to complete the machining of the workpiece. Specifically, it can include multiple machining toolpaths. It can be understood that each machining toolpath defines the geometric path of the tool, cutting parameters, and the machining features it targets.
[0020] The original mesh model mentioned above can be a three-dimensional model of the component to be processed, represented by a mesh structure, and is the initial state of the cutting simulation process.
[0021] The above-mentioned cutting simulation processing can be carried out in a computer, according to the instructions of the toolpath process set, through geometric Boolean operations and other means, to simulate the process of the tool removing material from the original mesh model.
[0022] It is understandable that the above simulation can refer to the method of simulating physical processing through digital models in a computer system.
[0023] The aforementioned first mesh model can refer to the mesh model obtained after the original mesh model has been processed through cutting simulation, and can be used to represent the state of the workpiece after processing.
[0024] Step 102: Perform correlation analysis on the toolpath process set and the first mesh model to obtain correlation information. The correlation information is used to indicate the correlation relationship between the triangular facets of the first mesh model and the machining toolpaths in the toolpath process set.
[0025] In this step, the aforementioned correlation analysis can refer to the process of establishing a mapping relationship between a specific set of triangular facets in the first mesh model and a specific machining toolpath in the toolpath process set through algorithms such as spatial location calculation and temporal analysis.
[0026] The aforementioned association information can be a dataset storing the relationships between the triangular faces of the first mesh model and the machining toolpaths in the toolpath process set. It can be understood that the association information is used to indicate which specific machining toolpath generated the triangular facet.
[0027] Step 103: Perform data expansion processing on the first grid model based on the association information to obtain a second grid model, wherein the second grid model includes the first grid model and the association information.
[0028] In this step, the above data expansion processing can be the process of attaching the associated information as metadata to the grid data structure of the first grid model.
[0029] It should be noted that the above data expansion process did not change the geometry of the first grid model, but rather enhanced its information carrying capacity.
[0030] The aforementioned second grid model can be a three-dimensional grid model rich in semantic information obtained after data expansion.
[0031] Step 104: Compare the second mesh model with the preset ideal workpiece model to obtain a difference field dataset, wherein the ideal workpiece is the ideal workpiece of the workpiece to be processed, and the difference field dataset is used to characterize the difference between the second mesh model and the ideal workpiece model.
[0032] In this step, the ideal workpiece model mentioned above can be a three-dimensional model created based on product design drawings, representing the theoretical perfect size and shape, and is the goal pursued in the processing.
[0033] The above comparison can refer to the process of calculating the minimum distance between each point on the surface of the second mesh model and the surface of the ideal workpiece model through algorithms such as spatial distance measurement, in order to quantify the geometric deviation.
[0034] The aforementioned difference field dataset can be a collection of data storing the geometric deviation values between each location on the surface of the second mesh model and the ideal workpiece model. For example, positive values typically indicate overcutting, and negative values indicate undercutting.
[0035] Step 105: Render the second mesh model based on the difference field dataset to obtain a rendering result. The rendering result includes prompt information, which indicates the difference between the first mesh model and the ideal workpiece model, as well as the name of the machining toolpath corresponding to the difference.
[0036] In this step, the above rendering can be a process of using computer graphics technology to overlay the difference field dataset onto the second mesh model in a visual manner (such as color mapping) for display.
[0037] The aforementioned prompts can be visual or textual information provided to the user in the user interface. They not only include the location and size of the difference, but more importantly, they can also utilize the association information in the second mesh model to directly indicate the name or identifier of the machining toolpath that caused the difference.
[0038] The above rendering information can be a visual rendering. For example, the system can use a color scale (e.g., red indicates overcutting, blue indicates undercutting) to color the second mesh model and generate a visual rendering. When the user clicks on an overcut red area, the interface not only displays "Overcut 0.1mm" but also directly displays a prompt message, such as "This defect was caused by toolpath 'fine milling side #3'".
[0039] In this embodiment, by establishing the relationship between the machining toolpath and the triangular facets in the mesh model, the geometric difference between the first mesh model and the ideal model can be directly located to the specific machining toolpath that caused the difference. In this way, the user can quickly and accurately determine the machining toolpath with errors, thereby improving the user's operational convenience and reducing the risk of manual intervention and misjudgment.
[0040] Optionally, before rendering the second mesh model based on the difference field dataset, the method further includes: Obtain the tolerance rules input by the user, the tolerance rules including the error range corresponding to the machining toolpaths in the toolpath process set; The rendering of the second mesh model based on the difference field dataset to obtain rendering information includes: Delete all difference field data corresponding to the first machining toolpath in the difference field dataset to obtain the updated difference field dataset, wherein the first machining toolpath is: the machining toolpath whose difference between the corresponding second mesh model and the ideal workpiece model is within the error range; The second mesh model is rendered based on the updated difference field dataset to obtain rendering information.
[0041] Specifically, the aforementioned tolerance rules can be a user-defined set of business rules used to determine whether machining deviations are acceptable. It is understood that the core principle is to bind specific deviation judgment criteria to specific machining contexts (such as machining features and toolpaths), rather than adopting a unified global standard.
[0042] The aforementioned error range can be the limit value of geometric deviation allowed for a specific machining toolpath or machining feature in the tolerance rules. The aforementioned error range can be a one-sided tolerance (such as allowing only positive or negative deviation) or a two-sided tolerance (such as -0.05mm to +0.1mm).
[0043] For example, the user sets a tolerance rule: for a machining toolpath named 'Chamfer_1', all overcuts within 0.1mm (positive deviation) are considered acceptable, and the error range is defined as '0 to +0.1mm'.
[0044] The above deletion can be removing data entries that meet specific conditions from the difference field dataset or marking them as invalid so that they do not participate in subsequent rendering and report generation; it can be a logical filtering operation.
[0045] The aforementioned difference field data can refer to the data units in the difference field dataset that are associated with a specific triangular facet and record its geometric deviation value.
[0046] It is understood that the aforementioned first machining toolpath can refer to a machining toolpath whose machining result is within the allowable error range according to the tolerance rules, and its machining difference is regarded as compliance difference rather than machining defect.
[0047] In this implementation, by associating tolerance rules with specific toolpaths, it is possible to intelligently identify and mask compliance differences set by the tolerance rules, so that the final rendering result only presents the real processing defects, effectively filtering false alarms, thereby further reducing the risk of human intervention and misjudgment.
[0048] Optionally, the correlation analysis of the toolpath process set and the first mesh model to obtain correlation information includes: The triangular facets in the first mesh model are identified to obtain a first region set, wherein the first region set includes all regions in the first mesh model that have preset geometric features; The regions in the first region set are associated with the corresponding machining toolpaths in the toolpath process set to obtain the association information, wherein the association information includes the machining toolpaths corresponding to each region in the first region set.
[0049] Specifically, the aforementioned identification may refer to the process of analyzing and classifying the disordered set of triangular facets in the first mesh model through a geometric topology reconstruction algorithm, thereby identifying high-level features that conform to specific geometric definitions.
[0050] The aforementioned first region set can be a data set obtained through the identification process, which contains all regions in the first grid model that are classified as specific geometric features.
[0051] The aforementioned preset geometric features can be predefined geometric shapes commonly found in machining, such as planes, cylindrical surfaces, conical surfaces, chamfered surfaces, and fillet surfaces. These features correspond to specific operations in the machining toolpath, such as milling planes, drilling, and chamfering.
[0052] In this embodiment, by recognizing the geometric features of the region of the first grid model, subsequent users can perform command operations based on the geometric feature type, thereby enabling business customization functions and improving the flexibility and convenience of user operations.
[0053] Optionally, the preset geometric features include at least one of a plane, a cylindrical surface, a conical surface, a chamfered surface, and a rounded corner surface.
[0054] Optionally, the method further includes: Receive a service request input by a user, the service request being used to obtain the spatial dimensions of a preset area, the first set of areas including the preset area; In response to the business request, the location of the preset region in the second grid model is determined based on the association information, and the spatial dimensions of the preset region are calculated. Output the spatial dimensions of the preset area.
[0055] Specifically, the aforementioned business request may be an instruction initiated by the user in the simulation analysis system to perform quantitative geometric analysis on specific processing features or regions.
[0056] The aforementioned preset region may be a specific geometric feature region that corresponds to the service request and has been identified and included in the first region set.
[0057] The aforementioned spatial dimensions can be key geometric parameters of the preset area. It is understood that the definition of spatial dimensions differs for different types of geometric features. For example, for a cylindrical hole feature, its spatial dimensions may include diameter and depth; for a chamfer feature, its spatial dimensions may include width and angle.
[0058] In this implementation, by receiving service requests input by the user and then determining the spatial size of a preset area based on the associated information, the user can send service requests to obtain relevant data as needed, thereby improving the flexibility of user operation.
[0059] Optionally, the comparison of the second mesh model with a preset ideal workpiece model to obtain a difference field dataset includes: A second set of regions is determined in the second grid model, wherein the second set of regions includes multiple first grid regions in the second grid model, and the first grid regions are regions whose processing complexity value is greater than a preset threshold, wherein the processing complexity value is associated with at least one of the following: processing time, number of processing steps and shape of the corresponding region; In the second grid model, the target region indicated by the second region set is re-gridned to obtain a third grid model, wherein the grid density of the target region in the third grid model is greater than the grid density of the target region in the second grid model; The third mesh model is compared with the preset ideal workpiece model to obtain the difference field dataset.
[0060] Specifically, the aforementioned second region set can be a set of target regions that need to be refined into a grid, selected based on the complexity of the processing technology.
[0061] The aforementioned processing complexity value can be used as an indicator to quantitatively evaluate the processing complexity of a specific region in the model. Specifically, a higher processing complexity value indicates that the processing of the corresponding region is more complex, and the higher the requirement for simulation accuracy. The aforementioned preset threshold can be a pre-set value.
[0062] The aforementioned processing complexity value can be obtained by quantifying and scoring multiple factors affecting the processing complexity value separately, and then summing them in a weighted manner. For example, the score corresponding to the shape can be obtained by relevant operators based on historical experience and process knowledge, pre-defining a shape complexity comparison table to assign a basic score to different types of geometric features. The score corresponding to the processing time can be obtained by obtaining the processing time required for this area based on simulation data or process prediction, and then mapping the actual time to a standardized scoring range through linear or nonlinear normalization methods.
[0063] The processing time mentioned above can be the simulation time or actual time required to complete the processing of the corresponding area. The longer the time, the more complex the tool path or the greater the amount of material removed.
[0064] The number of processing steps mentioned above can refer to the number of different toolpath steps performed in the corresponding area. For example, an area that undergoes three processes—"roughing," "semi-finishing," and "finishing"—is more complex than an area that only undergoes "roughing."
[0065] The shape of the corresponding region can be the geometric characteristics of the region itself, such as a complex shape like a deep cavity or narrow groove, which is more complex than a simple plane or cylindrical surface.
[0066] The target region mentioned above can be a specific region contained in the second region set, that is, a region marked as high complexity.
[0067] The aforementioned re-meshing can be a process of replacing the original, sparser triangular facets of a specified target region with a denser and finer set of triangular facets, while keeping the overall geometry of the model unchanged.
[0068] The aforementioned third mesh model can refer to a mesh model obtained after local re-meshing. This third mesh model maintains the original mesh density in non-target regions, while having a higher mesh density in the target region.
[0069] The mesh density mentioned above can refer to the number of triangular facets contained in a unit model surface area. It can be understood that the higher the mesh density, the more accurate the approximation of the model's geometry.
[0070] In this implementation, by identifying key complex areas and refining the mesh there, the model comparison process can capture microscopic defects that would be ignored or smoothed out under coarse meshes by locally increasing the mesh density in these areas, thereby significantly improving the reliability of the rendering results.
[0071] Optionally, the comparison of the second mesh model with a preset ideal workpiece model to obtain a difference field dataset includes: A spatial index is constructed for the second mesh model and the ideal workpiece model using a spatial positioning algorithm; The second mesh model and the ideal workpiece model are compared based on the spatial index to obtain the difference field dataset.
[0072] Specifically, the aforementioned spatial positioning algorithm can be a computer algorithm for efficiently organizing and managing the positional information of geometric elements in three-dimensional space, and can be used to structure spatial data to support fast range queries and nearest neighbor searches.
[0073] The aforementioned spatial index can be a data structure generated by the spatial positioning algorithm, and can serve as a spatial directory for the second mesh model and the ideal workpiece model.
[0074] It is understood that the above comparison of the second mesh model and the ideal workpiece model based on the spatial index can be achieved by using the constructed spatial index to accelerate the process of nearest point query and distance calculation when comparing models.
[0075] In this embodiment, by comparing the second mesh model and the ideal workpiece model based on the spatial index, a difference field dataset is obtained, which allows the virtual space where the model is located to be recursively divided into smaller, hierarchical cells, and the geometric elements in the model to be associated with their respective cells, thereby improving the efficiency of model comparison.
[0076] Optionally, after comparing the second mesh model with a preset ideal workpiece model to obtain a difference field dataset, the method further includes: An analysis report is generated based on the difference field dataset and the correlation information. The analysis report is used to indicate the difference between the second mesh model and the ideal workpiece model, as well as the name of the machining toolpath corresponding to the difference.
[0077] Specifically, the aforementioned analysis report can be a document or data file that provides a structured summary and attribution analysis of the simulation comparison results.
[0078] In this implementation, the specific toolpath name causing the defect can be directly indicated through the analysis report, thereby further improving the ease of operation for users.
[0079] Figure 2 This is an application flowchart of a simulation method provided in an embodiment of this application, such as... Figure 2 As shown, the specific steps include the following: Step 1: Load the original blank STL format model into the simulation software; Step 2: Load the toolpath process set into the simulation software; Step 3: Load the ideal workpiece STL format model into the simulation software; Step 4: Convert the STL model into the program's internal MESH model (i.e., a set of triangles). Step 5: Perform path analysis and associated patch analysis on the toolpath process set, and establish an associated database; Step 6: Perform blank cutting simulation based on the toolpath; Step 7: After all toolpath simulations and cutting are completed, obtain the final result blank MESH model; Step 8: Based on the associated database and the resulting blank MESH model, perform topological classification and toolpath analysis of the model facets; Step 9: Based on the analysis results, expand the data volume of the resulting blank MESH model to form a blank incremental model; Step 10: Perform local optimization of the blank incremental model based on the toolpath analysis results; Step 11: Construct a spatial index based on a spatial positioning algorithm; Step 12: Perform the model comparison process between the blank incremental model and the ideal workpiece MESH model; Step 13: Construct the difference field dataset for the blank incremental model based on the comparison results; Step 14: Combine the user-defined specific local tolerance data to adjust and repair the difference field dataset; Step 15: Re-render the incremental model of the blank based on the difference field dataset and present it in the view window; Step 16: Based on the difference field dataset and the toolpath association database, generate a difference analysis result report.
[0080] Understandably, the above simulation method transforms ordinary mesh models into geometric incremental mesh models with business data information and approximate geometric relationships by reconstructing geometric topological relationships and associating toolpath relationships on the meshed blank model. The rich data of this geometric incremental mesh model has stronger data orientation and analytical breadth than that of a single mesh model.
[0081] For example, in business scenarios involving chamfering, this incremental model can quickly locate all chamfer-related surface data and implement various customized business functions based on this: such as ignoring overcut alarms for these surfaces, automatically analyzing the spatial dimensions of the chamfer, etc. Similarly, in the business scenario of thread drilling, this incremental model can also quickly locate the surface data of all drilling surfaces and automatically analyze the spatial dimensions of the drill hole—depth, width, etc.—and further analyze the thread quality, etc. These scenarios are beyond the capabilities of model comparison techniques (based on pure mesh models) in related technologies.
[0082] Furthermore, by combining mesh model comparison technology processes, it can provide functions such as full-process toolpath association alarms on the basis of the original color rendering, as well as establish local tolerance and local geometric analysis, to provide more efficient and reliable differential analysis reports, helping users to locate erroneous toolpaths and erroneous processes more quickly.
[0083] For example, Figure 3 This is a schematic diagram of an ideal workpiece model provided in an embodiment of this application. Figure 4 This is a schematic diagram of a blank model to be cut according to an embodiment of this application. Figure 5 This is a schematic diagram of a resulting blank model provided in an embodiment of this application, such as... Figure 5 As shown, compared to the ideal workpiece model, some edges of the resulting blank model were additionally cut.
[0084] Figure 6 This is a schematic diagram of the model comparison rendering result of a related technology provided in an embodiment of this application. Figure 7 This is one of the schematic diagrams of a rendering result provided in an embodiment of this application, such as... Figure 7 As shown, by combining toolpath data into the incremental MESH model, a directional label can be displayed in the rendering area when an alarm occurs, and the label indicates key data such as toolpath information and the amount of incorrect cutting. Furthermore, the model rendering results show that… Figure 7 Compare Figure 6 The contrast is significantly more accurate and better, and the overcut rendering of the beveled area (where the red area indicates overcut) is more coherent, complete, and clear.
[0085] Furthermore, by establishing an incremental MESH model, secondary business analysis and processing can be performed on toolpath cutting surfaces such as chamfering and drilling. Figure 8 This is a second schematic diagram of a rendering result provided in an embodiment of this application, as shown below. Figure 8 As shown, when the user sets the tolerance for chamfered parts to 1, all chamfered parts in the re-rendered model turn into normal gray, thus achieving automatic ignoring and filtering of difference messages.
[0086] In summary, the above steps can provide a more accurate and convenient method for model differentiation analysis, helping users quickly locate incorrect toolpaths, batch ignore localized difference alarms in special machining scenarios, and realize geometric data analysis and interaction for special machining areas based on extended mesh models.
[0087] See Figure 9 , Figure 9 This is a schematic diagram of the structure of a simulation device provided in an embodiment of this application, such as... Figure 9 As shown, the simulation device 900 includes: The first processing module 901 is used to perform cutting simulation processing on the original mesh model based on the toolpath process set to obtain the first mesh model. The original mesh model is a three-dimensional model of the workpiece to be processed, and the toolpath process set is a set of machining toolpaths for the workpiece to be processed. Analysis module 902 is used to perform correlation analysis on the toolpath process set and the first mesh model to obtain correlation information. The correlation information is used to indicate the correlation relationship between the triangular facets of the first mesh model and the machining toolpaths in the toolpath process set. The second processing module 903 is used to perform data expansion processing on the first grid model based on the association information to obtain a second grid model, wherein the second grid model includes the first grid model and the association information; The comparison module 904 is used to compare the second mesh model with a preset ideal workpiece model to obtain a difference field dataset, wherein the ideal workpiece is the ideal workpiece of the workpiece to be processed, and the difference field dataset is used to characterize the difference between the second mesh model and the ideal workpiece model; The rendering module 905 is used to render the second mesh model based on the difference field dataset to obtain a rendering result. The rendering result includes prompt information, which is used to indicate the difference between the first mesh model and the ideal workpiece model and the name of the machining toolpath corresponding to the difference.
[0088] Optionally, the device further includes: The acquisition module is used to acquire the tolerance rules input by the user, the tolerance rules including the error range corresponding to the machining toolpaths in the toolpath process set; The rendering module 905 includes: The deletion unit is used to delete all difference field data corresponding to the first machining toolpath in the difference field dataset to obtain an updated difference field dataset, wherein the first machining toolpath is: the machining toolpath whose difference between the corresponding second mesh model and the ideal workpiece model is within the error range; The rendering unit is used to render the second mesh model based on the updated difference field dataset to obtain rendering information.
[0089] Optionally, the analysis module 902 includes: The identification unit is used to identify the triangular facets in the first mesh model to obtain a first region set, wherein the first region set includes all regions in the first mesh model that have preset geometric features; The association unit is used to associate the regions in the first region set with the corresponding machining toolpaths in the toolpath process set to obtain the association information, wherein the association information includes the machining toolpaths corresponding to each region in the first region set.
[0090] Optionally, the preset geometric features include at least one of a plane, a cylindrical surface, a conical surface, a chamfered surface, and a rounded corner surface.
[0091] Optionally, the device further includes: The receiving module is used to receive a service request input by a user, the service request being used to obtain the spatial dimensions of a preset area, the first set of areas including the preset area; The determination module is used to respond to the business request, determine the position of the preset area in the second grid model based on the association information, and calculate the spatial size of the preset area; The output module is used to output the spatial dimensions of the preset area.
[0092] Optionally, the comparison module 904 includes: A determining unit is configured to determine a second region set in the second grid model, wherein the second region set includes multiple first grid regions in the second grid model, and the first grid regions are regions whose processing complexity value is greater than a preset threshold, wherein the processing complexity value is associated with at least one of the following: processing time, number of processing steps, and shape of the corresponding region; A partitioning unit is used to re-partition the target region indicated by the second region set in the second mesh model to obtain a third mesh model, wherein the mesh density of the target region in the third mesh model is greater than the mesh density of the target region in the second mesh model; The first comparison unit is used to compare the third mesh model with the preset ideal workpiece model to obtain the difference field dataset.
[0093] Optionally, the comparison module 904 includes: The construction unit is used to construct a spatial index for the second mesh model and the ideal workpiece model using a spatial positioning algorithm; The second comparison unit is used to compare the second mesh model and the ideal workpiece model based on the spatial index to obtain a difference field dataset.
[0094] Optionally, the device further includes: A generation module is used to generate an analysis report based on the difference field dataset and the correlation information. The analysis report is used to indicate the difference between the second mesh model and the ideal workpiece model, as well as the name of the machining toolpath corresponding to the difference.
[0095] It should be noted that the simulation device provided in this application embodiment is a device capable of executing the above simulation method. Therefore, all implementation methods in the above simulation method embodiments are applicable to this device and can achieve the same or similar beneficial effects. To avoid repetition, this embodiment will not elaborate further.
[0096] The simulation device in this application embodiment can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. Non-mobile electronic devices can also be servers, network attached storage (NAS), personal computers (PCs), televisions (TVs), ATMs, or self-service machines, etc. This application embodiment does not specifically limit the scope of the device.
[0097] See Figure 10 This application also provides an electronic device, such as... Figure 10As shown, the electronic device 1000 includes a processor 1001 and a memory 1002. The memory 1002 stores a program or instructions that can run on the processor 1001. When the program or instructions are executed by the processor 1001, they implement the various steps of the above simulation method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.
[0098] This application also provides a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the various processes of the above-described simulation method embodiments and achieves the same technical effects. To avoid repetition, it will not be described again here. The computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.
[0099] This application also provides a computer program product, including computer instructions. When these computer instructions are executed by a processor, they implement the various processes of the above-described simulation method embodiments and achieve the same technical effects. To avoid repetition, they will not be described again here.
[0100] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0101] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0102] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. A simulation method, characterized by, The method comprises the following steps: cutting simulation processing is performed on an original grid model based on a tool path procedure set to obtain a first grid model, the original grid model being a three-dimensional model of a workpiece to be machined, and the tool path procedure set being a machining tool path set of the workpiece to be machined; correlation analysis is performed on the tool path procedure set and the first grid model to obtain correlation information, the correlation information being used to indicate the correlation between the triangular facets of the first grid model and the machining tool paths in the tool path procedure set; data expansion processing is performed on the first grid model based on the correlation information to obtain a second grid model, the second grid model comprising the first grid model and the correlation information; comparison is performed between the second grid model and a preset ideal workpiece model to obtain a difference field data set, wherein the ideal workpiece is an ideal workpiece of the workpiece to be machined, and the difference field data set is used to represent the difference between the second grid model and the ideal workpiece model; rendering is performed on the second grid model based on the difference field data set to obtain a rendering result, the rendering result comprising prompt information, the prompt information being used to indicate the difference between the first grid model and the ideal workpiece model and the name of the machining tool path corresponding to the difference.
2. The method of claim 1, wherein, Before the rendering is performed on the second grid model based on the difference field data set, the method further comprises: obtaining a tolerance rule input by a user, the tolerance rule comprising an error range corresponding to a machining tool path in the tool path procedure set; the rendering is performed on the second grid model based on the difference field data set to obtain rendering information, comprising: deleting the difference field data corresponding to all first machining tool paths in the difference field data set to obtain an updated difference field data set, wherein the first machining tool path is a machining tool path whose difference between the corresponding second grid model and the ideal workpiece model is within the error range; rendering is performed on the second grid model based on the updated difference field data set to obtain rendering information.
3. The method of claim 1, wherein, The correlation analysis performed on the tool path procedure set and the first grid model to obtain the correlation information comprises: identifying the triangular facets in the first grid model to obtain a first region set, wherein the first region set comprises all regions having a preset geometric feature in the first grid model; associating the regions in the first region set with the corresponding machining tool paths in the tool path procedure set to obtain the correlation information, wherein the correlation information comprises the machining tool path corresponding to each region in the first region set.
4. The method of claim 3, wherein, The preset geometric feature comprises at least one of a plane, a cylindrical surface, a conical surface, a chamfer surface and a fillet surface.
5. The method of claim 3, wherein, The method further comprises: receiving a service request input by a user, the service request being used to obtain the spatial size of a preset region, and the first region set comprising the preset region; in response to the service request, determining the position of the preset region in the second grid model based on the correlation information and calculating the spatial size of the preset region; outputting the spatial size of the preset region.
6. The method of claim 1, wherein, The second grid model is compared with a preset ideal workpiece model to obtain a difference field data set, including: A second region set is determined in the second grid model, where the second region set includes a plurality of first grid regions in the second grid model, and the first grid region is a region with a machining process complexity value greater than a preset threshold, where the machining process complexity value is associated with at least one of the following information: machining time, number of machining procedures, and shape of the corresponding region; The target region indicated by the second region set is re-divided in the second grid model to obtain a third grid model, where the grid density of the target region in the third grid model is greater than the grid density of the target region in the second grid model; The third grid model is compared with a preset ideal workpiece model to obtain a difference field data set.
7. The method of claim 1, wherein, The second grid model is compared with a preset ideal workpiece model to obtain a difference field data set, including: A spatial positioning algorithm is used to construct a spatial index for the second grid model and the ideal workpiece model; The second grid model and the ideal workpiece model are compared based on the spatial index to obtain a difference field data set.
8. The method of claim 1, wherein, After the second grid model is compared with a preset ideal workpiece model to obtain a difference field data set, the method further includes: Based on the difference field data set and the associated information, an analysis report is generated, which is used to indicate the difference between the second grid model and the ideal workpiece model and the name of the machining tool path corresponding to the difference.
9. An emulation apparatus, characterized by, Including: The first processing module is configured to perform cutting simulation processing on the original grid model based on the tool path procedure set to obtain a first grid model, the original grid model being a three-dimensional model of a workpiece to be machined, and the tool path procedure set being a machining tool path set of the workpiece to be machined; The analysis module is configured to perform correlation analysis on the tool path procedure set and the first grid model to obtain correlation information, the correlation information being used to indicate the correlation between the triangular patches of the first grid model and the machining tool paths in the tool path procedure set; The second processing module is configured to perform data expansion processing on the first grid model based on the correlation information to obtain a second grid model, the second grid model including the first grid model and the correlation information; The comparison module is configured to compare the second grid model with a preset ideal workpiece model to obtain a difference field data set, where the ideal workpiece is an ideal workpiece of the workpiece to be machined, and the difference field data set is used to represent the difference between the second grid model and the ideal workpiece model; The rendering module is configured to render the second grid model based on the difference field data set to obtain a rendering result, the rendering result including prompt information, the prompt information being used to indicate the difference between the first grid model and the ideal workpiece model and the name of the machining tool path corresponding to the difference.
10. An electronic device, comprising: The electronic device comprises a processor and a memory, the memory storing a program or instructions executable on the processor, the program or instructions being executed by the processor to implement the steps of the simulation method according to any one of claims 1 to 8.
11. A computer readable storage medium, characterized in that, The computer readable storage medium stores a computer program, the computer program being executed by the processor to implement the steps of the simulation method according to any one of claims 1 to 8.
12. A computer program product, characterised in that, The computer program product comprises computer instructions, the computer instructions being executed by the processor to implement the steps of the simulation method according to any one of claims 1 to 8.