refactor: use IDistanceComputer and rename Type to StrategyIndex

Wire IDistanceComputer into RotationSlideStrategy, replacing inline
CPU/GPU branching. BestFitFinder constructs the appropriate implementation.
Replace PushDirection enum with direction vectors in BuildOffsets.
Rename IBestFitStrategy.Type and PairCandidate.StrategyType to StrategyIndex
for clarity (JSON field name unchanged for backward compatibility).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-21 00:04:19 -04:00
parent 4f21fb91a1
commit cdf8e4e40e
7 changed files with 57 additions and 178 deletions

View File

@@ -8,7 +8,7 @@ namespace OpenNest.Engine.BestFit
public double Part1Rotation { get; set; }
public double Part2Rotation { get; set; }
public Vector Part2Offset { get; set; }
public int StrategyType { get; set; }
public int StrategyIndex { get; set; }
public int TestNumber { get; set; }
public double Spacing { get; set; }
}