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.
46 lines
1.2 KiB
C#
46 lines
1.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Threading;
|
|
using OpenNest.Engine.Fill;
|
|
using OpenNest.Geometry;
|
|
|
|
namespace OpenNest.Engine.Nfp
|
|
{
|
|
/// <summary>
|
|
/// Result of a nest optimization run.
|
|
/// </summary>
|
|
public class OptimizationResult
|
|
{
|
|
/// <summary>
|
|
/// The best placement sequence found.
|
|
/// </summary>
|
|
public List<SequenceEntry> Sequence { get; set; }
|
|
|
|
/// <summary>
|
|
/// The score achieved by the best sequence.
|
|
/// </summary>
|
|
public FillScore Score { get; set; }
|
|
|
|
/// <summary>
|
|
/// Number of iterations performed.
|
|
/// </summary>
|
|
public int Iterations { get; set; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Interface for nest optimization algorithms that search for the best
|
|
/// part ordering and rotation to maximize plate utilization.
|
|
/// </summary>
|
|
public interface INestOptimizer
|
|
{
|
|
OptimizationResult Optimize(
|
|
List<NestItem> items,
|
|
Box workArea,
|
|
NfpCache cache,
|
|
Dictionary<int, List<double>> candidateRotations,
|
|
IProgress<NestProgress> progress = null,
|
|
CancellationToken cancellation = default
|
|
);
|
|
}
|
|
}
|