Problemintro
Toolpath planning
Also called toolpath generation.
Given a part, a tool and a machine, find a path for the tool that removes or deposits the right material with no gouge or collision, in short time.
Toolpath planning asks how a tool should move so that a machine makes a given part. In milling, the tool is a rotating cutter, and the path must remove all the material of the stock that is not part, without cutting into the part. In 3D printing, the tool is a nozzle or a laser spot, and the path must put material exactly where the part is. In both cases the path must not hit the part or the machine with the tool holder, and it should take little time. This is a problem of mechanical manufacturing: placement and routing here mean where a tool goes and how it moves, not the placement and routing of the cells and wires of a circuit. This page states the problem and its limits. The methods are on the pages that it links.
In plain words
You have a block of material and a drawing of the part you want. A machine holds a tool and can move it. You must tell the machine where to move the tool, step by step, so that what remains at the end is the part.
The tool has a size and a shape. It cannot get into corners smaller than itself, and its round end leaves small ridges between passes. If the tool goes too deep, it spoils the part. The holder must not hit the part either. Among all the paths that make a good part, you want a short and smooth one, because the machine time costs money.
A 3D printer has the same task the other way round: it lays a thin bead along a path, layer by layer, and the beads must fill the part without gaps.
Definition
Input. A part and a stock , both solids in space. A tool , a solid of revolution around its axis, such as a ball, flat or bull-nose end mill, with a holder above it. A machine, which fixes the allowed tool axes: one vertical axis on a three-axis machine, a cone of axes on a five-axis machine. A tolerance .
Path. A path is a curve of tool positions and unit axis directions , for , in one or more pieces joined by rapid moves clear of the stock. The tool removes the swept volume , the union of the placed tools, which for a fixed axis is the Minkowski sum of the path with the tool. The list of positions sent to the machine is the cutter location data.
Feasible path (milling).
- No gouge. The tool does not enter the part: the interior of does not meet .
- No collision. The holder and the machine do not meet the part or the stock away from the cut.
- Enough removed. What is left, , lies within distance of . On finished surfaces this bounds the scallop height.
Goal. Among feasible paths, minimize a cost: the machining time, the length, the number of retractions, or a mix that also counts sharp turns and the load on the tool. The machining time depends on the length and on how often the machine must slow down.
Additive form. The tool deposits a bead, a disk or a ball of material, along the path. The path must fill each layer of the part, the deposited set must lie within of the layer, and the path should have few starts and stops.
Some parts cannot be made at all with a given tool: material in a corner smaller than the tool, or in a place that no allowed axis can reach, stays. Then the goal is to remove all material that the tool can reach, and to report the rest.
Variants
- 2.5D milling. The part is a stack of flat levels, and each level is a pocket machining problem in the plane.
- Three-axis surface finishing. A ball or bull-nose tool with a vertical axis follows a free-form surface. The passes can follow the parameter lines of the surface (iso-parametric), parallel planes (iso-planar), or a fixed scallop height (iso-scallop). The grid method of the inverse tool offset gives gouge-free tool positions for any part.
- Five-axis machining. The axis can tilt, which reaches more of the part and allows wider passes, but adds collision checks. The axes that reach a point form its accessibility cone.
- Roughing and finishing. Roughing removes the bulk fast with a large tool and leaves a thin layer. Finishing removes the layer to the tolerance.
- Additive manufacturing. The part is cut into layers by slicing, and each layer is filled with a wall path and an infill pattern or with one continuous Fermat spiral.
- Coverage by robots. A mower or a cleaning robot that must pass over every point of a floor solves the planar coverage problem, see coverage path planning.
Examples
A straight slot. A slot of width and length with rounded ends, cut by a flat end mill of radius to a fixed depth. One straight pass of length along the middle removes the slot exactly. This path meets the length bound below with equality.
A rectangular pocket. A pocket and a tool of radius 1. The tool center must stay in the square , so the corners keep of material that no path removes. The machinable area is , and every path that removes it has length at least 48 by the bound below.
A ball on a slope. A ball end mill of radius that touches a plane at the point has its center at , where is the unit normal. Moving the center over the offset of the surface keeps the ball on the surface. Passes a distance apart on a flat surface leave scallops of height .
A printed square layer. A layer printed with a bead of width 0.5 needs about of path for the infill, by the same area argument as in the bound below.
Known algorithms
- Pockets. Contour-parallel, direction-parallel and Voronoi paths. See pocket machining.
- Free-form surfaces. Iso-parametric, iso-planar and iso-scallop paths, with tool positions from offsets or from the inverse tool offset, and checks by gouge detection.
- Verification. NC verification, for example on a z-map model, simulates the cut and finds gouges and missed material.
- Additive layers. Triangle mesh slicing and adaptive slicing make the layers. Infill patterns and Fermat spirals fill them, and support structure generation adds supports.
- Order of pieces. The order in which the pieces of a path are cut, and the moves between them, are a traveling salesman problem on the pieces, solved by heuristics.
| Algorithm | Time | Space | Properties | Code |
|---|---|---|---|---|
| Connected Fermat spiral toolpath | O(n) worst | O(n) extra | deterministicexactiterative | 1 language |
| Inverse tool offset | O(n k) worst | O(n) extra | deterministicexactiterative | 1 language |
| Iso-parametric toolpath | O(N) worst | O(1) extra | deterministicexactiterative | 1 language |
| Iso-planar toolpath | O(K 2^m) worst | O(m) extra | deterministicexactrecursive | 1 language |
| Iso-scallop toolpath | O(N B G) worst | O(1) extra | deterministicnot exactiterative | 1 language |
Bounds
Length from area. Take a planar path of total length and a disk tool of radius . The region that the tool sweeps is the Minkowski sum of the path with the disk, and its area is at most for each connected piece. So a path that removes a region of area in one piece has
The straight slot above meets this bound. Any overlap of neighbouring passes makes the path longer, and in practice paths are longer than the bound because they overlap and turn. The same argument with a bead of width gives approximately for a printed layer.
What no path removes. With a disk tool of radius in a planar region , the tool center must stay in the inward offset , so no path removes more than the opening . In a corner with angle , the material stays. In three-axis machining, a concave part of the surface with a radius of curvature smaller than the ball radius cannot be reached by the ball without a gouge, so the tool must stop short and leave material there.
Hardness. The planar milling problem, find the shortest path of a disk that stays in a region and sweeps all of it that it can reach, is NP-hard for regions with holes (Arkin, Fekete and Mitchell, 2000). So is the lawn mowing problem, where the tool may leave the region. Both have polynomial-time algorithms with a constant approximation factor. Minimizing the number of retractions of a zigzag path in a pocket with holes is NP-hard as well (Arkin, Held and Smith, 2000, see pocket machining). For free-form surfaces with gouge, collision and machine time constraints, no exact optimal method is known, and the methods in use are judged by measured length, time and surface quality.
Reductions
- To offsets. For a ball end mill, the tool centers that touch but do not enter the part form the offset surface at the ball radius, cut where it folds. For a solid part the set of free tool positions is the complement of an offset solid, see solid offsetting. Toolpath planning becomes the planning of a path for a point on this set.
- To coverage. With the free set known, removing the material is covering a region with the swept tool, which is coverage path planning.
- To the traveling salesman problem. When the passes are fixed, the order and the direction of the passes, and the links between them, form a traveling salesman problem on the passes.
- Additive to planar. Slicing turns a 3D print into one planar fill problem per layer.
Applications
- CNC milling. Molds, dies, turbine blades, car bodies and aircraft parts are milled from paths made by CAM systems.
- 3D printing. Every printer runs a path made by a slicer from the layers of the part.
- Laser and water-jet cutting, engraving. A path along the contours, with an order that keeps the moves short and the heat spread.
- Robot coverage. Mowing, painting, cleaning and inspection use the same path planning in the plane.
References
- Byoung K. Choi and Robert B. Jerard, Sculptured Surface Machining, Theory and Applications, Kluwer Academic Publishers, 1998, the chapters on the fundamentals of tool-path generation, on gouge and collision, and on the kinds of finishing paths
- Martin Held, On the Computational Geometry of Pocket Machining, Lecture Notes in Computer Science 500, Springer, 1991, the introduction, which states the planar problem of clearing a pocket with a disk tool
- Esther M. Arkin, Sándor P. Fekete and Joseph S. B. Mitchell, Approximation algorithms for lawn mowing and milling, Computational Geometry 17(1-2), 25-50, 2000, the definitions of the lawn mowing and milling problems, their NP-hardness and their approximation algorithms
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 H9F8NN Edit this page History Report an error Markdown