Toolpath G-code: how to use
← Back to the generator
1 · Finished part
- STEP (.step / .stp): any solid. It works in 2.5D and full 3D. Units are converted to mm.
- DXF: closed outlines (lines, arcs, circles, polylines, splines, blocks). Set the part's top Z and thickness. The outermost outline is the profile. For each inner outline, give a floor Z (a pocket) or tick Through. Outlines inside pockets are islands with their own top Z.
2 · Blank
- Box around the part: the part's bounding box plus the margins you set.
- Blank from a file: a separate STEP solid, or a DXF outline. A DXF blank needs a Top Z and Bottom Z.
- Part position: As drawn if the part and blank share coordinates. Otherwise centre the part and line up the tops or bottoms, then shift it as needed.
3 · Machining
- 2.5D: the material between the blank and the part is cleared in Z levels. There is never more than one stepdown per level, and a level lands exactly on every flat floor. Each level is cleared with concentric offsets from the outside in. Closed pockets are cut from the centre out, with a ramp or plunge entry. With a wall or floor allowance, a finishing pass follows.
- Full 3D (STEP only): Z-level roughing leaves the stock allowance. A parallel raster pass then drops the finishing cutter onto the surface to within the tolerance. A ball nose is recommended. Enter the stepover in mm or as a scallop height. Cross passes at +90° improve steep walls.
- The cutter never goes under an overhang. Anything below an overhang is left uncut, as it must be on a 3-axis mill.
4 · Program
- Work zero X/Y can be the blank's front-left corner, its centre or the drawing origin. Z0 can be the top or bottom of the blank, or the drawing Z0.
- The output matches the drill program:
G21 G90 G17 G94, G0/G1 only, M0 to load each tool, optional M3 S…/M5 and N numbers. Z is the tool tip.
- Always dry-run above the work first.