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>
34 lines
692 B
C#
34 lines
692 B
C#
using OpenNest.Geometry;
|
|
using System.Collections.Generic;
|
|
|
|
namespace OpenNest.Engine.Fill
|
|
{
|
|
public class Pattern
|
|
{
|
|
public Pattern()
|
|
{
|
|
Parts = new List<Part>();
|
|
}
|
|
|
|
public List<Part> Parts { get; }
|
|
|
|
public Box BoundingBox { get; private set; }
|
|
|
|
public void UpdateBounds()
|
|
{
|
|
BoundingBox = Parts.GetBoundingBox();
|
|
}
|
|
|
|
public Pattern Clone(Vector offset)
|
|
{
|
|
var pattern = new Pattern();
|
|
|
|
foreach (var part in Parts)
|
|
pattern.Parts.Add(part.CloneAtOffset(offset));
|
|
|
|
pattern.UpdateBounds();
|
|
return pattern;
|
|
}
|
|
}
|
|
}
|