Arc I/J/K ↔ R converter

Turn an arc’s centre offsets into a signed radius for R-format G2/G3, or a radius into centre offsets. It also checks that the start and end points really are the same distance from the centre.

How it works, guides and notes

The rules used

I, J and K are the distances from the start of the arc to its centre along X, Y and Z (incremental, the usual default). R is the distance from the centre to the start. A positive R gives the arc of 180° or less between the two points and a negative R gives the longer one, over 180°. A full circle cannot be written with R, because the start and end are the same point, so use I/J/K for it. Arcs close to 180° are poorly defined by R: a tiny rounding error moves the centre a long way, so centre offsets are safer.

G2 is clockwise and G3 anticlockwise looking at the plane from the positive end of the third axis. In G18 the plane is Z across and X up; on a lathe with X on diameter, halve the X values first (I is normally a radius value) and check which way your lathe views G2/G3, which depends on the tool post side.

Hand check: G3 from X0 Y0 to X10 Y10 with I10 J0: centre (10, 0), radius 10, start at 180°, end at 90°, so anticlockwise it sweeps 270°: R = −10. As G2 the same centre gives a 90° arc: R = 10.

FANUC, Haas, Siemens, Heidenhain, LinuxCNC and Grbl are names or trademarks of their respective owners. They are mentioned only to describe which controls a code format relates to. Lathe Calculator is not affiliated with or endorsed by any of them. Trademarks.

Spotted a mistake? Report an error.