mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-11-26 20:37:42 -05:00
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:
1 parent
4f21fb91a1
commit
cdf8e4e40e
7 files changed
+57
-178
No files matched your search
@@ -22,14 +22,14 @@ namespace OpenNest.Engine.BestFit
|
||||
Polygon stationaryPerimeter, Polygon stationaryHull, Vector correction)
|
||||
{
|
||||
_part2Rotation = part2Rotation;
|
||||
Type = type;
|
||||
StrategyIndex = type;
|
||||
Description = description;
|
||||
_stationaryPerimeter = stationaryPerimeter;
|
||||
_stationaryHull = stationaryHull;
|
||||
_correction = correction;
|
||||
}
|
||||
|
||||
public int Type { get; }
|
||||
public int StrategyIndex { get; }
|
||||
public string Description { get; }
|
||||
|
||||
/// <summary>
|
||||
@@ -155,7 +155,7 @@ namespace OpenNest.Engine.BestFit
|
||||
Part1Rotation = 0,
|
||||
Part2Rotation = _part2Rotation,
|
||||
Part2Offset = offset,
|
||||
StrategyType = Type,
|
||||
StrategyIndex = StrategyIndex,
|
||||
TestNumber = testNumber,
|
||||
Spacing = spacing
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user