What G17 / G18 / G19 means

An arc needs two in-plane axes and one axis perpendicular to the plane. G17 is the usual 3D-printing plane: X and Y form the circle and Z can create a helix. G18 uses Z and X, while G19 uses Y and Z. The matching center-offset words are selected from I, J and K.

Plane selection is modal, so it remains active until another plane command appears. CNC programs routinely declare a plane in their preamble. Many printer workflows emit only XY arcs, and some firmware implements G2/G3 without the full plane-selection feature, so non-XY arcs need explicit compatibility checks.

Syntax and parameters

G17 ; XY plane
G18 ; ZX plane
G19 ; YZ plane
No parameters

Each command changes the modal plane used by following arc or spline commands.

Practical examples

Select the usual print plane

G17
G2 X40 Y20 I20 J0 F1200

The arc is solved in XY, with I and J locating its center.

Arc in a vertical plane

G18
G2 X20 Z10 I10 K0 F600

The circular part lies in ZX. Only use this form when the target controller supports it.

Firmware context

SystemStatusWhat changes
MarlinCheck dialectRequires CNC_WORKSPACE_PLANES; otherwise typical printer arcs remain in XY.
KlipperCheck dialectConfigured gcode_arcs support is aimed at common slicer arcs; verify non-XY plane support before use.
RepRapFirmwareCommonDocuments plane selection for supported arc and machining workflows.
CNC controllersCommonStandard modal plane commands; additional UV, WU or VW planes may exist on some controllers.

What this viewer can show

All three planes normalized

The viewer tracks G17/G18/G19 and measures supported XY, ZX and YZ arcs, including their true bounds and length, before converting them for rendering.

Common mistakes

  • I, J and K meanings follow the active plane; copying an XY arc under G18 changes the geometry.
  • Plane mode persists, so a missing G17 after a vertical arc can affect every later G2/G3 block.
  • Do not assume enabling G2/G3 automatically enables non-XY planes on printer firmware.

Primary sources

This page is an original explanation, reviewed against the firmware documentation below. Always confirm commands against the firmware and configuration on the machine that will execute them.