Available · version 1.4

Local NC Export

Save the exact reviewed Cadivari Shapeoko program as a local NC file after export preflight.

Updated August 20264 min readCAM & machines

Recommended test

Begin with a valid standalone circular-arc Open Contour used for G2/G3 and export-preflight testing.

  1. Open Review export preflight. Before any confirmations, the footer save button should be disabled.
  2. Confirm the summary shows an operation-derived outside-contour-1.nc or open-contour-1.nc-style filename plus an eight-character Exact-text ID and byte count.
  3. Complete all four operator confirmations. Save … .nc should unlock.
  4. On localhost, click Save and confirm the browser downloads the proposed filename. In the installed Tauri app, the same action should open the Windows save dialog.
  5. Open the saved file in a text editor. Its first line should be (CADIVARI SHAPEOKO GRBL), its second line should require machine-setup verification, and its final line should be M30.
  6. Compare its line count and content with Inspect G-code preview. The saved text must match exactly, including the absolute G90 header, every incremental-I/J G2/G3 arc block, comments, and the final newline. Shapeoko output must contain no G91 or G91.1 line.
  7. Confirm there are no M3, M4, M5, or G54 commands. Manual router control remains explicit.
  8. Untick any confirmation. Saving should lock again and the previous result message should clear.
  9. In the desktop app, cancel the native save dialog. Cadivari should report Save cancelled and create no file.
  10. Make the operation invalid. Both G-code inspection and NC saving should remain blocked.

01 · WHAT YOU REVIEW IS WHAT YOU SAVE

The package refuses mismatched text

Before saving, Cadivari reconstructs the preview text from its visible line array and requires an exact match with the postprocessor output and line count. It also requires the Cadivari Shapeoko header and final M30 block.

LinesMust match the numbered preview in the same order
BytesASCII controller text; shown before saving
Exact-text IDStable eight-character fingerprint for the current program
GateAutomatic preflight plus all four operator confirmations

02 · PREDICTABLE OUTPUT

A safe filename derived from the operation

The operation name becomes lowercase, punctuation becomes hyphens, unsafe characters are removed, Windows reserved names are avoided, and the final extension is always .nc. An empty result falls back to cadivari-job.nc.

Outside Contour 1
        ↓
outside-contour-1.nc

03 · TWO DEVELOPMENT ENVIRONMENTS

Native dialog in the app and download on localhost

TauriWindows save dialog; user chooses the exact destination
BrowserDownloads the same bytes to the browser's configured download location

The browser fallback keeps everyday localhost testing quick. The installable app uses the native path designed for the final product.

04 · NARROW FILESYSTEM BOUNDARY

The webview does not receive broad write access

A dedicated Rust command validates the filename and program, opens the native save dialog, and writes only the user-selected local path. It rejects oversized content, non-ASCII text, unexpected headers, missing final M30, and spindle-control commands in this manual-router mode.

Export is not machine control

The command writes a file only. Cadivari still has no USB, serial, network, homing, jogging, probing, streaming, or machine-send capability.

CURRENT SCOPE

A guarded workflow for local export

  • Single-operation files, one-file Carbide Motion jobs, and numbered generic-GRBL stage files
  • Only operations set to On enter complete-job review and export; Off preserves settings for later use
  • Enabled inside/open work must come before the final enabled outside cutout
  • Connected chains preserve ordered motion and Safe Z returns
  • Exact circles preserve G2/G3 motion; approved open splines and compensated general closed contours use G1 samples
  • Carbide Motion mode uses exact-diameter tool comments, unique T numbers, M6 prompts, a higher Service/Park Z after BitSetter returns, and one final M30
  • Every exported program parks at the configured Service/Park Z before M30; this is stock-top work-coordinate clearance, not G28/G53 machine home
  • Separate-files mode contains no M6 and ends every stage with M30
  • Millimetres, absolute endpoints, XY plane, incremental I/J centres, and feed-per-minute modes
  • Manual router only; no M3/M4/M5, coolant, homing, probing, or automatic tool changer control
  • No material simulation, collision proof, machine certification, or direct connection

Compare a fixed exported part job against a known-good Shapeoko/Carbide Motion reference before cutting valuable stock.