AKS Anvil

G-code theory

G-code & toolpath basics

Companion notes for the dual-view visualizer: modal motion, arcs, feeds, time estimates, and what the risk flags mean.

Coordinates & modality

Motion words

G0  — rapid (non-cutting transit; time uses a high effective F)
G1  — linear feed at F (typically mm/min or in/min)
G2  — clockwise arc (XY): centre via I J (relative to start) or radius R
G3  — counter-clockwise arc
F   — feed rate (modal)
I J — arc centre offsets from start point (common CNC convention)
R   — arc radius (negative R selects the major arc)

The visualizer tessellates arcs into many short chords, colours by mode / feed / Z / time, and animates on a time-based timeline (scrubbable). Dual panes: 3D isometric + XY top.

Time estimate

t_segment ≈ length / (F_eff / 60)

Rapids use a high effective feed (≥ 3000 unit/min) when F is low. Real machines also accelerate and decelerate — wall-clock time is longer. No jerk model here.

Risk flags (heuristics)

These are not a CAM collision engine: no tool diameter, holder, clamps, or stock solid model.

SVG import

Paste d="M … L … Z" or a bare path. Strokes become feed moves at F800 for length/time demos.

Keyboard (visualizer)

Space  play/pause
R      rewind
F      fit camera
Ctrl+Enter  parse

Open the G-code / Toolpath Visualizer and try the “Risky rapid plunge” sample.