feat(cam): StockState + exact tool-engagement angle #52

Merged
patman merged 1 commit from patman/cam-stock into main 2026-07-09 23:27:44 +00:00 AGit
Owner

PR3a of the adaptive-clearing roadmap: analytic StockState (CCW outer / CW cleared contours, one shared Z plane, enforced) and StockState::engagement — the exact engagement angle in [0, 2pi]: tool circle partitioned at boundary intersections, interval midpoints classified by containment, inside widths summed; skip-error bounded by n*tol and documented. Silent-wrong-answer paths found in review are now loud errors: mixed-Z boundaries -> NotCoplanar, radius <= 100x tolerance -> InvalidCircle, coincident tool/boundary circle -> OnBoundary. Regularity documented honestly (C0, sqrt cusps at tangencies) for the feed-law layer. Cross-checked by 256-sample angular Monte-Carlo proptest. Stacked on patman/cam-query (#51).

PR3a of the adaptive-clearing roadmap: analytic StockState (CCW outer / CW cleared contours, one shared Z plane, enforced) and StockState::engagement — the exact engagement angle in [0, 2pi]: tool circle partitioned at boundary intersections, interval midpoints classified by containment, inside widths summed; skip-error bounded by n*tol and documented. Silent-wrong-answer paths found in review are now loud errors: mixed-Z boundaries -> NotCoplanar, radius <= 100x tolerance -> InvalidCircle, coincident tool/boundary circle -> OnBoundary. Regularity documented honestly (C0, sqrt cusps at tangencies) for the feed-law layer. Cross-checked by 256-sample angular Monte-Carlo proptest. Stacked on patman/cam-query (#51).
Analytic in-process stock (contours, CCW outer / CW cleared) with the
exact engagement angle of a tool circle: partition at boundary
intersections, classify interval midpoints by containment, sum inside
widths. Coplanarity and radius-vs-tolerance are enforced up front so
mixed-Z boundaries and sub-tolerance tools err loudly instead of
returning silently wrong engagement; degenerate coincident-circle
configurations err OnBoundary. Regularity and error bounds documented
for the feed-law layer.

Co-authored-by: patman-assist <patrick-ai@kgroo.co>
patman changed target branch from patman/cam-query to main 2026-07-09 23:27:43 +00:00
patman merged commit f78cb2aa82 into main 2026-07-09 23:27:44 +00:00
Sign in to join this conversation.
No description provided.