feat(engine): integrate NFP phase into Fill(groupParts) single-drawing path

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

View File

@@ -320,6 +320,18 @@ namespace OpenNest
ReportProgress(progress, NestPhase.Pairs, PlateNumber, best, workArea);
}
token.ThrowIfCancellationRequested();
// NFP phase (non-rectangular parts only)
var nfpResult = FillNfpBestFit(nestItem, workArea);
Debug.WriteLine($"[Fill(groupParts,Box)] NFP: {nfpResult?.Count ?? 0} parts");
if (IsBetterFill(nfpResult, best, workArea))
{
best = nfpResult;
ReportProgress(progress, NestPhase.Nfp, PlateNumber, best, workArea);
}
// Try improving by filling the remainder strip separately.
var improved = TryRemainderImprovement(nestItem, workArea, best);