diff --git a/OpenNest.Engine/Strategies/FillContext.cs b/OpenNest.Engine/Strategies/FillContext.cs new file mode 100644 index 0000000..7899668 --- /dev/null +++ b/OpenNest.Engine/Strategies/FillContext.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Threading; +using OpenNest.Geometry; + +namespace OpenNest +{ + public class FillContext + { + public NestItem Item { get; init; } + public Box WorkArea { get; init; } + public Plate Plate { get; init; } + public int PlateNumber { get; init; } + public CancellationToken Token { get; init; } + public IProgress Progress { get; init; } + + public List CurrentBest { get; set; } + public FillScore CurrentBestScore { get; set; } + public NestPhase WinnerPhase { get; set; } + public List PhaseResults { get; } = new(); + public List AngleResults { get; } = new(); + + public Dictionary SharedState { get; } = new(); + } +} diff --git a/OpenNest.Engine/Strategies/IFillStrategy.cs b/OpenNest.Engine/Strategies/IFillStrategy.cs new file mode 100644 index 0000000..86170f0 --- /dev/null +++ b/OpenNest.Engine/Strategies/IFillStrategy.cs @@ -0,0 +1,12 @@ +using System.Collections.Generic; + +namespace OpenNest +{ + public interface IFillStrategy + { + string Name { get; } + NestPhase Phase { get; } + int Order { get; } + List Fill(FillContext context); + } +}