feat(cam-geom): add Contour::reversed for ring-to-island conversion #60

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

Small primitive for the clearing strategy: ContourSegment::reversed + Contour::reversed (reverse segment order; lines swap endpoints; arcs start+=sweep, sweep negates). reversed.point_at(u) == original.point_at(1-u) exactly — reviewer derived the correspondence and confirmed every Contour::new invariant survives by symmetry, so re-validation is safely skipped. Needed to turn a CCW cleared-envelope ring into a CW stock island. Stacked on patman/cam-seed (#57).

Small primitive for the clearing strategy: ContourSegment::reversed + Contour::reversed (reverse segment order; lines swap endpoints; arcs start+=sweep, sweep negates). reversed.point_at(u) == original.point_at(1-u) exactly — reviewer derived the correspondence and confirmed every Contour::new invariant survives by symmetry, so re-validation is safely skipped. Needed to turn a CCW cleared-envelope ring into a CW stock island. Stacked on patman/cam-seed (#57).
Adaptive clearing (cam-clear) needs to turn a CCW tool-center ring into
a CW island contour for StockState; reversing winding by construction
(no re-validation) is a general contour primitive, so it lives here
rather than being duplicated in cam-clear.

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