G5 creates a cubic B-spline in the XY plane using only the X and Y axes. P and Q give the second control point as offsets from the end point and must both be specified. I and J give the first control point as offsets from the start point; on later G5 commands they can be omitted so the spline continues smoothly from the previous cubic.
| Language | gcode |
|---|---|
| Code | G5 |
| Syntax | G5 X- Y- <I- J-> P- Q- |
| Dialect | LinuxCNC |
| Name | Data type | Description |
|---|---|---|
| X | real | |
| Y | real | |
| I | real | X incremental offset from start point to first control point |
| J | real | Y incremental offset from start point to first control point |
| P | real | X incremental offset from end point to second control point |
| Q | real | Y incremental offset from end point to second control point |