thinkyhead

G5 - Bézier cubic spline

1.1.0 planner Cubic B-spline with XYZE destination and IJPQ offsets

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).


Usage

G5 I<pos> J<pos> P<pos> Q<pos> X<pos> Y<pos>

Argument Description
I<pos>

X incremental offset from start point to first control point

J<pos>

Y incremental offset from start point to first control point

P<pos>

X incremental offset from end point to second control point

Q<pos>

Y incremental offset from end point to second control point

X<pos>

A coordinate on the X axis

Y<pos>

A coordinate on the Y axis

Notes

It is an error if an axis other than X or Y is specified.

Examples

For example, to program a curvy “N” shape:

G0 X0 Y0
G5 I0 J3 P0 Q-3 X1 Y1

A second curvy “N” that attaches smoothly to this one can now be made without specifying I and J:

G5 P0 Q-3 X2 Y2