Repository navigation
AdaptivePocket tests: run the independent leading-contact check (#190, part 1) - #362
Merged
Merged
Conversation
stevecad#190) The sampled LeadingOracle from tests/roughing.rs (no planner, prover or stock code) now also checks AdaptivePocket's engagement_front runs: the L pocket, both link-feed runs, the square and circular wall-pass pockets, and the three ramp-entry runs. Every cutting and stay-down link stroke's leading contact must stay within acos(1 - stepover / r) plus the same 3 degree sampling slack the roughing test uses. A new test checks the oracle itself: a slot through fresh stock reads the full leading half-circle, and a pass beside a through-cut at 0.5, 1 and 1.5 mm reads acos(1 - w / r) to within its whole-degree count. Test-only: LeadingOracle and its methods become pub(crate) so adaptive.rs and ramp_entry_front.rs can use it; no existing assertion changes.
…acing (stevecad#190) The allowance for slivers between sampled discs used the largest sample step for every disc. A move shorter than that step then cleared its own leading edge from its start: a 0.1 mm straight cut in fresh stock read 179 degrees as one move and 0 as 200 moves. Each disc now carries the allowance of its own move's spacing. New test: the same slot and side step read the same split into one move or 200.
The oracle cleared stock within an inflated radius of sampled centres, so an unchecked lead could clear stock ahead of its own end: a 0.0005 mm cut after a 1 mm lead read 0 degrees with the lead as one move and 179 with it split in 2,000. It now keeps each swept piece (line or arc) and clears exactly the points within the cutter radius of it, so the reading does not depend on how moves are split or sampled. New test for the lead case.
This was referenced Nov 20, 2026
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.
Part 1 of #190: the second acceptance point. The independent
LeadingOracleengagement check fromtests/roughing.rsnow also runs on theAdaptivePocket(engagement_front) tests. Test-only. Part 2 (removingdisk_front/stock_front) is a separate PR stacked on this one.What changes
LeadingOracleand the methods it needs becomepub(crate). The oracle now keeps each swept piece (line or arc) and clears exactly the points within the cutter radius of it. Before, it cleared stock within an inflated radius of sampled centres, so its reading depended on how the moves were split: a 0.1 mm slot read 179° as one move and 0° as 200 moves, and a short cut after a 1 mm lead read 0° or 179° depending on how the lead was split.leading_contact_degintests/adaptive.rsruns the oracle over a pocket's motions. Its only inputs are the stock footprint and the motions; it uses no planner, prover or stock code.worst <= acos(1 - stepover / r) + LEADING_SLACK_DEG(3°, the roughing test's sampling slack, now a named constant) is added to the L pocket (two levels), both link-feed runs, the square and circular wall-pass pockets, and every ramp-entry run intests/ramp_entry_front.rs.No existing assertion was changed or loosened. No source, Python, docs or benchmark change;
bench/results/baseline.jsonanddocs/benchmarks.mdare untouched.