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:
@@ -320,6 +320,18 @@ namespace OpenNest
|
|||||||
ReportProgress(progress, NestPhase.Pairs, PlateNumber, best, workArea);
|
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.
|
// Try improving by filling the remainder strip separately.
|
||||||
var improved = TryRemainderImprovement(nestItem, workArea, best);
|
var improved = TryRemainderImprovement(nestItem, workArea, best);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user