fix: plate optimizer tiebreak prefers highest utilization over smallest area

When plate costs are equal (e.g. all zero), the optimizer now picks the
plate size with the tightest density instead of the smallest plate.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-06 09:19:12 -04:00
parent a8e42fb4b5
commit 3bdbf21881

View File

@@ -158,8 +158,8 @@ namespace OpenNest
if (!candidate.NetCost.IsEqualTo(current.NetCost))
return candidate.NetCost < current.NetCost;
// 3. Smaller plate area as tiebreak.
return candidate.ChosenSize.Area < current.ChosenSize.Area;
// 3. Higher utilization (tighter density) as tiebreak.
return candidate.Utilization > current.Utilization;
}
}
}