Contour CAM: inside cuts inside, tabs hold, Run Job is not the default button - #905
Merged
Merged
Conversation
…t button Found by replaying the generated G-code against the outline before a first cut on the Anolex, not by the preview or the existing tests (which asserted only that moves came back). Kernel (vcad-kernel-cam): - Contour2D::inside() was identical to outside(): both offset by +tool radius, so an inside contour ran a tool diameter into the part. `inside` is now a field and the compensation is signed. - An inward offset that falls into several pieces (cutter does not fit a neck) is CamError::ContourSplit instead of silently following the first. - Tabs: honoured on every pass below the tab top (was final pass only), width is metal left (lifted run = width + tool diameter), vertical lift and plunge at the ends instead of a ramp from the previous vertex, a tab across the loop seam stays whole, even spacing starts half a pitch in, and each tab settles on the nearest straight stretch so it never lands in a notch. - Always retract straight up after the last pass before the XY rapid. Native app: - A contour imported as a through cut follows the stock thickness until its depth is edited, so importing before entering the thickness no longer leaves the job blocked at the old depth. - Run Job's shortcut was Option-Command-Return; AppKit exposes any Return-keyed button as the window's default button, so accessibility clients pressed it for "return". Now Option-Command-J, and every dialog that starts motion (run, home, move, zero, macro) defaults to Cancel. - CNCOutlineTests: VCAD_STATOR_GCODE_OUT dumps the job for outside checks. Friction log items 32-54 cover the session, including the first cut. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Getting the rana-60-cnc stator ready to cut on the Anolex 4030, I replayed the app's generated G-code against the outline it came from before letting it near the machine. That check — not the preview, and not the existing tests, which only asserted that moves came back — found that the job would have destroyed the part.
Kernel (
vcad-kernel-cam)Contour2D::inside()was byte-identical tooutside(); both offset by +tool radius. The stator's bore-and-slots pass ran 3.2 mm into every post and the ring.insideis now a field and the compensation is signed.CamError::ContourSplit.Tests check the side (both windings), the metal actually left under each tab on every pass, the seam case, tab placement on a notched outline, and the neck refusal. The side and placement tests were mutation-checked (fail on the old behaviour).
Native app
CNCOutlineTests:VCAD_STATOR_GCODE_OUTdumps the job so it can be checked outside the app.Result
First real cut with the fixed CAM: the stator profile in a 1 mm copper plate, Ø2 2-flute, sent from ncSender — clean profile, cutter survived.
docs/native-app-friction-log.mditems 32–54 record everything hit along the way, fixed and open.Testing
cargo test -p vcad-kernel-cam(71 pass),cargo test -p vcad-ffi cam,cargo clippy -p vcad-kernel-cam -p vcad-ffi -- -D warnings,cargo fmt --checkswift test --filter "CNC|DesignShellTests|WorkspaceSwitchTests"(35 run, 0 failures)No generated WASM artifacts are touched.
🤖 Generated with Claude Code