refactor(engine): extract progress reporting seam

This commit is contained in:
aj
2026-09-21 14:43:46 -04:00
parent 451841401a
commit 9b9e510510
6 changed files with 118 additions and 26 deletions
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using OpenNest.Engine.Jobs.Placement.Fillers;
using OpenNest.Geometry;
namespace OpenNest.Engine.Fill
@@ -136,7 +137,7 @@ namespace OpenNest.Engine.Fill
var allParts = new List<Part>(placedSoFar.Count + best.Count);
allParts.AddRange(placedSoFar);
allParts.AddRange(best);
NestEngineBase.ReportProgress(
NestProgressReporter.Report(
progress,
new ProgressReport
{
+2 -1
View File
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading;
using OpenNest.Geometry;
using OpenNest.Engine.Jobs.Placement.Fillers;
using OpenNest.Engine.RectanglePacking;
namespace OpenNest.Engine.Fill
@@ -89,7 +90,7 @@ namespace OpenNest.Engine.Fill
var desc = $"Shrink {axis}: {bestParts.Count} parts, dim={dim:F1}";
NestEngineBase.ReportProgress(
NestProgressReporter.Report(
progress,
new ProgressReport
{