Skip to content

Remove the disk_front and stock_front adaptive planners (#190, part 2) - #363

Merged
10-X-eng merged 19 commits into
stevecad:mainfrom
Wookie1:remove-disk-front
Nov 21, 2026
Merged

10-X-eng merged 19 commits into
stevecad:mainfrom
Wookie1:remove-disk-front

Conversation

@Wookie1

@Wookie1 Wookie1 commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

Part 2 of #190: remove the disk_front and stock_front adaptive planners. Stacked on #362 (part 1): that PR's commits show here too, so please merge it first.

What 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, support code and tests are removed, along with the Python options and fixtures pinned to them, and the docs are updated.
  • Programs that name a removed planner, or set its fields, are refused by name when read.
  • Saved programs still load. The earlier serializers wrote the orbit fields (as null), boundary_tolerance_mm and clockwise for every strategy. A program that chose engagement_front is read without them. One with no path_strategy was planned by the old default, disk_front, so it is refused with that reason rather than silently re-planned. The regression reads the unchanged roughing-open-block.json from before the removal.
  • Duplicate fields in a saved roughing clearing are rejected.
  • Tests that ran on the orbit planners were converted to the engagement front where they test more than the old planner. Regeneration now treats every adaptive operation as reading committed clearance.

The search for anything still needing the orbit planner found nothing. bench/results/baseline.json and docs/benchmarks.md are untouched.

Closes #190.
Closes #191.

Wookie1 and others added 13 commits November 18, 2026 05:45
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.
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.
Wookie1 and others added 4 commits November 20, 2026 15:24
# 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>
@10-X-eng
10-X-eng added this pull request to the merge queue Nov 21, 2026
@10-X-eng
10-X-eng removed this pull request from the merge queue due to a manual request Nov 21, 2026
@10-X-eng
10-X-eng added this pull request to the merge queue Nov 21, 2026
@github-merge-queue
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
10-X-eng enabled auto-merge November 21, 2026 15:02
@10-X-eng 10-X-eng closed this Nov 21, 2026
auto-merge was automatically disabled November 21, 2026 15:02

Pull request was closed

@10-X-eng 10-X-eng reopened this Nov 21, 2026
@10-X-eng
10-X-eng enabled auto-merge November 21, 2026 15:02
@10-X-eng
10-X-eng added this pull request to the merge queue Nov 21, 2026
@github-merge-queue
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
10-X-eng added this pull request to the merge queue Nov 21, 2026
Merged via the queue into stevecad:main with commit 96d4dad Nov 21, 2026
10 of 18 checks 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.

Retire the stock_front development strategy AdaptivePocket: plan from the stock (engagement_front), then remove disk_front

2 participants