CNC mill · G-code

G15 / G16: polar coordinates on and off

G16 makes X a radius and Y an angle, so a bolt circle is programmed as distance and degrees instead of worked-out X Y points; G15 turns it off. Where the radius is measured from depends on the control. Formats below from Mach4, Mach3 and Fanuc, each from its maker. Haas and LinuxCNC have no such code.

Worked example

Two holes on a 1" radius at 45° and 135°, centred on work zero. Written for this page in the Mach4 format.

G00 G90 G54 G17 X0 Y0 Z0.1G16 (polar on: radius from work zero)G00 X1. Y45. (radius 1 at 45°)G01 Z-0.1 F10.G00 Z0.1Y135. (radius 1 at 135°)G01 Z-0.1G00 Z0.1G15 (polar off)
The worked example’s toolpath, from the front (X, Z): feed moves solid, rapid moves dashed, from the start point.rapidfeedstart pointXZ
The worked example’s toolpath. Drawn to the example’s own coordinates.

Radius 1 at 45° is X0.7071 Y0.7071.

How each control writes it

Mach4 G16 X- Y- (G15 cancels)

One source: Artsoft (Newfangled Solutions), the control's maker

X
In G17: the radius
Y
In G17: the angle, degrees
  • In G90 the radius is measured from work zero; in G91 from the current position.
  • The plane picks the words: G18 takes Z as radius and X as angle, G19 Y as radius and Z as angle.
  • Arcs work in polar mode, with R as the arc radius.

Source: Mach4 Mill Programming Guide v1.1 (Artsoft), "G15/G16 Polar Coordinates" (archived Jul 1, 2024)

Mach3 G16, then G0/G1 X- Y- (G15 cancels)

One source: Artsoft (Newfangled Solutions), the control's maker

X
Radius from the polar centre
Y
Angle, degrees counterclockwise from 3 o'clock
  • The polar centre is the current point when G16 runs, not work zero. Artsoft notes this is not how Fanuc does it.
  • Only G0 and G1 moves in the XY plane: no other X or Y moves while G16 is on.

Source: Using Mach3Mill rev 1.84 (Artsoft), "10.7.7 Exit and Enter Polar mode - G15 and G16" (archived Oct 18, 2026)

Fanuc Gxx Gyy G16 ; … G15 ;

One source: FANUC, the control's maker

Gxx
Plane: G17, G18 or G19
Gyy
Where the radius is measured from: G90 the program origin, G91 the current position
First axis of the plane
Radius
Second axis of the plane
Angle
  • FANUC 0i-MF (machining centre), from its operator’s manual. On another FANUC model, check that control’s manual.
  • G16 turns polar coordinates on; G15 turns them off.

Source: FANUC B-64604EN-2/01, Operator's Manual, 0i-MF (machining centre), §4.1

Controls without it

  • Haas: Haas mills have no G16: it is not on Haas's published mill list. Give the points in X and Y, or use the G70–G72 bolt-hole patterns. Source (archived Feb 21, 2026)
  • LinuxCNC: LinuxCNC has no G16. Any move can use polar words instead: @ is the distance and ^ the angle from XY zero, so G1 @1 ^90 is the same as G1 Y1. Source (archived Oct 28, 2026)

How the controls differ

  • Only Fanuc takes First axis of the plane, Gxx, Gyy, Second axis of the plane.
  • A word two controls share can still mean different things: read each control's list above.

Haas follows Fanuc's numbering, but options and parameters differ between controls: check your control's manual.