feat(cam): exact distance-to-boundary and inscribed-circle seed finding #57
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "patman/cam-seed"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
PR5 of the adaptive-clearing roadmap: distance_to_segment (exact planar point-to-line/arc distance, proven correct across the angular-range transition and at the arc center), distance_to_boundary over a StockState (same coplanarity contract as the other queries), and largest_inscribed_circle — the spiral-seed primitive (coarse grid + 6-round shrinking-window refinement, running-best monotone, accuracy ~final cell size of a local optimum, documented limits on sub-pitch features). Reviewer-verified highlight: the square-with-island seed optimum is the diagonal three-constraint balance (L+r0)/(1+1/sqrt(2)) − r0 ≈ 2.1005, independently re-derived. Also exposes arc_angle_hit/plane() as pub(crate) and adds QueryError::{EmptyBoundary, InvalidGrid, NoSeedFound} (empty stock is an error here by design — engagement returns Ok(0) for the same input; rationale documented). Stacked on patman/cam-offset-guards (#54).