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:
aj
2026-09-25 07:45:12 -04:00
co-authored by Claude Opus 5.5
parent f973c1c15c
commit ffa3590b46
5 changed files with 36 additions and 8 deletions
+1 -1
View File
@@ -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();