Back to Supported G-Codes

G2 & G3 - Arc Movement Commands

DMC File Mode: Supported
Streaming Mode: Supported

Description

G2 and G3 commands create circular arc movements in the selected work plane. G2 creates clockwise arcs, while G3 creates counter-clockwise arcs. These commands are essential for creating smooth curved paths in CNC machining and other motion control applications.

Arc movements interpolate between the current position and a specified endpoint along a circular path. The arc is defined either by its center point (using I, J, K offsets) or by its radius (using the R parameter).

Syntax

G2 X[end_x] Y[end_y] Z[end_z] I[center_offset_x] J[center_offset_y] K[center_offset_z] F[feedrate]
G3 X[end_x] Y[end_y] Z[end_z] I[center_offset_x] J[center_offset_y] K[center_offset_z] F[feedrate]
; Alternative using radius
G2 X[end_x] Y[end_y] Z[end_z] R[radius] F[feedrate]
G3 X[end_x] Y[end_y] Z[end_z] R[radius] F[feedrate]

Parameters

ParameterDescriptionExample
X, Y, ZTarget endpoint coordinates for the arcX10 Y20 Z5
I, J, KCenter point offset from current position (I=X offset, J=Y offset, K=Z offset). Always specified relative to the start point.I5 J0
RArc radius (alternative to I, J, K). Positive for arcs ≤180°, negative for arcs >180°R10.5
FFeedrate for the arc movement (modal feedrate shared with other commands)F1000

Feedrate Behavior

Important: Shared Feedrate

The feedrate (F parameter) is shared between G1, G2, and G3 commands. Setting the F parameter in any of these commands will affect the feedrate of all future G1, G2, and G3 movements until a new feedrate is specified. This allows for efficient programming where the feedrate only needs to be set once for a series of movements.

Examples

Basic Clockwise Arc (G2)

G0 X0 Y0
; Move to starting position
G2 X10 Y0 I5 J0 F500
; Clockwise semicircle from (0,0) to (10,0) with center at (5,0)

Counter-Clockwise Arc with Radius (G3)

G0 X0 Y0
; Move to starting position
G3 X10 Y10 R7.071 F800
; 90° counter-clockwise arc to (10,10) with radius ~7.071

Shared Feedrate Example

G1 X10 Y0 F1000
; Linear move, set feedrate to 1000
G2 X20 Y10 I0 J10
; Arc move uses the same feedrate (1000)
G1 X30 Y10
; Linear move still uses feedrate 1000
G3 X30 Y20 R5 F500
; Arc move changes feedrate to 500
G1 X40 Y20
; Linear move now uses feedrate 500

Complete Circle

G0 X10 Y0
; Move to starting position
G2 X10 Y0 I-10 J0 F600
; Full clockwise circle, center at (0,0), radius 10

Working Planes

Arc movements operate in the currently selected working plane:

  • G17 (XY Plane): I and J offsets define the arc center, Z moves linearly
  • G18 (XZ Plane): I and K offsets define the arc center, Y moves linearly
  • G19 (YZ Plane): J and K offsets define the arc center, X moves linearly

Note: The default working plane is XY (G17). Use plane selection commands before arc movements to change the working plane.