feat: add IFillComparer interface and DefaultFillComparer
Extracts the fill result scoring contract into IFillComparer with a DefaultFillComparer implementation that preserves the existing count-then-density lexicographic ranking via FillScore. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
14
OpenNest.Engine/IFillComparer.cs
Normal file
14
OpenNest.Engine/IFillComparer.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using OpenNest.Geometry;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace OpenNest.Engine
|
||||
{
|
||||
/// <summary>
|
||||
/// Determines whether a candidate fill result is better than the current best.
|
||||
/// Implementations must be stateless and thread-safe.
|
||||
/// </summary>
|
||||
public interface IFillComparer
|
||||
{
|
||||
bool IsBetter(List<Part> candidate, List<Part> current, Box workArea);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user