Technical Reference & Best Practices
CNC Machining & CAM Documentation
Comprehensive guide to toolpath generation, cutting geometry, speeds & feeds, and G-code formatting for CNC routers and milling machines.
Table of Contents
1. Setup & Work Coordinates
Safe Z Height
The height in millimeters above the stock surface (Z=0) where the cutting tool can safely traverse at rapid speed (G0) without striking clamps, fixtures, screws, or raw material. Recommended: 5.0 mm to 15.0 mm depending on your clamping mechanism height.
Origin Position (X0, Y0)
Defines the reference coordinate origin (0, 0) for your toolpath. Bottom-Left origin is standard for rectangular stock sheets and aligns with machine coordinate conventions. Center origin is ideal for circular stock, symmetric bowls, coasters, and plaques where center-finding with an edge finder or diagonal crossing is fastest.
Material Thickness (Z=0 Top Surface)
RouterCut standardizes Z=0 as the top surface of the raw workpiece. All cutting depths descend below the surface as negative Z coordinates (e.g. Z-2.5 mm).
2. Tooling, Speeds & Feeds
Stepover
The horizontal distance between adjacent cutting passes inside a pocket or clearing region, typically expressed as a percentage of tool diameter.
Roughing passes: 40%–50% stepover maximizes material removal while maintaining tool stability and chip ejection.
Finishing passes: 10%–15% stepover eliminates scallop/cusp ridges, leaving a glass-smooth surface ready for light sanding or finishing.
Feed Rate vs. Plunge Rate
Feed Rate (XY): The horizontal cutting speed (mm/min). Router bits cut efficiently when shearing sideways along their flutes.
Plunge Rate (Z): The vertical entry speed into the material. Because standard endmills have limited center-cutting capability, plunge rates should generally be set to 25%–50% of the horizontal feed rate, or combined with ramp/helix lead-in entries.
Spindle Speed & Dwell Delay
The rotational speed of your spindle or router (RPM). Spindles require 1–3 seconds to accelerate up to full cutting speed after receiving an M3 command. RouterCut includes configurable dwell delays (G4 P...) to guarantee your cutter is at full rotational speed before the bit touches the workpiece.
G4 P2.0 ; Dwell 2 seconds for spindle spin-up
3. CAM Cutting Strategies
Pocket Clearing Strategies
RouterCut supports six specialized 2D pocket clearing algorithms:
- Concentric Offsets: Produces smooth, continuous geometric inward/outward loops matching the outer pocket shape.
- Continuous Spiral: Minimizes tool retracts and maintains constant engagement for clean acrylic, brass, and hardwood surfaces.
- Raster / Zigzag: Linear parallel cutting paths across the boundary, excellent for grain-aligned woods.
- Trochoidal Milling: Utilizes circular peeling loops to clear high-aspect pockets without exceeding tool deflection limits.
- Adaptive Trochoidal: Dynamically adjusts radial engagement in sharp corners to prevent tool chatter, heat buildup, and breakage.
Holding Tabs (Bridges)
When cutting all the way through stock (profile cutouts), small bridges of uncut material hold the workpiece firmly to the scrap waste, preventing the finished part from becoming a dangerous airborne projectile or jamming the spinning cutter.
4. Post-Processor Dialects
GRBL & GRBLhal
The standard dialect for open-source and hobby CNC routers (Shapeoko, X-Carve, OpenBuilds, 3018, Onefinity). Uses G0/G1/G2/G3, M3/M5 spindle control, M8 flood coolant, and millisecond dwells.
Marlin
Optimized for 3D-printer-derived CNC machines like the MPCNC (Mostly Printed CNC) and LowRider. Translates coolant calls to fan commands (M106/M107) and applies safe dwell parameters.
Mach3, Mach4 & LinuxCNC
Emits industry-standard G17/G40/G49/G80 startup blocks to cancel active tool radius compensations and canned drilling cycles prior to cutting, and explicitly sets absolute feed mode (G94).
5. Fail-Closed Safety Architecture
CNC machines are powerful industrial tools with spinning cutters moving at high speeds. RouterCut enforces strict fail-closed safety constraints:
- Zero Below-Z Rapids: Every rapid XY motion (G0) is strictly verified to occur at or above Safe Z. Rapid moves below Safe Z fail the generation pipeline immediately.
- Spindle Pre-Spinning: No cutting command (Z < 0) is emitted unless the spindle has received a verified M3/M4 command and completed its startup dwell.
- Retract Before Park: The spindle never turns off and coolant never stops until the cutter has retracted completely out of the stock.
- Conservative Parking: RouterCut never assumes G28, G30, or work zero are collision-free parking locations. The program safely ends with the tool at Safe Z.