Repo-wide sweep with the pinned CSharpier 1.3.0 tool. Whitespace and line-wrapping only; OpenNest.Engine.Tests (109) and OpenNest.IO.Tests pass after reformat, full solution builds 0 errors. Added .csharpierignore so csproj/config XML keeps its existing layout (CSharpier's XML wrapping churns attributes with zero benefit). Formatting is now enforceable: dotnet csharpier check . passes.
34 lines
692 B
C#
34 lines
692 B
C#
using System.Collections.Generic;
|
|
using OpenNest.Geometry;
|
|
|
|
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;
|
|
}
|
|
}
|
|
}
|