144 lines
3.8 KiB
Markdown
144 lines
3.8 KiB
Markdown
---
|
|
tag: g002
|
|
title: Arc or Circle Move
|
|
brief: Add an arc or circle movement to the planner
|
|
author: thinkyhead
|
|
contrib: shitcreek, edwilliams16
|
|
|
|
since: 1.0.0-beta
|
|
group: motion
|
|
requires: ARC_SUPPORT
|
|
|
|
codes: [ G2, G3 ]
|
|
related: [ G17, G18, G19 ]
|
|
|
|
parameters:
|
|
-
|
|
tag: X
|
|
optional: true
|
|
description: A coordinate on the X axis
|
|
values:
|
|
-
|
|
tag: pos
|
|
type: float
|
|
-
|
|
tag: Y
|
|
optional: true
|
|
description: A coordinate on the Y axis
|
|
values:
|
|
-
|
|
tag: pos
|
|
type: float
|
|
-
|
|
tag: Z
|
|
optional: true
|
|
description: A coordinate on the Z axis
|
|
values:
|
|
-
|
|
tag: pos
|
|
type: float
|
|
-
|
|
tag: I
|
|
type: float
|
|
optional: false
|
|
description: An offset from the current X position to use as the arc center
|
|
values:
|
|
-
|
|
tag: offset
|
|
type: float
|
|
-
|
|
tag: J
|
|
type: float
|
|
optional: false
|
|
description: An offset from the current Y position to use as the arc center
|
|
values:
|
|
-
|
|
tag: offset
|
|
type: float
|
|
-
|
|
tag: R
|
|
type: float
|
|
optional: false
|
|
description: A radius from the current XY position to use as the arc center
|
|
values:
|
|
-
|
|
tag: radius
|
|
type: float
|
|
-
|
|
tag: E
|
|
type: float
|
|
optional: true
|
|
description: The amount to extrude between the start point and end point
|
|
values:
|
|
-
|
|
tag: pos
|
|
type: float
|
|
-
|
|
tag: F
|
|
optional: true
|
|
description: The maximum rate of the move between the start and end point
|
|
values:
|
|
-
|
|
tag: rate
|
|
type: float
|
|
optional: false
|
|
-
|
|
tag: P
|
|
optional: true
|
|
description: Specify complete circles. (Requires `ARC_P_CIRCLES`)
|
|
values:
|
|
-
|
|
tag: count
|
|
type: int
|
|
-
|
|
tag: S
|
|
optional: true
|
|
since: 2.0.8
|
|
description: Set the Laser power for the move.
|
|
values:
|
|
-
|
|
tag: power
|
|
type: float
|
|
|
|
examples:
|
|
-
|
|
pre: 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).
|
|
code: G2 X125 Y32 I10.5 J10.5
|
|
-
|
|
pre: 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).
|
|
code: G3 X125 Y32 I10.5 J10.5
|
|
-
|
|
pre: Move in a complete clockwise circle with the center offset from the current position by [20, 20].
|
|
code: G2 I20 J20
|
|
|
|
images:
|
|
-
|
|
title: G3 command geometry
|
|
caption: 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`
|
|
path: 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`](/docs/gcode/G017-G019.html) 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
|