thinkyhead shitcreek edwilliams16

G2-G3 - Arc or Circle Move

1.0.0-beta motion Add an arc or circle movement to the planner ARC_SUPPORT

Description

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 position on the Z, A, B, C, U, V, and W axes is linearly interpolated over the whole arc.

‘ARC_P_CIRCLES’ enables the use of the ‘P’ parameter to specify complete circles

Usage

G2 [A<pos>] [B<pos>] [C<pos>] [E<pos>] [F<rate>] I<offset> J<offset> [P<count>] R<radius> [S<power>] [U<pos>] [V<pos>] [W<pos>] [X<pos>] [Y<pos>] [Z<pos>]
G3 [A<pos>] [B<pos>] [C<pos>] [E<pos>] [F<rate>] I<offset> J<offset> [P<count>] R<radius> [S<power>] [U<pos>] [V<pos>] [W<pos>] [X<pos>] [Y<pos>] [Z<pos>]

Parameters

[A<pos>]
2.0.9
I_DRIVER_TYPE AXIS4_NAME 'A'

A coordinate on the A axis

    [B<pos>]
    2.0.9
    J_DRIVER_TYPE AXIS5_NAME 'B'

    A coordinate on the B axis

      [C<pos>]
      2.0.9
      K_DRIVER_TYPE AXIS6_NAME 'C'

      A coordinate on the C axis

        [E<pos>]

        The amount to extrude between the start point and end point

          [F<rate>]

          The nominal movement rate. For moves involving all primary axes (XYZ), the feed rate is applied along the helical trajectory.

          The feedrate set here applies to subsequent moves that omit this parameter. Feedrate is interpreted according to the specification for LinuxCNC default state (trivial kinematics, CANON_XYZ feed reference mode, Units-Per-Minute mode). For details, refer to the LinuxCNC documentation.

            I<offset>

            An offset from the current X position to use as the arc center

              J<offset>

              An offset from the current Y position to use as the arc center

                [P<count>]

                Specify complete circles. (Requires ARC_P_CIRCLES)

                  R<radius>

                  A radius from the current XY position to use as the arc center

                    [S<power>]
                    2.0.8

                    Set the Laser power for the move.

                      [U<pos>]
                      2.1
                      U_DRIVER_TYPE AXIS7_NAME 'U'

                      A coordinate on the U axis

                        [V<pos>]
                        2.1
                        V_DRIVER_TYPE AXIS8_NAME 'V'

                        A coordinate on the V axis

                          [W<pos>]
                          2.1
                          W_DRIVER_TYPE AXIS9_NAME 'W'

                          A coordinate on the W axis

                            [X<pos>]

                            A coordinate on the X axis

                              [Y<pos>]

                              A coordinate on the Y axis

                                [Z<pos>]

                                A coordinate on the Z axis

                                  Examples

                                  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

                                  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

                                  Move in a complete clockwise circle with the center offset from the current position by [20, 20].

                                  G2 I20 J20