flexi-bot/docs/marlin/_gcode/G002-G003.md
2023-09-05 20:38:49 +02:00

3.8 KiB

tag title brief author contrib since group requires codes related parameters examples images
g002 Arc or Circle Move Add an arc or circle movement to the planner thinkyhead shitcreek, edwilliams16 1.0.0-beta motion ARC_SUPPORT
G2
G3
G17
G18
G19
tag optional description values
X true A coordinate on the X axis
tag type
pos float
tag optional description values
Y true A coordinate on the Y axis
tag type
pos float
tag optional description values
Z true A coordinate on the Z axis
tag type
pos float
tag type optional description values
I float false An offset from the current X position to use as the arc center
tag type
offset float
tag type optional description values
J float false An offset from the current Y position to use as the arc center
tag type
offset float
tag type optional description values
R float false A radius from the current XY position to use as the arc center
tag type
radius float
tag type optional description values
E float true The amount to extrude between the start point and end point
tag type
pos float
tag optional description values
F true The maximum rate of the move between the start and end point
tag type optional
rate float false
tag optional description values
P true Specify complete circles. (Requires `ARC_P_CIRCLES`)
tag type
count int
tag optional since description values
S true 2.0.8 Set the Laser power for the move.
tag type
power float
pre code
Move in a clockwise arc from the current position to [125, 32] with the center offset from the current position by (10.5, 10.5). G2 X125 Y32 I10.5 J10.5
pre code
Move in a counter-clockwise arc from the current position to [125, 32] with the center offset from the current position by (10.5, 10.5). G3 X125 Y32 I10.5 J10.5
pre code
Move in a complete clockwise circle with the center offset from the current position by [20, 20]. G2 I20 J20
title caption path
G3 command geometry This illustrates a counter clockwise arc, starting at [9, 6]. It can be generated either by `G3 X2 Y7 I-4 J-3` or `G3 X2 Y7 R5` G3fig.png

G2 adds a clockwise arc move to the planner; G3 adds a counter-clockwise arc. An arc move starts at the current position and ends at the given XYZ, pivoting around a center-point offset given by I and J or R.

CNC_WORKSPACE_PLANES allows G2/G3 to operate in the selected XY, ZX, or YZ workspace plane.

This command has two forms:

I J Form

  • I specifies an X offset. J specifies a Y offset.
  • At least one of the I J parameters is required.
  • X and Y can be omitted to do a complete circle.
  • The given X Y is not error-checked. The arc ends based on the angle of the destination.
  • Mixing I or J with R will throw an error.

R Form

  • R specifies the radius. X or Y is required.
  • Omitting both X and Y will throw an error.
  • X or Y must differ from the current XY position.
  • Mixing R with I or J will throw an error.

Arc moves actually generate several short straight-line moves, the length of which are determined by the configuration option MM_PER_ARC_SEGMENT (default 1mm). Any change in the Z position is linearly interpolated over the whole arc.

'ARC_P_CIRCLES' enables the use of the 'P' parameter to specify complete circles