Home › G-codes › LinuxCNC Tormach › G5
G5 Cubic spline
LinuxCNC Tormach G-code · Mill
Cuts a smooth cubic B-spline in the XY plane from the current point to X Y, shaped by two control points.
Format
G5 X Y [I J] P Q F
Addresses
| Address | What it does |
|---|---|
X Y | End point of the spline |
I J | Offset from the start point to the first control point |
P Q | Offset from the end point to the second control point |
F | Feed rate |
How it works
Modal, motion group.
Example program
G20 G17 G40 G49 G54 G80 G90 G94 (INCH, SAFE START)
T1 M6 G43 (.250 ENGRAVER)
S8000 M3
G0 X0 Y0 Z0.1
…
T1 M6 G43 (.250 ENGRAVER)
S8000 M3
G0 X0 Y0 Z0.1
…
The full 7-line example is in the app. Example is in inch. Check offsets and clearances first.
Watch out for
- XY plane only. G17 must be active.
- I J are required on the first G5 in a series. Later G5 blocks can leave them out to keep the curve smooth.
- P Q are required on every G5 block.
Related codes
G5 on other controls
The same number can mean something different on another control.
| Control | Meaning |
|---|---|
| Mazak (EIA) | High speed machining mode |
| Mitsubishi M70 M80 | High speed high accuracy control II and III |
| Heidenhain TNC (ISO) | Arc without direction, Cartesian |
| Fagor 8055 8065 | Round corner |
| Fadal | Non modal rapid travel |
Every G-code for LinuxCNC Tormach in your pocket. The app has the full example programs, search by number or shop word, a line decoder and calculators for tapping, threading and drilling.
Open G5 in the app All LinuxCNC Tormach G-codes