Recommended test
Begin with a valid standalone circular-arc Open Contour used for G2/G3 and export-preflight testing.
- Open Review export preflight. Before any confirmations, the footer save button should be disabled.
- Confirm the summary shows an operation-derived
outside-contour-1.ncoropen-contour-1.nc-style filename plus an eight-character Exact-text ID and byte count. - Complete all four operator confirmations. Save … .nc should unlock.
- 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.
- 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 beM30. - Compare its line count and content with Inspect G-code preview. The saved text must match exactly, including the absolute
G90header, every incremental-I/J G2/G3 arc block, comments, and the final newline. Shapeoko output must contain noG91orG91.1line. - Confirm there are no
M3,M4,M5, orG54commands. Manual router control remains explicit. - Untick any confirmation. Saving should lock again and the previous result message should clear.
- In the desktop app, cancel the native save dialog. Cadivari should report Save cancelled and create no file.
- 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.
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.nc03 · TWO DEVELOPMENT ENVIRONMENTS
Native dialog in the app and download on localhost
TauriWindows save dialog; user chooses the exact destinationBrowserDownloads the same bytes to the browser's configured download locationThe 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.
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