Skip to content

CAM workflow slice: contiguous Library-to-Run flow through the CAM panel - #9

Open
NoobyNull wants to merge 5 commits into
mainfrom
v0.8.0-cam-workflow
Open

NoobyNull wants to merge 5 commits into
mainfrom
v0.8.0-cam-workflow

Conversation

@NoobyNull

Copy link
Copy Markdown
Owner

What changed

First slice of the workflow re-architecture: the Library → Project → CAM → Run pipeline is traversable start to finish for the first time since the Direct Carve yank.

  • Activating a carve operation from the Project Plan records the parent model as the CAM panel's active setup (name + resolved mesh path) — the routing existed, the context was previously dropped.
  • The CAM panel grows from placeholder to stage surface: active-setup line, machine picker fed from the engine's /api/machines, Generate G-code, live job status, and Send to Run.
  • Generation runs fully async: ensureReady + submitJob on a worker thread, results marshaled through MainThreadQueue. Engine start is async too, removing the accepted ~10s UI-thread freeze from Phase 2.
  • The default rough+finish surfacing JobSpec comes from a new pure cam::buildDefaultSurfacingJobSpec builder (unit-tested); tooling values are placeholders until Phase 4 projects real .vtdb tools.
  • Returned G-code persists the way Direct Carve used to save programs: atomic write into the project directory, library record with prepared-document statistics, and a Generated project item parented to the carve operation — the unchanged Run boundary consumes it like any other program. Send to Run activates the item and opens the sender across the workspace boundary.
  • New Project Plan rows now read "CAM: " (identifiers keep the direct_carve keys so existing projects resume).

Deliberate gaps (next slices)

No toolpath preview in the viewport yet, no per-operation parameter editors (Phase 5), and openWindow still refuses handoffs while the Library overlay is open.

Verification

Full build + 1499 tests green; bridge bundles under bun; the identical default spec shape passes the packaging smoke end-to-end against a live engine payload.

🤖 Generated with Claude Code

Matthew and others added 2 commits August 30, 2026 23:29
The Library→CAM→Run pipeline becomes traversable end to end for the
first time since the Direct Carve yank. Project Plan carve stages already
routed operation items to the CAM window; the window now does something
with that context.

Activating a carve operation records the parent model as the CAM panel's
active setup (name + resolved mesh path). The panel gains a machine
choice fed from the engine's /api/machines, a Generate G-code action, a
job status line, and a Send to Run handoff. Generation runs the sidecar
off the UI thread (ensureReady + submitJob on a worker, results marshaled
through MainThreadQueue), building a default rough+finish surfacing
JobSpec from the new pure cam::buildDefaultSurfacingJobSpec builder.

The returned G-code persists exactly the way Direct Carve used to save
programs: atomic write into the project directory, G-code library record
with prepared-document statistics, and a Generated project item parented
to the carve operation — so the existing Run boundary consumes it
unchanged. Send to Run activates that item and opens the sender.

Engine start is now async as well, removing the accepted ~10s UI-thread
freeze from the Phase 2 placeholder.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Aug 31, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9a36f34a-dd8d-4d95-999f-97c83d262760


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Matthew and others added 3 commits August 31, 2026 07:17
The default JobSpec sent meshes in their authored orientation, so a
Z-up model like a standing dagger got roughed as concentric rings
around its vertical silhouette instead of carved from above. The CAM
panel gains an Orientation choice defaulting to lay-flat: the app picks
the engine axisSwap (none/yz/xz) that minimizes the resulting Z height
from the model's stored bounds, with explicit overrides available.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Answers the 'we cannot just make G-code without knowing the basics'
feedback. The CAM panel now shows Clearing tool and Finishing tool
choices backed by the .vtdb tool database through a new pure
cam::toEngineTool projection (Vectric geometry + cutting data -> engine
ToolSpec, with imperial->metric and rate_units->mm/min conversion and
stepover as a diameter fraction). Auto policy picks the largest flat
endmill for clearing and a ball nose no coarser than it for finishing;
the hardcoded 6mm/3mm pair remains only as a labeled fallback when the
library has nothing usable.

The machine combo is now labeled Post-processor and explains itself
before the engine has listed machines, and the generation status line
names the tools and orientation used, so a run is never a mystery:
"Generating toolpaths... Tools: X clearing, Y finishing; laid flat".

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Which windows exist in which workspace mode, and what an open request
does about a mismatch, were spread across enforceWorkspaceBoundary and
openWindow as inline role checks. core/config/window_mode_policy now
owns both rules: windowAvailableInMode (Workshop->Model, Sender->CNC,
everything else spans both) and windowOpenAction (cross-mode requests
switch the workspace, an active stream pins it, the Library overlay
blocks Sender windows). WorkspaceMode moves next to the rules it
governs; UIManager consumes the policy instead of encoding it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant