Machine Selection
Before exporting, select the machine controller that will run the G-code. The machine selection determines the post-processor — the dialect of G-code, units, and header/footer format that the output uses.
Select the Project node in the feature tree. In the properties panel, find the Machine dropdown and choose your controller.
Built-in machine definitions include Grbl, GrblHAL, LinuxCNC, Mach3, and UCCNC. You can also add custom machine definitions by clicking Add machine and providing a JSON definition file.
The machine you pick is stored inside the project, while the list you pick it from lives in the application. That split is what keeps a shared project exportable and stops an app update from quietly changing a proven job's output — see Machine Library.
Clearance Settings
The following project-level settings affect the generated G-code:
| Setting | Description |
|---|---|
| Safe Z | The Z height for rapid moves between operations. The tool retracts to this height before any rapid traverse. |
| Op Clear Z | The Z height for rapid moves within an operation (between passes and between features). |
| Clamp Clear XY | Horizontal clearance around clamp boundaries. |
| Clamp Clear Z | Additional Z clearance above clamp height on rapid moves over clamps. |
Export Dialog
Click Export in the CAM panel (or use the keyboard shortcut) to open the Export dialog. The dialog shows:
- A preview of the generated G-code with syntax highlighting.
- The selected machine and post-processor.
- A summary of the operations that will be included.
Review the G-code preview before downloading. When it looks correct, click
Download to save the .nc file.
Arc Output That Controllers Accept
When an operation has arc
fitting enabled, PureCut CNC replaces runs of short straight moves with real
G2/G3 arcs. Controllers in the GRBL family check every arc they
receive: they recompute the radius from the start point, the end point and the
I/J centre offsets in the block, and if the two radii disagree by
more than a small tolerance they reject it with error:33
(Gcode invalid target) — mid-job, with the spindle in the cut.
Arc output is now checked against exactly that arithmetic before the file is written:
- Fitted arcs are constructed so that adjacent runs agree on the point they share, rather than each rounding independently and drifting apart.
- The
I/Joffsets are chosen on the same number grid the file is written in, so what the controller reads is what was validated. - The check runs on the formatted output — the actual text of the block — not on the higher-precision numbers behind it.
- Any run that still can't be expressed as an acceptable arc falls back whole to ordinary
G1moves. Output stays valid; it just isn't an arc.
On the case originally reported from the field, the worst radius mismatch went from 0.010565 mm — comfortably over GRBL's limit — to 0.000111 mm, a 45× margin under it.
Checked Against Real Controllers
Exported G-code is verified by feeding it to the controllers' own interpreters — GRBL
1.1's gcode.c and LinuxCNC's rs274 — rather than to a
re-implementation of what those controllers are believed to do. Measured against each
other, GRBL's arc tolerance is about 0.005 mm and LinuxCNC's about 0.028 mm, so
GRBL is the strictest target and clearing it clears the rest. FluidNC's arc check is
identical to GRBL's, and GRBL's own check is unchanged between 0.9j and 1.1h.
What Gets Exported
Only operations that are both enabled and have their toolpath visible are included in the G-code export. Operations with Enabled unchecked are skipped entirely.
Operations are exported in the order they appear in the operations list. Reorder them by dragging in the CAM panel before exporting.
Features that are hidden in the feature tree are excluded from toolpath calculations and therefore from the export.
Operation Booklets (PDF Setup Sheets)
Alongside the G-code, you can export a printable setup sheet for any single operation. Select an operation in the CAM panel, then in its parameters find the Booklet field and click Export PDF. The app builds a one-operation PDF you can keep at the machine or hand off with the job.
Each booklet gathers everything you need to set up and run that operation:
- Project and operation name, a description of what the operation does, and the date generated.
- Units, machine origin (Z) summary, and stock size.
- The target features the operation cuts.
- Tool details and the operation's feeds, speeds, and stepover/stepdown settings.
- Toolpath statistics (such as cut length and estimated moves).
- A snapshot image of the toolpath, and any warnings detected for the operation.
Booklets are exported one operation at a time — the file is named
<project>_<operation>_booklet.pdf. Export a booklet per operation
to assemble a full job packet.
Custom Machine Definitions
If your machine controller is not in the built-in list, you can add a custom definition. Click Add machine in the Project properties panel and select a JSON file containing the machine definition. If a file fails validation, the specific problems are shown inline so you can fix them — there is no longer a blunt error alert.
The easiest way to start a custom definition is from inside the app: Duplicate a built-in machine that's close to your controller, Edit the copy, then Export it if you want a JSON backup. That always produces a definition matching the current schema — see below.
If you already have a working post-processor for the same controller in another CAM package, the Post-Processor Converter (a command-line tool in the source repository) can convert it into a starting-point definition instead.
Editing Machines In-App
You don't have to hand-edit JSON in an external editor. Select a custom machine and the Project properties panel exposes three actions:
- Edit — opens a machine editor dialog. A focused form covers the fields you change most often (name, description, file extension, units commands, program header/footer, and so on); an Advanced tab gives you the raw JSON as an escape hatch for anything the form doesn't surface. Both views validate live as you type and flag invalid values immediately, so you can't save a broken definition.
- Duplicate — clones the selected machine (including a built-in) under a new id and name, giving you a custom, editable starting point that matches a controller you already have.
- Export — writes the current definition back out to a JSON file to share or back up.
Field Reference
| Field | Description |
|---|---|
| id | Unique identifier string. Must not clash with built-in IDs (generic, grbl, grblhal, mach3, linuxcnc, uccnc). |
| name | Display name shown in the Machine dropdown. |
| description | Short description shown in the UI. |
| vendor | Optional vendor name. |
| builtin | Must be false for custom definitions. |
| fileExtension | Output file extension, e.g. nc, tap, gcode. |
| coordinateSystem | Maps internal X/Y/Z axes to machine axes. Use -X etc. to invert an axis. |
| numberFormat.decimalPlaces | Decimal places for coordinates. Can be a single number or separate mm/inch values. |
| numberFormat.trailingZeros | Whether to pad numbers with trailing zeros. |
| numberFormat.leadingZero | Whether to include the leading zero on numbers less than 1. |
| units.mmCommand | G-code command to select millimeter mode, e.g. G21. Set to null to omit. |
| units.inchCommand | G-code command to select inch mode, e.g. G20. Set to null to omit. |
| program.header | Array of lines emitted at the start of the file. Supports tokens: {programName}, {date}, {unitsCommand}, {wcsCommand}. |
| program.footer | Array of lines emitted at the end of the file. |
| program.commentPrefix / commentSuffix | Characters that wrap comments, e.g. ( and ) for Mach3, or ; and for inline comments. |
| program.lineNumbers | Whether to prefix each line with a line number (N10, N20, …). |
| workCoordinates.selectCommand | Work coordinate system command, e.g. G54. Set to null to omit. |
| motion.arcFormat | ij for center-offset arc format (most controllers), or r for radius format. |
| motion.modalMotion | If true, the motion command (G0/G1) is omitted when it hasn't changed since the last move. |
| feedSpeed.inlineWithMotion | If true, F and S words are emitted on the same line as the motion command. |
| feedSpeed.modalFeedSpeed | If true, F and S are omitted when unchanged. |
| toolChange.commands | Array of lines emitted on a tool change. Supports {toolName} token. |
| cannedCycles | Drill cycle commands. Set to null if your controller does not support canned cycles — drilling will fall back to explicit G0/G1 moves. |
| coolant | Coolant on/off commands. Set to null if not used. |
| stop.programEndCommand | Command emitted at the very end of the file, e.g. M30 or M2. |
Custom machine definitions can be removed by selecting the machine in the dropdown and clicking Remove machine. Built-in definitions cannot be removed.
Click Refresh (the refresh icon next to the Machine dropdown) to reload machine definitions if you have updated a definition file externally.