refactor: extract CollectPoints from FindBestRotation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-22 22:30:59 -04:00
parent 48b4849a88
commit 22554b0fa3
2 changed files with 37 additions and 4 deletions

View File

@@ -321,6 +321,21 @@ public class CutOffGeometryTests
Assert.Equal(6, cutoff.Drawing.Program.Codes.Count);
}
[Fact]
public void CollectPoints_LinesAndArcs_ReturnsAllPoints()
{
var entities = new List<Entity>
{
new Line(new Vector(0, 0), new Vector(10, 0)),
new Arc(new Vector(5, 5), 5, 0, System.Math.PI)
};
var points = entities.CollectPoints();
// Line: 2 points. Arc: 2 endpoints + 4 cardinals = 6. Total = 8.
Assert.Equal(8, points.Count);
}
[Fact]
public void ShapeProfile_SelectsLargestShapeAsPerimeter()
{