3D printer G-code · Marlin and Klipper

G2: Arc move clockwise (G2 / G3) (Marlin & Klipper)

Arc move clockwise (G2 / G3) — Moves along a clockwise arc (G3 counter-clockwise). I and J are the distances from the start point to the centre. Arcs make files much smaller and curves smoother when…

By cnccode · Updated
On this page
  1. What does G2 do?
  2. Parameters
  3. Example
  4. Tips from practice
  5. Related commands
  6. More motion commands
  7. Frequently asked questions
PropertyValue
CommandG2
FunctionArc move clockwise (G2 / G3)
FirmwareMarlin and Klipper
GroupMotion
SyntaxG2 X Y I J [E] [F] or G2 X Y R [E] [F]

What does G2 do?

Moves along a clockwise arc (G3 counter-clockwise). I and J are the distances from the start point to the centre. Arcs make files much smaller and curves smoother when the slicer uses arc fitting. Marlin needs ARC_SUPPORT (on by default in most builds), Klipper needs a [gcode_arcs] section.

Parameters

ParameterMeaning
X YEnd point
I JCentre offset from the start point
RRadius instead of I/J (Marlin)
E FExtrusion and feed rate as in G1

Example

G-code
G1 X50 Y40 F3000
G2 X60 Y50 I10 J0 E0.8 ; quarter circle

Tips from practice

  • Klipper splits arcs into short lines; resolution is set with resolution: in [gcode_arcs].
  • If arcs print as straight lines or are ignored, arc support is missing in the firmware.
  • Arc fitting in PrusaSlicer and OrcaSlicer is a slicer option.

The command works in Marlin and Klipper. Options can differ: Klipper accepts fewer parameters for some M-codes and ignores codes it does not know with an "Unknown command" error.

More motion commands

CommandFunctionFirmware
G1Linear move (G0 / G1)Marlin and Klipper
G4Dwell (pause)Marlin and Klipper
G28Home axesMarlin and Klipper
G90Absolute positioning (G90 / G91)Marlin and Klipper

Test it before you print

Paste your start code or a whole file into the 3D printer simulator. It plans every move, shows the time and finds missing waits, cold extrusion and moves outside the bed.

Open the simulator

Frequently asked questions

What does G2 do on a 3D printer?
G2 is arc move clockwise (G2 / G3). Moves along a clockwise arc (G3 counter-clockwise). I and J are the distances from the start point to the centre. Arcs make files much smaller and curves smoother when the slicer uses arc fitting. Marlin needs ARC_SUPPORT (on by default…
Does G2 work in Klipper and Marlin?
Yes, both firmwares understand G2.
Was this page helpful?