refactor(engine): move fill and strategy code to dedicated namespaces

Move fill algorithms to OpenNest.Engine.Fill namespace:
FillLinear, FillExtents, PairFiller, ShrinkFiller, Compactor,
RemnantFiller, RemnantFinder, FillScore, Pattern, PatternTiler,
PartBoundary, RotationAnalysis, AngleCandidateBuilder, and
AccumulatingProgress.

Move strategy layer to OpenNest.Engine.Strategies namespace:
IFillStrategy, FillContext, FillStrategyRegistry, FillHelpers,
and all built-in strategy implementations.

Add using directives to all consuming files across Engine, UI,
MCP, and Tests projects.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-18 16:46:11 -04:00
parent 0cba528591
commit 0e1e619f0a
44 changed files with 141 additions and 119 deletions

View File

@@ -1,8 +1,8 @@
using System.Collections.Generic;
using OpenNest.Engine.BestFit;
using OpenNest.Engine.Fill;
using OpenNest.Math;
using System.Collections.Generic;
namespace OpenNest
namespace OpenNest.Engine.Strategies
{
public class ExtentsFillStrategy : IFillStrategy
{
@@ -20,10 +20,6 @@ namespace OpenNest
var angles = new[] { bestRotation, bestRotation + Angle.HalfPI };
var bestFits = context.SharedState.TryGetValue("BestFits", out var cached)
? (List<BestFitResult>)cached
: null;
List<Part> best = null;
var bestScore = default(FillScore);
@@ -31,7 +27,7 @@ namespace OpenNest
{
context.Token.ThrowIfCancellationRequested();
var result = filler.Fill(context.Item.Drawing, angle,
context.PlateNumber, context.Token, context.Progress, bestFits);
context.PlateNumber, context.Token, context.Progress);
if (result != null && result.Count > 0)
{
var score = FillScore.Compute(result, context.WorkArea);