feat(engine): integrate NFP phase into FindBestFill (async overload)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-13 10:23:05 -04:00
parent c4d09f2466
commit 56c9b17ff6

View File

@@ -245,6 +245,18 @@ namespace OpenNest
best = pairResult;
ReportProgress(progress, NestPhase.Pairs, PlateNumber, best, workArea);
}
token.ThrowIfCancellationRequested();
// NFP phase (non-rectangular parts only)
var nfpResult = FillNfpBestFit(item, workArea);
Debug.WriteLine($"[FindBestFill] NFP: {nfpResult?.Count ?? 0} parts");
if (IsBetterFill(nfpResult, best, workArea))
{
best = nfpResult;
ReportProgress(progress, NestPhase.Nfp, PlateNumber, best, workArea);
}
}
catch (OperationCanceledException)
{