Available · version 1.4

Shapeoko G-code Preview

Inspect Shapeoko and GRBL G-code generated from verified Cadivari CAM motion before local NC export.

Updated August 20265 min readCAM & machines

Recommended test

Use a valid standalone circular-arc Open Contour with two or more depth passes.

  1. Find G-code · Shapeoko / GRBL below Motion Plan in the operation inspector.
  2. Confirm it reports program lines, motion blocks, separate G0/G1/G2–3 counts, lowest Z, and Manual spindle.
  3. Choose Inspect G-code preview. A large line-numbered dialog should open without hiding any safety messages.
  4. At the top of the program, confirm G21, G90, G17, and G94 appear as separate explicit modes. No G91 or G91.1 line should be present in Shapeoko output.
  5. Confirm there is no G54, M3, M4, or M5. A target-RPM comment and M0 pause must appear before the first motion.
  6. For a new job, the first motion should be G0 Z10.000, followed by safe-height XY positioning and a pass comment before the first plunge. Saved projects use their configured Safe Z.
  7. Inspect each pass. It should plunge with G1, then contain exactly one G2 or G3 block with absolute X/Y endpoint, incremental I/J centre offsets, and feed.
  8. Reverse the arc direction. The circular command should switch between G2 and G3 while the I/J values continue to describe the exact centre from the new start.
  9. The operation should first retract to Safe Z, then make an explicit higher Service/Park Z rapid before the manual-spindle stop reminder and M30.
  10. Choose Review export preflight in the footer. The separate job and operator review should open without creating a file.
  11. Return with Back to G-code, or close with the backdrop or Esc. The code viewer itself remains read-only.
  12. Make Feed invalid or move the cutter path outside stock. The G-code panel should become blocked and both review buttons disabled.

01 · CONSERVATIVE DIALECT

A deliberately small command set

G21Millimetres
G90Absolute XYZ endpoints
G17XY working plane
I / JGRBL-default incremental arc-centre offsets
G94Feed per minute
M0Manual-router start pause before motion
G0Safe retract and rapid positioning
G1Plunge, ramp, linear cut, and tab transitions
G2 / G3Exact clockwise / counter-clockwise circular cut

The postprocessor omits G91.1 because GRBL already defines incremental I/J as its native arc-centre mode and Carbide Motion can interpret the word as a relative-endpoint G91 command. XYZ endpoints remain explicitly absolute under G90. Phase comments identify the programmed cut, plunge/ramp, optional pocket-finish, and spindle-target values before motion. The postprocessor consumes already verified typed motion and never reconstructs an arc from display samples, reverses an Open Contour cut, or introduces controller-specific cycles.

02 · BLOCKING CHECKS

No program when motion is ambiguous

The postprocessor refuses to produce lines unless the source plan is valid, continuous, finite, and inside the configured stock. Circular moves must be constant-Z cuts whose exact geometry agrees. A spline must pass its On-line, segment-ceiling, linear-only, sample-count, and measured chord-error gate.

ContinuityEvery move begins exactly where the previous move ended
ContainmentLinear endpoints and exact circular quadrant extrema remain within stock XY
Arc consistencyStart/end radii, predicted endpoint, sweep sign, and G2/G3 direction agree
Spline boundSample and segment counts agree; measured chord error stays within 0.050 mm
Rapid safetyXY G0 positioning remains at or above Safe Z
Service safetyService/Park Z is finite and higher than Safe Z
Feed safetyEvery G1, G2, and G3 block has a finite positive rate
FinishThe operation retracts to Safe Z before the higher program-end park

An intentional spoilboard overcut remains valid but appears as a warning with its exact depth below the stock bottom.

03 · EXPLICIT LIMIT

The router remains manual

The operation's RPM remains visible as a target comment, but no spindle start or stop command is emitted. Instead, M0 pauses each cutter stage before its first motion. Set the requested RPM, start the router, and resume in the sender. Export Preflight v1.4 names this explicitly as Manual router and requires a session-only operator confirmation.

Preview valid does not mean machine ready

The dialog says “Review before local export — not machine verified.” Saving requires the separate preflight, and the exported text still contains a setup-verification reminder. There is no machine connection.

04 · ONE MOTION SOURCE

Animation and postprocessing stay synchronized

Validated rectangle or Open Contour
        ↓
Typed motion plan
        ├── 3D CAM Animation
        └── Shapeoko / GRBL preview
        ↓
Read-only inspection

The postprocessor consumes typed motion records rather than CAD shapes or Three.js geometry. A rectangle tab lift therefore becomes the matching vertical G1 block; an Open Contour Safe Z return remains a G0 rather than becoming an unrequested reverse cut.

CURRENT SCOPE

Inspectable text with gated local saving

  • Single-operation review plus ordered complete-job output
  • Inside/open work must precede the final outside cutout
  • Connected chains preserve every ordered primitive and Safe Z return
  • Every circular primitive remains exact G2/G3 motion; every approved spline sample becomes one G1 cut per pass
  • Carbide Motion complete-job output labels every cutter stage, emits M6 T…, follows it with one M0 manual-router pause, and contains one final M30
  • Generic GRBL output writes numbered stage files without M6 and with one M0 start pause per file
  • Manual spindle warning; no M3, M4, or M5
  • No G54 work-offset selection, homing, probing, coolant, or automatic tool changer control
  • Export Preflight adds the separate operator review
  • Local NC Export saves the exact reviewed text
  • No collision, material-removal simulation, machine connection, or cycle-time promise

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