Problemcore
NC verification
Also called machining simulation, NC simulation.
Simulate a toolpath by subtracting the tool's swept volume from the stock, to show the final part and find gouges, collisions and missed material.
NC verification checks a toolpath before it runs on a machine. It simulates the cut: starting from the stock, it removes the volume that the tool sweeps on each move, and then compares the result with the designed part. The comparison finds gouges, where the tool removed material of the part, excess, where material that should go is still there, and collisions, where the holder, the shank or a rapid move hits material. The simulated workpiece is also shown to the user. The task is stated here as a problem. The models that make it fast are on their own pages: the z-map stores one height per grid point, and the dexel representation stores intervals along rays. Exact simulation with solid Boolean operations on a boundary representation is possible but slow, so most systems use such sampled models. This is verification of a machining program in mechanical manufacturing, not the verification of a circuit design.
In plain words
A program for a milling machine is a long list of tool moves, made by a CAM system. Before running it on a costly block of metal, you want to see what it will cut.
The simulation starts with the block. For each move, it removes everything the tool passes through. At the end it holds the shape the machine would make, and you can look at it.
Then it compares that shape with the design. Places where the shape is below the design are gouges. Places above it are material left behind. A move where the holder or a fast move runs into material is a crash.
Most simulators do not keep the exact shape. They sample it on a grid of points or rays, which is fast and simple but only as precise as the grid.
Definition
Input.
- The stock , a solid, usually a box.
- The tool: the cutting part , and the non-cutting parts (shank, holder), placed by a CL point as and .
- The toolpath: CL points , and for each move its kind (cutting or rapid). Let be the swept volume of over move , and that of .
- The design part and a tolerance .
Output.
- The workpiece after each move, , where is the regularized difference. The final part is .
- Gouges: the points of removed, , reported where their depth below the design surface exceeds , with the move that made each one.
- Excess: the material left, , reported where it is thicker than .
- Collisions: the moves where , and the rapid moves where .
Item 4 depends on the order of the moves, since it uses . Items 1 to 3 at the end depend only on the set of moves, since .
Sampled versions. A sampled model replaces the solids by their traces on a set of sample lines. On a vertical line , is a finite union of intervals. The z-map keeps only the top of the material on each vertical line, which is exact when the tool always comes from above (three axes, no undercut). The dexel model keeps all the intervals. The output is then exact on the sample lines, and says nothing between them.
Variants
- Exact solid simulation. Represent as a boundary representation and subtract each with a solid Boolean operation. It needs the swept volume as a solid, and the model grows with each move. It is used for short programs or for a final check.
- Height grids. The z-map (Anderson 1978) for three-axis paths. Each move updates the grid points under its footprint.
- Ray intervals. The dexel representation, in screen space for display (Van Hook 1986) or in object space, and three orthogonal dexel grids for parts with steep walls.
- Vectors normal to the surface. Jerard et al. (1989) put short vectors on the design surface along its normals, and each move cuts the vectors it meets. The remaining length of a vector is the local excess, and a vector cut below the surface marks a gouge.
- Voxels and octrees. A spatial occupancy enumeration or an octree of the stock, with each move removing the cells inside its swept volume.
- Five axes. The tool axis changes during a move, so the swept volume is no longer a translation sweep, and the dexel and voxel models are used.
Examples
One move on a z-map. Take the stock as heights over a grid of spacing , the design part , and one move of a ball end mill with a shank, radius , ball center from to . On the line , the lowest point of the swept tool above each grid point is computed on the z-map page:
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | |
|---|---|---|---|---|---|---|---|---|---|
| height after the move | 1.268 | 0.764 | 0.264 | -0.236 | -0.736 | -1 | -0.732 | 1 | 4 |
| result | excess | excess | excess | gouge | gouge | gouge | gouge | excess | excess |
The exact values are , , , , , , and . The move goes down to for the ball center, and the bottom of the ball reaches , below the design. With the report is a gouge at of depth up to , and is within the tolerance. Between grid points the model knows nothing: the gouge also exists at , but a grid of spacing would only see it at and .
A collision. On the same block, a rapid move of the same tool with ball center from to runs away from the first cut, where the stock top is still at . The ball bottom is at , so the move crosses material, and the simulation reports a crash at the first grid point under it.
Known algorithms
- Z-map model. One height per grid point. A move of a ball end mill updates each grid point under it in time by a closed form. Exact on the grid, for three axes.
- Dexel representation. Interval lists on rays, with Boolean operations by a merge in time linear in the number of intervals. Handles undercuts and many tools.
- Exact Boolean operations. Solid Boolean operations on B-reps or CSG trees, with the swept volume of each move as an operand.
- Normal vectors. The method of Jerard et al. (1989), which measures the error directly along the design normals.
- Gouge detection. Checks the CL data against the part without simulating the stock. It finds gouges but not excess material.
What is proved: the sampled models give the exact trace of on their sample lines, up to the rounding of the square roots in the tool formulas. What is measured: the error between the samples and the running time, which depend on the grid spacing, the part and the path. Drysdale et al. (1989) analyse how the cost and the accuracy of point-sample simulation depend on the spacing.
Bounds
- Grid models. With sample lines, moves and lines under the footprint of move , a z-map simulation takes time and space. A dexel simulation multiplies each update by the number of intervals on the line.
- Exact models. The B-rep of gains faces with each move that cuts, so its size can grow with , and each Boolean operation costs more than the one before.
- Sampling error. On a grid of spacing , a gouge narrower than in both directions can fall between the samples. So a sampled check cannot prove that a path is free of gouges. A finer grid, or a direct gouge detection on the surface, is needed for that.
- No hardness. Every version is a polynomial simulation. The cost question is how many samples or faces it needs.
Reductions
- To swept volumes and Boolean operations. , so exact verification is the computation of swept volumes followed by regularized set operations.
- To one dimension. On a sampled model the problem splits into independent problems on the lines: subtract one interval per move and line, and compare the result with the interval of on the line.
Applications
- Checking CAM programs for dies, molds and aerospace parts before the first cut.
- Showing the machined part to the programmer, with the errors in color.
- Estimating the removed volume per move, which gives the cutting load and lets a CAM system change the feed rate.
- Checking the output of the post-processor, by simulating the machine code instead of the CL data.
References
- Robert O. Anderson, Detecting and eliminating collisions in NC machining, Computer-Aided Design 10(4), 1978, 231 to 237, the stock and the tool as heights over a grid, and the collision test on it
- Tim Van Hook, Real-time shaded NC milling display, Computer Graphics 20(4) (SIGGRAPH 86), 1986, 15 to 20, the subtraction of the tool in image space on depth intervals per pixel
- Robert B. Jerard, Robert L. Drysdale, Kenneth Hauck, Barry Schaudt and John Magewick, Methods for detecting errors in numerically controlled machining of sculptured surfaces, IEEE Computer Graphics and Applications 9(1), 1989, 26 to 39, simulation on vectors along the surface normals and on height grids, and the gouges and excess material each one finds
- Robert L. Drysdale, Robert B. Jerard, Barry Schaudt and Ken Hauck, Discrete simulation of NC machining, Algorithmica 4(1), 1989, 33 to 60, the cost and the accuracy of point-sample simulation as a function of the grid spacing
- Byoung K. Choi and Robert B. Jerard, Sculptured Surface Machining, Theory and Applications, Kluwer, 1998, the part on controlling accuracy and quality, on the z-map model and NC verification
Where this leads
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W2 basic |
|
Tag AM6X7B Edit this page History Report an error Markdown