mirror of
https://github.com/storytold/cadcraft.git
synced 2026-10-24 10:56:51 -06:00
* loops: implied closed loops from loose LINE and ARC chains LOOPS is a read-only inquiry command that chains LINE and ARC endpoints meeting within a tolerance. Closed loops report their member handles, perimeter, area and winding (exact with arcs, like SHAPES); open chains report the endpoint gap, where it is and their length; branch junctions (three or more ends at one point) are reported but excluded from the chains rather than resolved. The tolerance defaults to 1e-9 x the extents diagonal and is an option. The quadratic endpoint pairing is capped (maxPairs, 1,000,000 by default) and reports capped/pairTestsNeeded instead of guessing from a partial pairing. Degenerate lines and arcs are counted under skipped; full-circle arcs close on their own. The command is read-only. Fixes #1437 * loops: cap maxPairs at 100,000,000 so a caller can't ask for unbounded work Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Brandon Thomas <echelon@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>