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
+8 -7
View File
@@ -1,13 +1,14 @@
using OpenNest.Engine.BestFit;
using OpenNest.Engine.Strategies;
using OpenNest.Geometry;
using OpenNest.Math;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading;
using OpenNest.Engine.BestFit;
using OpenNest.Geometry;
using OpenNest.Math;
namespace OpenNest
namespace OpenNest.Engine.Fill
{
/// <summary>
/// Fills a work area using interlocking part pairs from BestFitCache.
@@ -52,11 +53,11 @@ namespace OpenNest
var engine = new FillLinear(workArea, partSpacing);
// Let the remainder strip try pair-based filling too.
var p0 = DefaultNestEngine.BuildRotatedPattern(pairParts, 0);
var p90 = DefaultNestEngine.BuildRotatedPattern(pairParts, Angle.HalfPI);
var p0 = FillHelpers.BuildRotatedPattern(pairParts, 0);
var p90 = FillHelpers.BuildRotatedPattern(pairParts, Angle.HalfPI);
engine.RemainderPatterns = new List<Pattern> { p0, p90 };
var filled = DefaultNestEngine.FillPattern(engine, pairParts, angles, workArea);
var filled = FillHelpers.FillPattern(engine, pairParts, angles, workArea);
if (filled != null && filled.Count > 0)
{