G2, G3: Circular Interpolation
The arc of a circle or spiral is set using the commands G2 (clockwise rotation) or G3 (counterclockwise rotation) with the current feedrate. The direction of rotation is determined relative to the positive direction of the axis around which the rotation occurs. The axis of the circle or spiral must be parallel to the axis X, Y or Z of the coordinate system. This axis (or, respectively, a plane perpendicular to the axis) is selected using the commands G17 (Z axis, XY plane), G18 (Y axis, XZ plane) или G19 (X axis, YZ plane).
To specify a spiral, specify the parameter of the axis perpendicular to the plane of interpolation. For example, for the G17 plane, specify the Z value. This will cause the Z axis to move to the specified value during circular interpolation in the XY plane.
To specify an arc that describes more than one full revolution, use parameter P, which is defined as the number of full revolutions plus the specified arc. Parameter P must be an integer. If parameter P is not specified, the result is the same as when setting P1: only one full or partial revolution will be performed. For example, if an arc of 180 degrees is specified with parameter P2, the resulting displacement will be 1 ½ turns.
If the G-code line defines an arc and contains the movement of the rotary axis, the rotary axis moves at a constant speed so that the rotation begins and ends simultaneously with the movement along XYZ. Such commands are rarely used.
The center of the arc is set in absolute or relative coordinates (set by commands G90.1 and G91.1, respectively).
Two formats are acceptable for defining an arc: specifying a center and specifying a radius.
Arc format with center
G2 or G3 axes offsets
The format of the arc with the center is more accurate than the format with the radius and is preferred for use.
To specify the arc, the end point of the arc and the offset of the center of the arc relative to the current position are used. The end point of the arc may coincide with the current position. In the incremental center positioning mode (used by default), the center coordinates are set relative to the beginning of the arc. In the absolute center positioning mode, the center coordinates are set relative to the current origin.
XY-plane (G17)
G2 or G3 <X- Y- Z- I- J- P->
XZ-plane (G18)
G2 or G3 <X- Z- Y- I- K- P->
YZ-plane (G19)
G2 or G3 <Y- Z- X- J- K- P→
Arc construction example:
G0 X0 Y0
G2 X1 Y1 I1 F10 (arc clockwise in the XY plane)

Arc construction example
Пример построения спирали:
G0 X0 Y0 Z0
G17 G2 X10 Y16 I3 J4 Z-1 (спираль с перемещением по Z)
Пример использования параметра P:
G0 X0 Y0 Z0
G2 X0 Y1 Z-1 I1 J0.5 P2 F25
В формате дуги с указанием центра радиус дуги не указывается, но он может быть легко вычислен как расстояние между центром дуги и начальной либо конечной точкой.
Формат дуги с указанием радиуса
G2 or G3 axes R- <P→
Для задания дуги используется указание конечной точки дуги и радиуса дуги. Команда G2 axes R-, где R – радиус дуги. Положительное значение радиуса показывает, что дуга поворачивается менее чем на 180 градусов, отрицательное – более чем на 180 градусов.
Не рекомендуется задавать дуги в формате с указанием радиуса, если они близки к полной окружности или полуокружности, так как в этом случае небольшое изменение в положении конечной точки приводит к намного большему изменению в положении центра дуги.
Пример построения дуги:
G17 G2 X10 Y15 R20 Z5 (формат дуги с указанием радиуса)