refactor(engine): precompute hull angles during pair evaluation

Store hull edge angles in BestFitResult at evaluation time so they
don't need to be recomputed during the fill phase. Extract
GetHullEdgeAngles(Polygon) overload from FindHullEdgeAngles.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-13 21:14:25 -04:00
parent 1a9bd795a8
commit de70999975
3 changed files with 10 additions and 0 deletions

View File

@@ -80,6 +80,11 @@ namespace OpenNest
return new List<double> { 0 };
var hull = ConvexHull.Compute(points);
return GetHullEdgeAngles(hull);
}
public static List<double> GetHullEdgeAngles(Polygon hull)
{
var vertices = hull.Vertices;
var n = hull.IsClosed() ? vertices.Count - 1 : vertices.Count;