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
@@ -22,7 +22,7 @@ public sealed class Gpt6AstraNestingEngine : INestingEngine
var best = initial;
Plan? complete = IsComplete(initial) ? initial : null;
var trials = new Dictionary<string, SheetTrial>(StringComparer.Ordinal);
var priorities = job.Parts.Select(p => p.Priority).Distinct().OrderDescending().ToArray();
var priorities = job.Parts.Select(p => p.Priority).Distinct().Order().ToArray();
var evaluated = 0;
var unitCosts = Enumerable.Repeat(double.PositiveInfinity, parts.Length).ToArray();
while (frontier.Count > 0)