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, LinuxCNC, and Mach3. You can also add custom machine definitions by clicking Add machine and providing a JSON definition file.
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.
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.
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.
Download the template below as a starting point, edit it to match your controller, then load it into the project:
Download machine-definition-template.json
Field Reference
| Field | Description |
|---|---|
| id | Unique identifier string. Must not clash with built-in IDs (generic, grbl, mach3, linuxcnc). |
| 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.