mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-11-04 02:21:35 -05:00
Roslyn Bridge flagged these as copy-paste clusters; each pair now shares one implementation so a fix lands everywhere at once: - Shape.OffsetInward/OffsetOutward differed only in the target winding. - BestFitFinder kept its own copy of SpatialQuery's arc-extreme points. - SplitDrawingForm rebuilt DrawingSplitter's clip-region grid for preview. - GeometryOptimizer's collinear/coradial finders (one misspelled GetCoradialArs) become one generic FindRelated. - Five settings files repeated the write-with-retry loop, and two also repeated the unit parser and unreadable-file filter (SettingsFile). - ClampsForm and SupportGridForm repeated their row/box builders. - Vertical/HorizontalRemnantComparer share a RemnantComparer base. Behavior is unchanged except that Engine/NestStorage settings loads now also tolerate NotSupported/Security exceptions, matching the other settings files' never-throw contract. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
16 lines
451 B
C#
16 lines
451 B
C#
using OpenNest.Geometry;
|
|
|
|
namespace OpenNest.Engine.Fill
|
|
{
|
|
/// <summary>
|
|
/// Ranks fill results to minimize Y-extent (preserve top-side horizontal remnant).
|
|
/// Tiebreak chain: count > smallest Y-extent > highest density.
|
|
/// </summary>
|
|
public class HorizontalRemnantComparer : RemnantComparer
|
|
{
|
|
protected override double Low(Box box) => box.Bottom;
|
|
|
|
protected override double High(Box box) => box.Top;
|
|
}
|
|
}
|