Search

CN-121997492-A - Five-axis real-time cutting simulation method based on voxels

CN121997492ACN 121997492 ACN121997492 ACN 121997492ACN-121997492-A

Abstract

The invention relates to the technical field of processing simulation, in particular to a five-axis real-time cutting simulation method based on voxels, which comprises the steps of determining the voxel size according to the number of rendered voxels, and carrying out voxelization treatment on workpiece modeling according to the voxel size to obtain a workpiece voxel grid model; and updating the model according to the pose information of the cutter in the voxel blocks and rendering. Aiming at the problems of low efficiency or insufficient precision in the cutting simulation process in the prior art when processing large-scale voxels, good rendering efficiency is realized by dynamically calculating the size of the rendered voxels and carrying out voxelization processing on the workpiece modeling, and the processing efficiency is improved by carrying out block processing on the workpiece voxel grid model and only carrying out local updating on a specific block which is contacted with a cutter when simulating cutting, thereby reducing the number of voxels needing to be re-simulated and rendered.

Inventors

  • WANG YUHAN
  • CHEN HAO
  • MA HULIANG

Assignees

  • 上海拓璞数控科技股份有限公司

Dates

Publication Date
20260508
Application Date
20260109

Claims (10)

  1. 1. A voxel-based five-axis real-time cutting simulation method, comprising: Step S1, extracting workpiece modeling of a workpiece to be processed, determining a voxel size according to the number of rendering voxels, carrying out voxelization on the workpiece modeling according to the voxel size to obtain a workpiece voxel grid model, and generating a cutter voxel grid model; S2, performing blocking treatment on the workpiece voxel grid model to obtain a plurality of voxel blocks; S3, when executing the cutting track, determining the voxel block and model voxels which are overlapped with the cutter voxel grid model according to pose information of the cutter; and S4, in the voxel block, updating the model voxels and then rendering.
  2. 2. The five-axis real-time cutting simulation method according to claim 1, wherein in the step S1, the method of calculating the voxel size includes: ; in the formula, For the size of the voxel in question, The length-width-height dimensions modeling the workpiece, And rendering the pixel number.
  3. 3. The five-axis real-time cutting simulation method according to claim 1, wherein in the step S1, the first generation process for generating the workpiece voxel grid model includes: a11, modeling the workpiece and determining the voxel size according to the rendering pixel number; A12, carrying out voxelization treatment on the workpiece modeling according to the voxel size to obtain a workpiece voxel grid model; A13, respectively storing each model voxel in the workpiece voxel grid model in a bit array; The bit array is a three-dimensional array and is respectively constructed according to the number of voxels of the workpiece voxel grid model in the length-width-height direction.
  4. 4. A five-axis real-time cutting simulation method according to claim 3, wherein in the bit array, an identification is further added for each model voxel, including a machining identification and a visual identification; the processing identifier is used for marking whether the model voxel exists in the processing process; The visual identification is used for marking whether the model voxel is visible under the current rendering view angle; And in the process of executing the five-axis real-time cutting simulation method, rendering and displaying the workpiece voxel grid model according to the bit array.
  5. 5. A five-axis real-time cutting simulation method according to claim 3, wherein in the step S1, the second generation process for generating the tool voxel grid model comprises: step B11, extracting a cutter from the cutter to perform three-dimensional modeling; step B12, voxelization treatment is carried out on the cutter three-dimensional modeling to obtain the cutter voxel grid model; and step B13, carrying out coordinate marking on the cutter voxel grid model by adopting a rotation matrix.
  6. 6. The five-axis real-time cutting simulation method according to claim 1, wherein the partitioning method in step S2 comprises: ; in the formula, The number of voxels in the length-width-height direction of the workpiece voxel grid model is determined; The block size in the length-width-height direction is preset; is the number of blocks in the length-width-height direction.
  7. 7. A five-axis real-time cutting simulation method according to claim 3, wherein the step S3 comprises: S31, acquiring pose information of the tool, and calculating the spatial position of each point in the voxel grid model of the tool in a workpiece coordinate system according to the pose information; S32, generating affected voxel coordinates according to the space position, and extracting corresponding model voxels; and step S33, searching corresponding voxels according to the affected voxel coordinates to determine the directly related voxel block and the adjacent voxel block.
  8. 8. The five-axis real-time cutting simulation method according to claim 7, wherein the step S32 comprises: step S321, generating affected voxel coordinates according to the spatial position; Step S322 is to perform a lookup in the bit array based on the affected voxel coordinates to determine the model voxels that are actually present.
  9. 9. The five-axis real-time cutting simulation method according to claim 1, wherein the step S4 comprises: Step 41, traversing each model voxel in the voxel block to re-mark the visibility of the model voxel and configuring corresponding vertex attributes; And step S42, updating and rendering the updated voxel block.
  10. 10. The five-axis real-time cutting simulation method according to claim 9, wherein in the step S4, before performing the step S42, further comprises: And step C41, traversing the model voxels, and merging rendering information when all adjacent voxels are visible.

Description

Five-axis real-time cutting simulation method based on voxels Technical Field The invention relates to the technical field of machining simulation, in particular to a five-axis real-time cutting simulation method based on voxels. Background In the field of numerical control machining, the simulation of the cutting process has important significance for verifying the machining process, avoiding collision interference and optimizing the cutter path. Cutting simulation is a process of establishing a tool and a workpiece model in a digital simulation environment, then simulating a running machining path so as to determine points where the tool can contact and cut, and verifying whether a machining program is reasonable according to the cut points and cutting conditions. The voxelization method is to discretize the three-dimensional object into a regular voxel grid, and the existence state of the voxels is used for representing the object shape, so that the voxelization method has the advantages of simple algorithm, easy parallel calculation and the like, and becomes an important technical direction of real-time cutting simulation. For example, patent document CN202411875692.4 discloses a cutting simulation method based on voxel dividing algorithm and incision sampling optimization, which comprises obtaining topology information of cut object and dividing triangular surface patches, carrying out voxel division on the outer surface of model by voxel dividing algorithm on the outer surface, carrying out voxel division on the inner part of model by scanning line algorithm to obtain three-dimensional voxel information of cut object, constructing BVH tree according to three-dimensional voxel information, establishing drawing unit, obtaining real-time position of cutter, carrying out collision detection with BVH tree to obtain cut voxel, recording drawing unit affiliated with cut voxel to update drawing list, self-defining a plurality of sampling optimizations for cut voxel, traversing each drawing unit in the update drawing list, and redrawing. The simulation method has excellent performance and reliability in the simulation field, and provides comprehensive and accurate simulation service for users. For another example, patent document with the application number of CN202110740089.5 discloses a voxel interference detection method and a voxel interference detection system oriented to machine tool machining process simulation, and belongs to the field of computer-aided manufacturing, wherein the method comprises the steps of establishing a blank into a voxel model consisting of a plurality of voxel nodes, traversing the voxel nodes in the voxel model, and deleting the voxel nodes interfering with the interior of a target workpiece to obtain a model to be cut; and carrying out collision detection on the voxel nodes in the model to be cut and the cutter, and determining target nodes interfering with the cutter. When using voxel modeling, the voxel model has the disadvantage that as the simulation accuracy increases, the number of nodes of the voxel will increase greatly. And deleting the voxel nodes interfering with the interior of the target workpiece to obtain a model to be cut, and only carrying out interference detection on the voxel nodes of the part to be cut in the blank and the cutter, thereby reducing the number of voxel nodes participating in the interference detection and accelerating the calculation speed of simulation. However, in the practical implementation process, the inventor finds that the technical scheme still faces the challenges of low calculation efficiency, low rendering speed and the like when processing large-scale voxel data, and particularly under a five-axis processing scene, the tool gesture is complex and changeable, so that the simulation difficulty is further increased. Disclosure of Invention Aiming at the problems existing in the prior art, a five-axis real-time cutting simulation method based on voxels is provided. The specific technical scheme is as follows: A voxel-based five-axis real-time cutting simulation method, comprising: Step S1, extracting workpiece modeling of a workpiece to be processed, determining a voxel size according to the number of rendering voxels, carrying out voxelization on the workpiece modeling according to the voxel size to obtain a workpiece voxel grid model, and generating a cutter voxel grid model; S2, performing blocking treatment on the workpiece voxel grid model to obtain a plurality of voxel blocks; S3, when executing the cutting track, determining the voxel block and model voxels which are overlapped with the cutter voxel grid model according to pose information of the cutter; and S4, in the voxel block, updating the model voxels and then rendering. On the other hand, in the step S1, the method for calculating the voxel size includes: ; in the formula, For the size of the voxel in question,The length-width-height dimensions modeling the workpiece,An