refactor(core): share duplicated geometry helpers

Route the four identical even-odd ray casts through RingContainment.Contains and share the arc-intersection, span-pairing, overlap-region, lead-in, plate-offset, leader-edge, entity-copy and path-perimeter duplicates. Expressions and loop order are unchanged, so results are bit-identical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ajandClaude Opus 5.5 committed 2026-11-28 18:36:40 -05:00
1 parent 8a1d89cea5
commit 409d30d29e
15 files changed
+108 -154

No files matched your search

@@ -161,17 +161,7 @@ internal sealed class BlockCatalog : IDisposable
return width;
}
private static double Perimeter(PathD outline)
{
var perimeter = 0.0;
for (var i = 0; i < outline.Count; i++)
{
var a = outline[i];
var b = outline[(i + 1) % outline.Count];
perimeter += System.Math.Sqrt((b.x - a.x) * (b.x - a.x) + (b.y - a.y) * (b.y - a.y));
}
return perimeter;
}
private static double Perimeter(PathD outline) => SheetOutline.Perimeter(outline);
}
/// <summary>