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:
@@ -129,7 +129,7 @@ namespace OpenNest.IO
|
||||
Part1Rotation = r.Part1Rotation,
|
||||
Part2Rotation = r.Part2Rotation,
|
||||
Part2Offset = new Vector(r.Part2OffsetX, r.Part2OffsetY),
|
||||
StrategyType = r.StrategyType,
|
||||
StrategyIndex = r.StrategyType,
|
||||
TestNumber = r.TestNumber,
|
||||
Spacing = r.CandidateSpacing
|
||||
},
|
||||
|
||||
@@ -214,7 +214,7 @@ namespace OpenNest.IO
|
||||
Part2Rotation = r.Candidate.Part2Rotation,
|
||||
Part2OffsetX = r.Candidate.Part2Offset.X,
|
||||
Part2OffsetY = r.Candidate.Part2Offset.Y,
|
||||
StrategyType = r.Candidate.StrategyType,
|
||||
StrategyType = r.Candidate.StrategyIndex,
|
||||
TestNumber = r.Candidate.TestNumber,
|
||||
CandidateSpacing = r.Candidate.Spacing,
|
||||
RotatedArea = r.RotatedArea,
|
||||
|
||||
Reference in New Issue
Block a user