Repository navigation
Remove the disk_front and stock_front adaptive planners (#190, part 2) - #363
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.
engagement_front is now the only adaptive planner for AdaptivePocket and Roughing's AdaptiveClearing. The orbit planners, their options (orbit_radius_mm, min_orbit_radius_mm, local_orbit_tolerance_mm, boundary_tolerance_mm, AdaptivePocket's clockwise), their proofs and their tests are removed. Their names and fields are refused when a program is read. Tests that ran on them are converted to the engagement front where they test more than the old planner. Regeneration now treats every adaptive operation as reading committed clearance.
…stevecad#190) The earlier serializers wrote orbit_radius_mm and its siblings (null) and boundary_tolerance_mm, and an adaptive pocket's clockwise, for every strategy; engagement_front never used them. A program that chose engagement_front is read without them. One without a path_strategy was planned by the old default, disk_front, and is refused with that reason instead of being read as engagement_front. The regression reads the unchanged roughing-open-block.json from before the removal.
…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.
# Conflicts: # tests/adaptive.rs
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.
# Conflicts: # python/camlib/operations.py # src/adaptive.rs # src/roughing.rs
) stevecad#348's corner-cap test asserts every cut stays inside the L pocket with assert_entire_l_sweep, which this branch had removed with the orbit planner tests. The helper is planner-independent; it is restored as on main.
…ecad#190, part 1) (stevecad#362) Part 1 of stevecad#190: the second acceptance point. The independent `LeadingOracle` engagement check from `tests/roughing.rs` now also runs on the `AdaptivePocket` (engagement_front) tests. Test-only. Part 2 (removing `disk_front` / `stock_front`) is a separate PR stacked on this one. ## What changes - `LeadingOracle` and the methods it needs become `pub(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. - New helper `leading_contact_deg` in `tests/adaptive.rs` runs 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. - The check `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 in `tests/ramp_entry_front.rs`. - Three tests check the oracle itself: a slot and side steps at w = 0.5, 1 and 1.5 mm read acos(1 − w/r); the same cuts read the same split into one move or 200; and a cut after a lead reads the same however the lead is split. No existing assertion was changed or loosened. No source, Python, docs or benchmark change; `bench/results/baseline.json` and `docs/benchmarks.md` are untouched. --------- Co-authored-by: Wookie1 <6943491+Wookie1@users.noreply.github.com> Co-authored-by: RobitOverlord <193709524+10-X-eng@users.noreply.github.com>
github-merge-queue
Bot
removed this pull request from the merge queue due to invalid changes in the merge commit
Nov 21, 2026
10-X-eng
enabled auto-merge
November 21, 2026 15:02
auto-merge was automatically disabled
November 21, 2026 15:02
Pull request was closed
10-X-eng
enabled auto-merge
November 21, 2026 15:02
github-merge-queue
Bot
removed this pull request from the merge queue due to invalid changes in the merge commit
Nov 21, 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 2 of #190: remove the
disk_frontandstock_frontadaptive planners. Stacked on #362 (part 1): that PR's commits show here too, so please merge it first.What changes
engagement_frontis now the only adaptive planner forAdaptivePocketandRoughing'sAdaptiveClearing. The orbit planners, their options (orbit_radius_mm,min_orbit_radius_mm,local_orbit_tolerance_mm,boundary_tolerance_mm,AdaptivePocket'sclockwise), their proofs, support code and tests are removed, along with the Python options and fixtures pinned to them, and the docs are updated.boundary_tolerance_mmandclockwisefor every strategy. A program that choseengagement_frontis read without them. One with nopath_strategywas planned by the old default,disk_front, so it is refused with that reason rather than silently re-planned. The regression reads the unchangedroughing-open-block.jsonfrom before the removal.The search for anything still needing the orbit planner found nothing.
bench/results/baseline.jsonanddocs/benchmarks.mdare untouched.Closes #190.
Closes #191.