Skip to content

Preserve tool shapes in IR and verify each move with its cutter - #154

Merged
mountainarcwelding merged 2 commits into
mountainarcwelding:mainfrom
DarkBiscuits:codex/146-tool-shape-verification
Nov 10, 2026
Merged

mountainarcwelding merged 2 commits into
mountainarcwelding:mainfrom
DarkBiscuits:codex/146-tool-shape-verification

Conversation

@DarkBiscuits

Copy link
Copy Markdown
Contributor

run currently drops cutter shape from the IR, so verify --mesh requires a separate --tool and applies that single cutter to the whole program.

Preserve optional flat, ball, bull and V-bit geometry on IR tools, and let verify --mesh select the cutter for each cutting move. Tool changes within a path are honored. --tool remains a global override and is identified in the diagnostic output. Existing IR without shape metadata still loads; mesh verification of its cuts requires an override.

Chamfer operations keep their existing V-bit fields and copy their geometry onto the tool. Conflicting angles or tip diameters for one tool ID, or an explicit tool shape conflicting with chamfer geometry, fail before output is written. V-bit metadata is supported; V-bit mesh verification explicitly returns “not supported yet” instead of skipping cuts or substituting another shape.

Validation on Linux with Rust 1.95:

  • Focused tests cover shape validation and serialization, old IR, mixed cutters and repeated tool changes, indexed views, conflict diagnostics, V-bit rejection, and overrides.
  • The dome example verifies without --tool; the chamfer example emits V-bit metadata.
  • Complete scripts/check.sh passed: formatting, workspace Clippy, 1,103 passing tests (one existing ignored), wasm library checks, and licenses.

Fixes #146.

DarkBiscuits, co-authored with Codex. Implementation and tests use CAMpanion's own sources and synthetic inputs, following the clean-room contribution rules. No physical controller testing was performed.

@mountainarcwelding

Copy link
Copy Markdown
Owner

Thanks for these, really appreciate the quick turnaround and the tests. I've kicked off CI and will review once it's green. One small ask: could you change "Fixes #146" to "Refs #146"? I keep issues open until a fix has been run on a real machine, so I'd rather they not auto-close on merge.

Keep both Unreleased changelog entries: tool-shape Added notes and the
G91.1/G53 Fixed notes.

Co-authored-by: DarkBiscuits <darkbiscuitstuff@gmail.com>
@mountainarcwelding
mountainarcwelding merged commit 81b0555 into mountainarcwelding:main Nov 10, 2026
1 check passed
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.

The IR drops the job's tool shape, so verify --mesh needs --tool and can check only one cutter

2 participants