Skip to content

G-code

Arcs in the G-code

How Dusty writes curves as G2 and G3 arcs within a curve tolerance, when it keeps segments, and how to turn arcs off for a machine that reads them poorly.

The curves of the toolpaths are written as arcs (G2 clockwise seen from above, G3 the other way): circles, but also the arcs of the outlines — rounded corners, fillets, shapes redone by Fit to arcs (see Optimize shapes) — and those of their offsets, in profiles as in pockets. Dusty finds an arc when a run of small segments follows a circle within the curve tolerance (at most two tolerances between the arc and the segments); the G-code is shorter and the motion smoother.

  • An arc can go beyond half a turn: it is written with its center (I, J, relative to the start point), and split into pieces of 120° at most for a machine set to radius (R).
  • A tiny arc (radius or length under 0.1 mm) or an almost straight one stays as segments, like segments whose height does not follow the arc (tabs).
  • Marlin only reads arcs when built with that option: with the Marlin flavor, arcs are written as segments.
  • Settings › Machining › Curves in G-code › Segments Only: no arc at all, circles included, for a machine that reads arcs poorly.

The preview, the simulation, the pre-send check (true extent of each arc), resuming at a line and opening a G-code file read arcs as the machine does.

This manual is also built into Dusty: press F1, or open the Help menu, to read the topic for what you are doing. A mistake, a missing answer? Tell us

Try it in Dusty, for free.

Free CNC milling software: design, toolpaths and machine control. Mac, iPad, iPhone, Windows and Linux.