blob: 77204b7818a4967c4be90b2172f83c165e4d47df (
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
|
---
tag: g005
title: Bézier cubic spline
brief: Cubic B-spline with XYE destination and IJPQ offsets
author: thinkyhead
experimental: true
since: 1.1.0
group: motion
codes: [ G5 ]
videos:
- aVwxzDHniEw
notes:
- It is an error if an axis other than `X` or `Y` is specified.
- The first control point is the current position of the head. `XY` is the destination (the last control point of the spline).
- The next control-points are the current position plus `IJ` and the current position plus `PQ`.
- "`I` and `J` can be omitted, which results in these offsets being zero. This produces a 3-point spline (try the [interactive demo](//www.geogebra.org/m/WPHQ9rUt)). However, `P` and `Q` are required (otherwise you just get a linear movement)."
parameters:
-
tag: X
optional: false
description: A destination coordinate on the X axis
values:
-
tag: pos
type: float
-
tag: Y
optional: false
description: A destination coordinate on the Y axis
values:
-
tag: pos
type: float
-
tag: E
optional: true
description: The length of filament to feed into the extruder between the start and end point
values:
-
tag: pos
type: float
-
tag: F
optional: true
description: The maximum feedrate of the move between the start and end point (in current units per second). This value applies to all subsequent moves.
values:
-
tag: rate
type: float
-
tag: I
optional: false
description: Offset from the `X` start point to first control point
values:
-
tag: pos
type: float
-
tag: J
optional: false
description: Offset from the `Y` start point to first control point
values:
-
tag: pos
type: float
-
tag: P
optional: false
description: Offset from the `X` end point to second control point
values:
-
tag: pos
type: float
-
tag: Q
optional: false
description: Offset from the `Y` end point to the second control point
values:
-
tag: pos
type: float
-
tag: S
optional: true
since: 2.0.8
description: Set the Laser power for the move.
values:
-
tag: power
type: float
examples:
-
pre:
- 'For example, to program a curvy "N" shape:'
code:
- G0 X0 Y0
- G5 I0 J3 P0 Q-3 X1 Y1
-
pre:
- 'A second curvy "N" that attaches smoothly to this one can now be made without specifying `I` and `J`:'
code:
- G5 P0 Q-3 X2 Y2
---
`G5` creates a cubic B-spline in the XY plane with the `X` and `Y` axes only. `P` and `Q` parameters are required. `I` and `J` are required for the first `G5` command in a series. For subsequent `G5` commands, either both `I` and `J` must be specified, or neither. If `I` and `J` are unspecified, the starting direction of the cubic will automatically match the ending direction of the previous cubic (as if `I` and `J` are the negation of the previous `P` and `Q`).
See [This interactive demo](//www.geogebra.org/m/WPHQ9rUt) to understand how Bézier control points work.
|