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.
24 lines
702 B
C#
24 lines
702 B
C#
using System.Collections.Generic;
|
|
using OpenNest.Geometry;
|
|
|
|
namespace OpenNest.Engine.Fill
|
|
{
|
|
/// <summary>
|
|
/// Ranks fill results by count first, then density.
|
|
/// This is the original scoring logic used by DefaultNestEngine.
|
|
/// </summary>
|
|
public class DefaultFillComparer : IFillComparer
|
|
{
|
|
public bool IsBetter(List<Part> candidate, List<Part> current, Box workArea)
|
|
{
|
|
if (candidate == null || candidate.Count == 0)
|
|
return false;
|
|
|
|
if (current == null || current.Count == 0)
|
|
return true;
|
|
|
|
return FillScore.Compute(candidate, workArea) > FillScore.Compute(current, workArea);
|
|
}
|
|
}
|
|
}
|