feat: integrate NFP optimization into nest engines and fill UI
Add Compactor.Settle and AutoNester.Optimize post-passes to NestEngineBase.Nest, StripNestEngine, and PlateView.FillWithProgress so all fill paths benefit from geometry-aware compaction. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
using OpenNest.CNC;
|
||||
using OpenNest.Collections;
|
||||
using OpenNest.Engine.Fill;
|
||||
using OpenNest.Engine.Nfp;
|
||||
using OpenNest.Forms;
|
||||
using OpenNest.Geometry;
|
||||
using OpenNest.Math;
|
||||
@@ -955,8 +956,13 @@ namespace OpenNest.Controls
|
||||
try
|
||||
{
|
||||
var engine = NestEngineRegistry.Create(Plate);
|
||||
var spacing = Plate.PartSpacing;
|
||||
var parts = await Task.Run(() =>
|
||||
engine.Fill(groupParts, workArea, progress, cts.Token));
|
||||
{
|
||||
var result = engine.Fill(groupParts, workArea, progress, cts.Token);
|
||||
Compactor.Settle(result, workArea, spacing);
|
||||
return AutoNester.Optimize(result, workArea, spacing);
|
||||
});
|
||||
|
||||
if (parts.Count > 0 && (!cts.IsCancellationRequested || progressForm.Accepted))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user