Method and system for displaying, storing and backtracking residual blank in machining process
By using the residual rough coding of Tri-DEXEL models in CNC processing, the problems of residual rough display, storage and retrospective efficiency in existing technologies have been solved, and efficient data processing and rapid feedback are achieved.
Patent Information
- Application Number
- CN202411365850.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-01-24
AI Technical Summary
In the field of CNC machining, it is difficult to efficiently display, store and trace the residual blanks in the machining process, especially when processing complex workpieces, there are problems such as low computing efficiency, large storage requirements and feedback delays.
Using the residual rough coding of the Tri-DEXEL model, by constructing the Tri-DEXEL data structure that constructs the initial rough and knife, a vitamin is used for the data structure after the updated residual rough. Methods Storage and retrospective.
It realizes the rapid display and storage of residual rough during real -time processing, and supports the rapid return to any processing status, which improves the degree of visualization and data processing efficiency of the processing process.
Smart Images

Figure CN119358063A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of blank processing, and in particular to a method and system for displaying, storing and backtracking residual blanks during a processing process. Background Art
[0002] In the field of CNC machining, computer-aided manufacturing (CAM) software has become an indispensable tool for designing and optimizing machining processes. CAM software generates machining tool paths and performs cutting simulation before actual machining to predict and verify machining results. However, during the machining simulation process, real-time display, efficient storage, and retrospective viewing of the residual blank are key links to ensure machining quality and efficiency.
[0003] Traditional residual stock representation methods, such as STL models or voxel grids, can simulate the cutting process to a certain extent, but they have many shortcomings. When dealing with complex geometric shapes, the STL model has a large number of triangular facets, resulting in low computational efficiency and difficulty in accurately representing the residual stock after cutting. Although the voxel grid method can simplify Boolean operations in three-dimensional space, it requires extremely small voxel units at high resolution, resulting in a sharp increase in storage requirements and a complex subsequent surface mesh reconstruction process.
[0004] In addition, existing residual blank display and backtracking technologies often rely on large amounts of data storage and complex calculation processes, making it difficult to provide efficient feedback during real-time machining. Especially when processing complex workpieces, it is difficult to accurately determine whether all machining areas have been correctly cut based on the naked eye and experience alone, which increases uncertainty and risk during the machining process. Summary of the invention
[0005] The present invention aims to propose an efficient residual blank encoding method based on the Tri-Dexel model, which can efficiently compress and store the residual blank in the machining process, realize the rapid display of the residual blank of the specified tool position point during tool path backtracing, and solve the display problem of the residual blank of the Tri-Dexel model in the real-time machining process and the backtracing process.
[0006] To this end, the present invention provides a method for displaying, storing and tracing residual blanks during a machining process, comprising the following steps:
[0007] S1: Based on the geometric shape of the initial blank, construct the Tri-Dexel data structure of the initial blank;
[0008] S2: During the cutting simulation, a tool swept volume model is constructed according to the current tool position and the tool position at the last refresh step, and the intersection area between the bounding box of the tool swept volume model and the bounding box of the initial blank is solved to obtain a pre-processing area;
[0009] S3: Based on the pre-processing area, a Tri-Dexel data structure of a tool-swept body is constructed, and a one-dimensional Boolean difference operation is performed on the Tri-Dexel data structure of the initial blank and the Tri-Dexel data structure of the tool-swept body to obtain an updated Tri-Dexel data structure of the residual blank;
[0010] S4: storing the updated Tri-Dexel data structure of the residual blank according to the current simulation time and the current tool position, and when the simulation is paused, obtaining the cached residual blank closest to the simulation time according to the simulation time of the specified tool position;
[0011] S5: Calculate the processing path from the cached residual blank to the currently specified tool position, use the processing path to process the cached residual blank, and determine whether the blank after processing meets the expected requirements:
[0012] If not, return to step S2 and update the residual blank to the residual blank state of the specified tool position;
[0013] If so, the final residual blank Tri-Dexel data structure is obtained.
[0014] In one embodiment of the present invention, in S1, the method for constructing the Tri-Dexel data structure of the initial blank is as follows:
[0015] S11: discretizing the initial blank into a mesh model composed of triangular facets composed of multiple vertices, traversing all vertices of the mesh model, obtaining the minimum coordinate value and the maximum coordinate value in the x-, y-, and z-axis directions, so as to obtain a bounding box of the initial blank;
[0016] S12: within the limited range of the bounding box of the initial blank, project multiple straight lines along the three axes of x, y, and z to intersect the initial blank, and the interval between adjacent straight lines is r;
[0017] S13: Each straight line intersecting with the blank will generate an even number of intersection points, which are recorded as dexel vertices. The pairs of dexel vertices on each straight line constitute a dexel line segment. Each dexel vertex includes the blank surface information such as the depth value, normal and color at the current position.
[0018] S14: Multiple dexel line segments constitute an approximate representation of the initial blank surface, that is, the Tri-Dexel data structure of the initial blank.
[0019] In one embodiment of the present invention, in S2, the method for obtaining the pre-processed area is as follows:
[0020] S21: Calculate the moving path of the tool according to the geometric shape and current position of the current tool and the tool position of the previous step;
[0021] S22: along the moving path, stretching the geometric shape of the tool along the time axis or the moving direction to obtain a three-dimensional tool swept volume model;
[0022] S23: calculating a bounding box of the tool swept volume model based on the tool swept volume model;
[0023] S24: Acquire the intersection area between the bounding box of the tool swept volume model and the bounding box of the initial blank, that is, the pre-processing area, by a face-by-face or voxel-by-voxel method.
[0024] In one embodiment of the present invention, the Tri-Dexel data structure of the tool sweep volume or the Tri-Dexel data structure of the initial blank divides the corresponding three-dimensional space into multiple two-dimensional dexel layers parallel to any coordinate axis, each layer is composed of multiple two-dimensional voxels, and each voxel stores the distance information from the layer to the blank or tool surface.
[0025] In one embodiment of the present invention, in S3, the method for obtaining the updated Tri-Dexel data structure of the residual blank is as follows:
[0026] Each dexel layer in the Tri-Dexel data structure of the tool sweep volume and the initial blank is traversed, and on the dexel layer where the two intersect, a Boolean difference is performed on each intersecting voxel to obtain the depth difference between the two, and the depth value of the corresponding voxel is updated using the depth difference to obtain the updated Tri-Dexel data structure of the residual blank.
[0027] In one embodiment of the present invention, the method for storing the updated Tri-Dexel data structure of the residual blank is as follows:
[0028] Set a cache time, save the Tri-Dexel data structure of the current residual blank at each cache time interval, and first compress the dexel vertices in the Tri-Dexel data structure by changing their data types;
[0029] Create an index array to mark the grid containing dexel data, and a data array to store the dexel data in the corresponding grid;
[0030] Convert the index array and the data array into binary data in a Base64 encoding manner, and encode the binary data into a string;
[0031] The character string is further compressed, and the compressed data is named with the current simulation time and tool position information, and stored in the local terminal device.
[0032] In one embodiment of the present invention, in S4, the method for obtaining the cache residual blank closest to the simulation time is as follows:
[0033] According to the simulation time of the designated tool position, find the residual blank cache file with the latest time and earlier than the simulation time, decompress the residual blank cache file, and restore the string after the residual blank is encoded;
[0034] The string is restored into binary data, the index array and the data array are extracted from the binary data, the dexel data structure of the residual blank is initialized in memory according to the index array, and the data array is processed at the same time, each dexel compressed data is extracted, and the dexel original data is restored, and finally the cached residual blank closest to the simulation time is obtained.
[0035] Based on the same inventive concept, the present invention also provides a display, storage and backtracking implementation system for residual blanks in a machining process, which is used to implement the steps of the display, storage and backtracking implementation method for residual blanks in a machining process. The system includes the following modules:
[0036] A blank data structure building module is used to build a Tri-Dexel data structure of the initial blank based on the geometric shape of the initial blank;
[0037] A pre-processing area acquisition module is used to construct a tool swept volume model according to the current tool position and the tool position at the last refresh step during the cutting simulation, and solve the intersection area between the bounding box of the tool swept volume model and the bounding box of the initial blank to obtain the pre-processing area;
[0038] A blank data updating module is used to construct a Tri-Dexel data structure of a tool swept body based on the pre-processing area, and perform a one-dimensional Boolean difference operation on the Tri-Dexel data structure of the initial blank and the Tri-Dexel data structure of the tool swept body to obtain an updated Tri-Dexel data structure of the residual blank;
[0039] A blank data backtracking module is used to store the updated Tri-Dexel data structure of the residual blank according to the current simulation time and the current tool position; when the simulation is paused, the cached residual blank closest to the simulation time is obtained according to the simulation time of the specified tool position;
[0040] The blank data display module is used to calculate the processing path between the cached residual blank and the currently specified tool position, and use the processing path to update the residual blank state of the residual blank to the specified tool position to obtain the final residual blank Tri-Dexel data structure.
[0041] The present invention also provides an electronic device, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned method for displaying, storing and backtracking residual blanks during machining when executing the program.
[0042] The present invention also provides a computer storage medium, which stores a computer software product. The computer software product includes several instructions for enabling a computer device to execute the software program instructions of the above-mentioned method for displaying, storing and backtracking residual blanks during the machining process.
[0043] The above technical solution of the present invention has the following advantages compared with the prior art:
[0044] 1. Efficient data structure: The Tri-Dexel data structure is used to represent the initial blank and the tool sweep volume. This structure generates dexel line segments by projecting straight lines along three coordinate axes and intersecting them with the blank, which greatly simplifies Boolean operations in three-dimensional space and improves data processing efficiency.
[0045] 2. Accurate cutting simulation: By constructing a tool swept volume model and solving the intersection area with the initial blank as the pre-processing area, the change of the blank shape during the cutting process can be accurately simulated to ensure the accuracy of the simulation results.
[0046] 3. Fast data update and display: During the cutting simulation process, the Tri-Dexel data structure of the initial blank and the tool sweep body is Boolean subtraction operation is performed in real time to quickly update the data structure of the residual blank, and the residual blank of the specified tool position point is quickly displayed when necessary, which improves the visualization of the machining process.
[0047] 4. Efficient storage and backtracking: The updated residual stock data is stored in an efficient encoding method, which reduces the storage space requirements. At the same time, it supports rapid backtracking to the residual stock in any processing state according to the simulation time and tool position, which is convenient for problem diagnosis and adjustment. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to make the content of the present invention more clearly understood, the present invention is further described in detail below according to specific embodiments of the present invention in conjunction with the accompanying drawings, wherein
[0049] Figure 1It is a flow chart of the method for displaying, storing and backtracking residual blanks during machining provided in the first embodiment of the present invention;
[0050] Figure 2 is a flow chart of a method for constructing a Tri-Dexel data structure of an initial blank provided in the first embodiment of the present invention;
[0051] Figure 3 Schematic diagram of the Tri-Dexel data structure of the initial blank provided in the first embodiment of the present invention;
[0052] Figure 4 is a flow chart of a method for obtaining a pre-processed area provided in Embodiment 1 of the present invention;
[0053] Figure 5 It is a schematic diagram of the structure of a system for displaying, storing and tracing residual blanks during machining provided in the second embodiment of the present invention;
[0054] Description of the accompanying drawings in the specification: 100, blank data structure building module; 200, pre-processing area acquisition module; 300, blank data update module; 400, blank data backtracking module; 500, blank data display module. DETAILED DESCRIPTION
[0055] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it, but the embodiments are not intended to limit the present invention.
[0056] Embodiment 1
[0057] Reference Figure 1 As shown, the present invention provides a method for displaying, storing and backtracking residual blanks during a machining process, comprising the following steps:
[0058] S1: Based on the geometric shape of the initial blank, the ray and blank are solved from the x, y, and z axis directions with a grid of r×r size, and the depth, normal, and color information of the intersection are recorded to construct the Tri-Dexel data structure of the initial blank;
[0059] S2: During the cutting simulation, a tool swept volume model is constructed according to the current tool position and the tool position at the last refresh step, and the intersection area between the bounding box of the tool swept volume model and the bounding box of the initial blank is solved to obtain a pre-processing area;
[0060] S3: Based on the pre-processing area, a Tri-Dexel data structure of a tool-swept body is constructed, and a one-dimensional Boolean difference operation is performed on the Tri-Dexel data structure of the initial blank and the Tri-Dexel data structure of the tool-swept body to obtain an updated Tri-Dexel data structure of the residual blank;
[0061] S4: storing the updated Tri-Dexel data structure of the residual blank according to the current simulation time and the current tool position, and when the simulation is paused, obtaining the cached residual blank closest to the simulation time according to the simulation time of the specified tool position;
[0062] S5: Calculate the processing path from the cached residual blank to the currently specified tool position, use the processing path to process the cached residual blank, and determine whether the blank after processing meets the expected requirements:
[0063] If not, return to step S2 and update the residual blank to the residual blank state of the specified tool position;
[0064] If so, the final residual blank Tri-Dexel data structure is obtained.
[0065] See also Figure 2 and Figure 3 As shown, in step S1, the method for constructing the Tri-Dexel data structure of the initial blank is as follows:
[0066] S11: discretizing the initial blank into a mesh model composed of triangular facets composed of multiple vertices, traversing all vertices of the mesh model, obtaining the minimum coordinate value and the maximum coordinate value in the x-, y-, and z-axis directions, so as to obtain a bounding box of the initial blank;
[0067] Taking the z-axis as an example (i.e. the dexel layer is parallel to the z-axis), the number of dexels in each layer depends on the size in the x and y directions and the simulation resolution r. Get the minimum and maximum coordinate values of the initial blank mesh model in the x and y axis directions, i.e. x_min, x_max, y_min, y_max. If the cutting simulation resolution is r, the number of grids num in each dexel data layer in the z-axis direction is: Taking a grid as an example, we can get a line segment from point (x,y,z_min) to point (x,y,z_max), which can be regarded as a slice of the dexel layer at the (x,y) position;
[0068] S12: within the limited range of the bounding box of the initial blank, project multiple straight lines along the three axes of x, y, and z to intersect the initial blank, and the interval between adjacent straight lines is r;
[0069] S13: Each straight line intersecting with the blank will generate an even number of intersection points, which are recorded as dexel vertices. The pairs of dexel vertices on each straight line constitute a dexel line segment. Each dexel vertex includes the blank surface information such as the depth value, normal and color at the current position.
[0070] S14: Multiple dexel line segments constitute an approximate representation of the initial blank surface. The Marching Cubes method is used to construct the Tri-Dexel mesh surface of the initial blank, that is, the Tri-Dexel data structure of the initial blank, which is displayed in the 3D view of CAM.
[0071] like Figure 4 As shown, in step S2, the method for obtaining the pre-processing area is as follows:
[0072] S21: Calculate the moving path of the tool according to the geometric shape and current position of the current tool and the tool position of the previous step;
[0073] S22: along the moving path, stretching the geometric shape of the tool along the time axis or the moving direction to obtain a three-dimensional tool swept volume model;
[0074] S23: calculating a bounding box of the tool swept volume model based on the tool swept volume model;
[0075] S24: Acquire the intersection area between the bounding box of the tool swept volume model and the bounding box of the initial blank, that is, the pre-processing area, by a face-by-face or voxel-by-voxel method.
[0076] The Tri-Dexel data structure of the tool sweep volume or the Tri-Dexel data structure of the initial blank divides the corresponding three-dimensional space into multiple two-dimensional dexel layers parallel to any coordinate axis, each layer is composed of multiple two-dimensional voxels, and each voxel stores the distance information from the layer to the blank or tool surface.
[0077] Furthermore, in step S3, the method for obtaining the updated Tri-Dexel data structure of the residual blank is as follows:
[0078] Traverse each dexel layer in the Tri-Dexel data structure of the tool sweep volume and the initial blank, perform Boolean difference on each intersecting voxel on the dexel layer where the two intersect, and obtain the depth difference between the two, use the depth difference to update the depth value of the corresponding voxel, and obtain the updated Tri-Dexel data structure of the residual blank. For the updated part of the residual blank dexel, reuse the Marching Cubes method to locally update the cut mesh, and update the 3D view in the CAM software.
[0079] Furthermore, in step S4, the method for storing the updated Tri-Dexel data structure of the residual blank is as follows:
[0080] A cache time is set, and the Tri-Dexel data structure of the current residual blank is saved at intervals of the cache time. First, the dexel vertices in the Tri-Dexel data structure are compressed by changing their data types. For example, surface information such as normal and color can be compressed from double floating point data to float single floating point data to reduce memory usage and achieve preliminary data compression;
[0081] Create an index array, such as a hash table or sparse matrix, which only marks the rasters containing dexel data, and a data array to centrally store the dexel data in all valid rasters marked by the index array;
[0082] Convert the index array and the data array into binary data in a Base64 encoding manner, and encode the binary data into a string;
[0083] The Base64 encoded string generated in the previous step is further compressed using string compression algorithms such as LZ77, LZ78, and LZSS to minimize storage requirements. The compressed data is named with the current simulation time and tool position information as the file name to ensure data traceability and version management. Finally, the compressed and named data is stored in the file system of the local terminal device to facilitate subsequent data retrieval, backtracking, and analysis operations.
[0084] Through the above technical solution, not only the storage space requirement of the residual blank Tri-Dexel data structure is effectively reduced, but also the efficiency and flexibility of data access are improved, providing strong support for accurate simulation and problem diagnosis of the machining process.
[0085] Further, in step S4, the method for obtaining the cache residual blank closest to the simulation time is as follows:
[0086] According to the simulation time of the designated tool position, find the residual blank cache file with the latest time and earlier than the simulation time, decompress the residual blank cache file, and restore the string after the residual blank is encoded;
[0087] The string is restored into binary data, the index array and the data array are extracted from the binary data, the dexel data structure of the residual blank is initialized in memory according to the index array, and the data array is processed at the same time, each dexel compressed data is extracted, and the dexel original data is restored, and finally the cached residual blank closest to the simulation time is obtained.
[0088] Embodiment 2
[0089] Based on the same inventive concept as the first embodiment, the present invention also provides a display, storage and backtracking implementation system for residual blanks in a machining process, which is used to implement the steps of the display, storage and backtracking implementation method for residual blanks in a machining process provided in the first embodiment. Figure 5 As shown, the system includes the following modules:
[0090] A blank data structure building module 100 is used to build a Tri-Dexel data structure of the initial blank based on the geometric shape of the initial blank;
[0091] The pre-processing area acquisition module 200 is used to construct a tool swept volume model according to the current tool position and the tool position at the last refresh step during the cutting simulation, and solve the intersection area between the bounding box of the tool swept volume model and the bounding box of the initial blank to obtain the pre-processing area;
[0092] The blank data updating module 300 is used to construct a Tri-Dexel data structure of a tool swept body based on the pre-processing area, and perform a one-dimensional Boolean difference operation on the Tri-Dexel data structure of the initial blank and the Tri-Dexel data structure of the tool swept body to obtain an updated Tri-Dexel data structure of the residual blank;
[0093] The blank data backtracking module 400 is used to store the updated Tri-Dexel data structure of the residual blank according to the current simulation time and the current tool position; when the simulation is paused, the cached residual blank closest to the simulation time is obtained according to the simulation time of the specified tool position;
[0094] The blank data display module 500 is used to calculate the machining path from the cached residual blank to the currently specified tool position, and use the machining path to update the residual blank state from the residual blank to the specified tool position to obtain the final residual blank Tri-Dexel data structure.
[0095] The present embodiment proposes a system for displaying, storing and backtracing residual blanks during machining, which is used to implement the aforementioned method for displaying, storing and backtracing residual blanks during machining. Therefore, the specific implementation methods of the system for displaying, storing and backtracing residual blanks during machining can be seen from the aforementioned embodiment part of the method for displaying, storing and backtracing residual blanks during machining. For example, the blank data structure construction module 100, the pre-machining area acquisition module 200, the blank data update module 300, the blank data backtracing module 400 and the blank data display module 500 are respectively used to implement the steps S1, S2, S3, S4 and S5 in the method for displaying, storing and backtracing residual blanks during machining in the first embodiment. Therefore, its specific implementation methods can refer to the descriptions of the corresponding embodiments of each part. In order to avoid redundancy, they will not be repeated here.
[0096] Embodiment 3
[0097] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for displaying, storing, and backtracking residual blanks for a machining process provided in the first embodiment is implemented.
[0098] Embodiment 4
[0099] The present invention also provides a computer storage medium, which stores a computer software product. The computer software product includes several instructions for enabling a computer device to execute the software program instructions of the method for displaying, storing and backtracking residual blanks in the machining process provided in the above-mentioned embodiment one.
[0100] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0101] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0102] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0103] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0104] Obviously, the above embodiments are merely examples for clear explanation and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived from these are still within the protection scope of the invention.
Claims
1. A method for displaying, storing and tracing residual blanks during machining, characterized in that: The following steps are involved: S1: Based on the geometric shape of the initial blank, construct the Tri-Dexel data structure of the initial blank; S2: During the cutting simulation, a tool swept volume model is constructed according to the current tool position and the tool position at the last refresh step, and the intersection area between the bounding box of the tool swept volume model and the bounding box of the initial blank is solved to obtain a pre-processing area; S3: Based on the pre-processing area, a Tri-Dexel data structure of a tool-swept body is constructed, and a one-dimensional Boolean difference operation is performed on the Tri-Dexel data structure of the initial blank and the Tri-Dexel data structure of the tool-swept body to obtain an updated Tri-Dexel data structure of the residual blank; S4: storing the updated Tri-Dexel data structure of the residual blank according to the current simulation time and the current tool position, and when the simulation is paused, obtaining the cached residual blank closest to the simulation time according to the simulation time of the specified tool position; S5: Calculate the processing path from the cached residual blank to the currently specified tool position, use the processing path to process the cached residual blank, and determine whether the blank after processing meets the expected requirements: If not, return to step S2 and update the residual blank to the residual blank state of the specified tool position; If so, the final residual blank Tri-Dexel data structure is obtained.
2. The method for displaying, storing and tracing residual blanks during machining according to claim 1 is characterized in that: In S1, the method for constructing the Tri-Dexel data structure of the initial blank is as follows: S11: discretizing the initial blank into a mesh model composed of triangular facets composed of multiple vertices, traversing all vertices of the mesh model, obtaining the minimum coordinate value and the maximum coordinate value in the x-, y-, and z-axis directions, so as to obtain a bounding box of the initial blank; S12: within the limited range of the bounding box of the initial blank, project multiple straight lines along the three axes of x, y, and z to intersect the initial blank, and the interval between adjacent straight lines is r; S13: Each straight line intersecting with the blank will generate an even number of intersection points, which are recorded as dexel vertices. The pairs of dexel vertices on each straight line constitute a dexel line segment. Each dexel vertex includes the blank surface information such as the depth value, normal and color at the current position. S14: Multiple dexel line segments constitute an approximate representation of the initial blank surface, that is, the Tri-Dexel data structure of the initial blank.
3. The method for displaying, storing and tracing residual blanks during machining according to claim 1 is characterized in that: In S2, the method for obtaining the pre-processing area is as follows: S21: Calculate the moving path of the tool according to the geometric shape and current position of the current tool and the tool position of the previous step; S22: along the moving path, stretching the geometric shape of the tool along the time axis or the moving direction to obtain a three-dimensional tool swept volume model; S23: calculating a bounding box of the tool swept volume model based on the tool swept volume model; S24: Acquire the intersection area between the bounding box of the tool swept volume model and the bounding box of the initial blank, that is, the pre-processing area, by a face-by-face or voxel-by-voxel method.
4. The method for displaying, storing and tracing residual blanks during machining according to claim 1 is characterized in that: The Tri-Dexel data structure of the tool sweep volume or the Tri-Dexel data structure of the initial blank divides the corresponding three-dimensional space into multiple two-dimensional dexel layers parallel to any coordinate axis, each layer is composed of multiple two-dimensional voxels, and each voxel stores the distance information from the layer to the blank or tool surface.
5. The method for displaying, storing and tracing residual blanks during machining according to claim 4 is characterized in that: In S3, the method for obtaining the updated Tri-Dexel data structure of the residual blank is as follows: Each dexel layer in the Tri-Dexel data structure of the tool sweep volume and the initial blank is traversed, and on the dexel layer where the two intersect, a Boolean difference is performed on each intersecting voxel to obtain the depth difference between the two, and the depth value of the corresponding voxel is updated using the depth difference to obtain the updated Tri-Dexel data structure of the residual blank.
6. The method for displaying, storing and tracing residual blanks during machining according to claim 1, characterized in that: In S4, the method for storing the updated Tri-Dexel data structure of the residual blank is as follows: Set a cache time, save the Tri-Dexel data structure of the current residual blank at each cache time interval, and first compress the dexel vertices in the Tri-Dexel data structure by changing their data types; Create an index array to mark the grid containing dexel data, and a data array to store the dexel data in the corresponding grid; Convert the index array and the data array into binary data in a Base64 encoding manner, and encode the binary data into a string; The character string is further compressed, and the compressed data is named with the current simulation time and tool position information, and stored in the local terminal device.
7. The method for displaying, storing and tracing residual blanks during machining according to claim 6 is characterized in that: In S4, the method for obtaining the cache residual blank closest to the simulation time is as follows: According to the simulation time of the designated tool position, find the residual blank cache file with the latest time and earlier than the simulation time, decompress the residual blank cache file, and restore the string after the residual blank is encoded; The string is restored into binary data, the index array and the data array are extracted from the binary data, the dexel data structure of the residual blank is initialized in memory according to the index array, and the data array is processed at the same time, each dexel compressed data is extracted, and the dexel original data is restored, and finally the cached residual blank closest to the simulation time is obtained.
8. A system for displaying, storing and tracing residual blanks during machining, characterized in that: The system is used to implement the method for displaying, storing and tracing residual blanks in a machining process according to any one of claims 1 to 7, wherein the system comprises the following modules: A blank data structure building module is used to build a Tri-Dexel data structure of the initial blank based on the geometric shape of the initial blank; A pre-processing area acquisition module is used to construct a tool swept volume model according to the current tool position and the tool position at the last refresh step during the cutting simulation, and solve the intersection area between the bounding box of the tool swept volume model and the bounding box of the initial blank to obtain the pre-processing area; A blank data updating module is used to construct a Tri-Dexel data structure of a tool swept body based on the pre-processing area, and perform a one-dimensional Boolean difference operation on the Tri-Dexel data structure of the initial blank and the Tri-Dexel data structure of the tool swept body to obtain an updated Tri-Dexel data structure of the residual blank; A blank data backtracking module is used to store the updated Tri-Dexel data structure of the residual blank according to the current simulation time and the current tool position; when the simulation is paused, the cached residual blank closest to the simulation time is obtained according to the simulation time of the specified tool position; The blank data display module is used to calculate the processing path between the cached residual blank and the currently specified tool position, and use the processing path to update the residual blank state of the residual blank to the specified tool position to obtain the final residual blank Tri-Dexel data structure.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method for displaying, storing and backtracking residual blanks in a machining process as described in any one of claims 1 to 7 is implemented.
10. A computer storage medium, characterized in that: The computer storage medium stores a computer software product, which includes a number of instructions for enabling a computer device to execute software program instructions for the method for displaying, storing and backtracking residual blanks in a machining process as described in any one of claims 1 to 7.
Citation Information
Cited By
Real-time cutting simulation method and system for staged processing
CN121328138A
Material removal process replay and cutting force parallel simulation method based on operation log
CN121559910A
Method for material removal process replay based on operation log and parallel simulation of cutting forces
CN121559910B