Welcome to mirror list, hosted at ThFree Co, Russian Federation.

G002-G003.md « _gcode - github.com/MarlinFirmware/MarlinDocumentation.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5c0bdb12d875a4da423be8bc4e00a69132752976 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
---
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