GPath CNC
Saving G-code
Last updated Dec 4, 2026, 5:24 PM
When your toolpaths are ready, you save them as G-code: the file of instructions your CNC machine follows. This page covers the Save toolpaths dialog, choosing a post-processor, tool changes, and the Toolpath summary.
Key idea: what's a post-processor? Every CNC controller speaks a slightly different version of G-code. A post-processor translates your toolpaths into the exact version your controller understands, for example how it pauses, changes tools, or names the file. Pick the one that matches your machine, and the same design will run correctly on a Shapeoko, a 3018 router, or an industrial mill.
GPath CNC doesn't drive your machine. It saves a file. You then open that file in your machine's control software (the sender), such as gSender, UGS, CNCjs, Carbide Motion, or Mach3, and run the job from there.
1. Open the Save toolpaths dialog
Use either:
- the Save toolpaths button in the Setup & output row of the Toolpaths tab, or
- Toolpaths → Save toolpaths in the top menu.
You need at least one toolpath first. Until then, the dialog says No toolpaths yet.
2. Choose the toolpaths to save
The top of the dialog lists every toolpath in your project, in the same order as the Toolpaths tab. Each row shows the toolpath's name and its settings as small tags (chips):
| Chip | What it shows |
|---|---|
| Tool name | The cutter it uses. Hover to see the diameter. |
Depths, e.g. 0.0 → 6.0 mm |
The start and finish depth |
Vectors, e.g. 3 vectors |
How many shapes the toolpath cuts |
- Click anywhere on a row to include it or leave it out. The tick box shows which are included.
- Click All or None (above the list, on the right) to select everything or clear the list.
- The heading shows how many you've picked, for example Toolpaths · 2 of 3 selected.
Tip: toolpaths run in the order they're listed. To change the order, reorder them in the Toolpaths tab before you save.
3. Set the output
The Output panel has three settings.
| Setting | What it does |
|---|---|
| Post-processor | The G-code version to write. The default is GRBL 1.1. Hover the box to see a description of the selected post. |
| Program name | A name written into the top of the file, on posts that include one (such as Fanuc, LinuxCNC, or Mach3). It starts as your project's file name, or Untitled if you haven't saved yet. |
| Single file | Shown when you've picked more than one toolpath. Turn on Combine into one file to save everything as one file (on by default), or turn it off to save one file per toolpath. |
Under the post-processor, chips show what that post writes:
| Chip | Meaning |
|---|---|
File type, e.g. .gcode .nc |
The file extensions the post uses. The first one is used when you save. |
| Arcs / Arcs as lines | Whether curves are written as true arcs (G2/G3) or as lots of short straight lines |
| Feed max | The fastest feed rate the post expects. You'll get a warning if a tool is set faster. |
| Spindle max | The fastest spindle speed (RPM) the post expects. You'll get a warning if a tool is set faster. |
4. Save
The footer tells you what will be written, for example:
- 1 toolpath → 1 file
- 3 toolpaths → 1 file (combined)
- 3 toolpaths → 3 files (not combined)
Click Save…, choose where to save, and click Save in your computer's save window.
- A combined file is suggested as
combined_toolpathswith the post's file extension, such ascombined_toolpaths.gcode. - Separate files open one save window per toolpath, each named after its toolpath (for example
Profile 1.gcode).
When it's done, you'll see Successfully saved 1 file(s) using GRBL 1.1.
5. Tool changes in a combined file
If a combined file uses more than one cutter, the dialog shows a tinted note explaining how the tool change will work. It depends on the post-processor.
Posts with automatic tool changes (M6)
On posts such as grblHAL, FluidNC, Carbide Motion, LinuxCNC, Mach3/Mach4, and the industrial controllers, GPath writes a tool-change command (for example T2 M6) at each change. Your controller then runs its own tool-change routine: it might prompt you, use a tool changer, or measure the new tool with a tool setter.
Posts without tool changes (M0 pause)
On posts such as GRBL 1.1, OpenBuilds BlackBox, TinyG, Smoothieware, Shopbot, DDCSV, and Marlin CNC, the controller can't change tools itself. At each change, GPath:
- stops the spindle;
- adds a note naming the next tool, for example
(Tool 2: load 6mm End Mill, set Z zero, then resume); - pauses the job with
M0.
Swap the bit, re-zero Z on the new tool, then press cycle start (or Resume in your sender) to carry on. Most senders, such as gSender, UGS, and CNCjs, show the note at the pause.
Why re-zero Z? Every bit sticks out of the collet by a different amount. If you don't set Z zero again, the new bit cuts too deep or too shallow by the difference in length.
Tool numbers (T1, T2…)
The T number for each cutter is its number in the Tool Database (Tools → Tool Library). Cutters without a number are given the next free number, starting at T1. Check the T numbers in the Toolpath summary (see section 7) before you save, especially if your machine has a tool changer or a tool table.
Tip: don't want to change tools mid-job? Turn Combine into one file off. You'll get one file per toolpath, and you change the bit between files yourself.
6. Warnings
GPath checks your job in four places. Most warnings let you save anyway. A few stop the save, because the file would be wrong.
In the dialog, before you save
These show in orange above the footer:
| Warning | What it means and what to do |
|---|---|
| The tool will break through the bottom of the material… | A toolpath cuts deeper than your material is thick. Fine for a through-cut with a spoilboard underneath; otherwise reduce the finish depth. |
| A finishing pass is listed before its matching roughing pass… | Your pocket's finishing pass would run first. Reorder the toolpaths so roughing runs first. |
| A V-carve pass is listed before its matching clearance pass… | Reorder so the clearance passes run before the V-carve: (clearance), (clearance 2), (clearance 3), then (v-carve). |
| An inlay warning | The plug no longer mirrors its pocket, runs past the material, overlaps the pocket, or the mill is too wide. See Inlay. |
Keep-out zones
If a toolpath crosses a keep-out zone, clicking Save… opens Toolpath passes through a keep-out zone. It names each toolpath and zone, such as Profile 1 passes through Clamp 1, and asks Save anyway?
Choose No to go back and move the zone or the parts. If the bit can safely pass over the zone, set its Zone height in the Design tab instead.
After saving: Saved with warnings
The file is saved, but the message lists things to check:
| Message | What to do |
|---|---|
| Tool "End Mill 6mm" feed rate 6000.0 exceeds post maximum feed 5000.0 | Your tool's feed or plunge rate is faster than the post expects. Lower it in the Tool Database, or check your machine can really go that fast. |
| …spindle speed … exceeds post maximum … | The same, for a spindle speed above the post's Spindle max |
| …is cut with the V-bit alone and is estimated to take… | A V-carve with no clearance mill will take an hour or more. Add a clearance end mill to save time. |
| …but the cutting edge of V-bit … is only … tall | The carve is deeper than the V-bit's cutting edge. Check the shank and collet will clear the stock, or carve shallower. |
| …step down is below 0.05 mm, the finest V-carve cuts, so it uses 0.05 mm. | The V-bit's step down is too small to use. Set it to 0.05 mm or more in the Tool Database. |
| …with Restrict depth off the end mill adds time but saves the V-bit no work… | The clearance pass is wasted. Delete it, or turn on Restrict depth. |
See V-Carve for more on the V-carve checks.
Nothing saved
These stop the save, because the file couldn't be cut. The message is titled Cannot save and says what's wrong:
| Message | What to do |
|---|---|
| A post-processor error | The post-processor has a problem, usually a mistake in a custom post. Fix the .toml file and import it again, or choose a different post. |
| A tool with a feed or plunge rate of 0 | The toolpath can't be saved like this. In its panel you'll see ⚠ Feed rate and plunge rate must be above 0 before saving. Set both rates in the Tool Database, then pick the tool again. |
| V-carve "V-carve 1" has nothing to cut… | Check the shapes are closed, Restrict depth to is above 0, and the shapes are wider than the V-bit's flat tip. |
| Toolpath "Pocket 1" could not be generated, so no G-code was made for it. | A fault in GPath, not your settings. Changing the shapes or settings may get round it. Please send us the project file. |
Example: you save three toolpaths and one V-carve has a 0.02 mm step down. The file saves, and Saved with warnings says that V-carve used 0.05 mm instead.
7. Toolpath summary
The Toolpath summary is a quick check of everything before you save. The order toolpaths will run in, the tools, and how many tool changes there are.
Open it with Toolpaths → Toolpath summary in the top menu, or the Toolpath summary button in the Setup & output row. The menu item works from any sidebar tab.
| Part | What it shows |
|---|---|
| Show | All toolpaths, or Selected to pick which ones to include (with All / None links) |
| Tools | Each cutter once, with its T number, size (or V angle), RPM, and feed rate |
| Toolpaths | Each toolpath in run order, with its T number on the right and chips for its type, depths, cut direction, tool, and number of vectors |
| Footer | How many tool changes the job has, for example No tool changes or 2 tool changes |
For V-carves with a clearance tool, a Leftover chip names the second cutter that clears what the V-bit leaves.
Click Save as text… to save the summary as a .txt file (for example toolpath-summary.txt), handy to print and keep beside the machine. Click Close when you're done.
8. Which post-processor?
Choose the post that matches your machine's controller (or the software you run it from). If you're not sure, GRBL 1.1 works with most hobby routers.
| Your machine or software | Post-processor | Tool changes | Notes |
|---|---|---|---|
| Most hobby routers, 3018s, run from gSender, UGS, or CNCjs | GRBL 1.1 | M0 pause |
The default |
| 32-bit GRBL boards | grblHAL | M6 |
Uses your controller's tool-change macro |
| ESP32 boards running FluidNC | FluidNC | M6 |
Uses your controller's tool-change macro |
| Shapeoko, Nomad (Carbide 3D) | Carbide Motion | M6 |
Carbide Motion prompts for each tool and measures it with a BitSetter. Needs a version with M6 support. |
| WorkBee Z1+ (Duet 2), run from WorkBee Control | GRBL 1.1 | One file per bit | RepRapFirmware treats M0 as stop, so turn Combine into one file off for jobs with more than one bit. See the WorkBee Z1+ guide. |
| OpenBuilds LEAD, C-Beam, older WorkBee (xPro / BlackBox) | OpenBuilds BlackBox | M0 pause |
|
| Onefinity | Buildbotics | M6 |
Tool-change macro with probing |
| 3D printers converted to CNC | Marlin CNC or Marlin CNC (keep work zero) | M0 pause |
See below |
| Smoothieboard | Smoothieware | M0 pause |
|
| TinyG, g2core | TinyG | M0 pause |
|
| DDCSV offline controllers | DDCSV | M0 pause |
|
| ShopBot (G-code mode) | Shopbot | M0 pause |
|
| PlanetCNC | PlanetCNC TNG | M6 |
|
| Mach3, Mach4 | Mach3, Mach4 | M6 |
Saves .tap files |
| UCCNC | UCCNC | M6 |
|
| LinuxCNC | LinuxCNC | M6 |
Saves .ngc files |
| Tormach | PathPilot | M6 |
|
| Centroid Acorn | Centroid Acorn | M6 |
|
| EdingCNC | EdingCNC | M6 |
|
| Large-format routers (Techno, Multicam…) | WinCNC | M6 |
|
| Industrial mills | Fanuc, Haas, Siemens Sinumerik | M6 |
Fanuc and Haas files start and end with % and a program number |
Good to know
- Spindle spin-up: every built-in post waits after the spindle starts, before the first cut, so the spindle reaches full speed first. That's 3 seconds on hobby controllers and 2 seconds on industrial ones.
- Tool length offsets (
G43): on industrial-style posts (Fanuc, Haas, Centroid, LinuxCNC, PathPilot, Mach3/4, UCCNC, EdingCNC), GPath appliesG43 H<tool>after every tool change, so the controller uses each tool's length from its tool table. Check your tool table is up to date before the first run. - Marlin CNC and work zero: the Marlin CNC post starts with
G92 X0 Y0 Z0, which makes wherever the tool is when you press start the work zero. Jog to your stock's corner first, then run. If you've already set the zero another way (on the screen or with a probe), use Marlin CNC (keep work zero) instead.
9. Custom post-processors (advanced)
If none of the built-in posts suit your machine, you can import your own. A post-processor is a small text file in TOML format.
- Open the Post-processor list and click Import Custom... at the bottom.
- Choose your
.tomlfile. - You'll see Imported post-processor: … and it's selected straight away. Custom posts show (custom) after their name.
Imported posts are kept when you restart GPath CNC.
Tip: the easiest way to write one is to start from a built-in post that's close to your machine and change only what you need.
A post-processor file has these sections:
| Section | What it holds |
|---|---|
[meta] |
name, vendor, description, file_extensions, version, and target = "cnc" |
[capabilities] |
What the controller supports, such as arcs and tool_change |
[format] |
Decimal places, line numbers (line_numbers, line_number_start, line_number_max), feed_decimals, and comment style |
[commands] |
The G-code for each action, such as rapid = "G0", spindle_cw = "M3 S{speed}", tool_change = "T{tool_number} M6", tool_length_offset, and tool_change_retract |
[header] / [footer] |
The lines written at the start and end of the file, as a sequence = [ … ] list |
[safety] |
max_feed_rate, max_spindle_speed, and spindle_spinup_seconds |
Commands and header lines can use placeholders in curly brackets, which GPath fills in when it saves. For example:
| Placeholder | Filled in with |
|---|---|
{name}, {date} |
The program name and today's date |
{units}, {absolute}, {plane_xy} |
The units and mode commands from [commands] |
{safe_z}, {home_x}, {home_y}, {home_z} |
Your Safe Z and Home position |
{tool_number}, {tool_diameter} |
The current tool |
{spindle_on}, {spindle_off}, {spindle_dwell} |
Spindle start, stop, and spin-up wait |
{speed}, {feed}, {seconds} |
Values used inside individual commands |
So a header like this:
[header]
sequence = [
"(Program: {name})",
"{units}",
"{absolute}",
"G0 Z{safe_z}",
"{spindle_on}",
"{spindle_dwell}",
]
might write:
(Program: Coaster)
G21
G90
G0 Z10.000
M3 S18000
G4 P3.0
Troubleshooting
Save… is greyed out Pick at least one toolpath in the list.
I don't see the Combine into one file switch It only appears when you've picked more than one toolpath.
The job didn't stop to change tools
Check you saved with the right post-processor. On a post without tool changes, GPath pauses with M0; on an M6 post, your controller must have a tool-change routine set up.
My file has the wrong extension for my software
The extension comes from the post-processor. Choose the post for your controller (for example Mach3 saves .tap, LinuxCNC saves .ngc).
The machine cuts in the wrong place or at the wrong height Check your reference point matches where you zero the machine, and that you set Z zero on the top of the stock.
Several sheets? Choose All sheets under Sheets to save one file per sheet. See Sheets.