fix(gpt6astra): rank lower Priority first and drop etch marks from geometry
Priority was sorted descending, the reverse of the host (StockLadder and NestJobCandidateComparer treat a lower number as more important), so a priority-9 part beat a priority-0 part for scarce stock. The existing test encoded the inverted rule and now asserts the host's direction. Part geometry filtered only rapids, so scribe/etch moves counted as material - the bug OpenNest fixed in 1b5e1b1. Use SpecialLayers.IsMaterial. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -25,7 +25,7 @@ internal sealed class ContactPlacer(PreparedPart[] parts, ContactGeometry geomet
|
||||
var placed = new List<PackedShape>();
|
||||
var spaces = new Dictionary<int, SearchSpace>();
|
||||
var order = Enumerable.Range(0, parts.Length)
|
||||
.OrderByDescending(i => parts[i].Requirement.Priority)
|
||||
.OrderBy(i => parts[i].Requirement.Priority)
|
||||
.ThenBy(i => flexibility[i])
|
||||
.ThenByDescending(i => parts[i].Variants.Select(v => v.Width * v.Height).DefaultIfEmpty(0).Min())
|
||||
.ThenBy(i => i).ToArray();
|
||||
|
||||
Reference in New Issue
Block a user