feat(cam): offset result guards (miter cap, orientation check) #54

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

Closes the two silent-corruption envelopes found in adversarial review of #53: (1) miter cap — trim intersections farther than 10x|d| from the original vertex err MiterExceeded instead of returning a validating 98 m excursion from a 1 m part; (2) orientation guard — exact signed area (shoelace + per-arc r^2(sweep − sin sweep) correction, derived exact not approximate) of input vs output must agree in sign, else OffsetConsumed — an over-offset can no longer return a silently reversed loop that would flip downstream winding containment. Regression tests for both. offset_closed is safe to consume once this lands. Stacked on patman/cam-offset (#53).

Closes the two silent-corruption envelopes found in adversarial review of #53: (1) miter cap — trim intersections farther than 10x|d| from the original vertex err MiterExceeded instead of returning a validating 98 m excursion from a 1 m part; (2) orientation guard — exact signed area (shoelace + per-arc r^2(sweep − sin sweep) correction, derived exact not approximate) of input vs output must agree in sign, else OffsetConsumed — an over-offset can no longer return a silently reversed loop that would flip downstream winding containment. Regression tests for both. offset_closed is safe to consume once this lands. Stacked on patman/cam-offset (#53).
Co-authored-by: patman-assist <patrick-ai@kgroo.co>
patman changed target branch from patman/cam-offset to main 2026-07-09 23:27:46 +00:00
patman merged commit bb21851670 into main 2026-07-09 23:27:50 +00:00
Sign in to join this conversation.
No description provided.