refactor: extract PartGeometry from Helper

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-15 17:44:17 -04:00
parent 84d3f90549
commit 2881815c7a
4 changed files with 132 additions and 122 deletions

View File

@@ -129,12 +129,12 @@ namespace OpenNest
continue;
movingLines ??= halfSpacing > 0
? Helper.GetOffsetPartLines(moving, halfSpacing, direction, ChordTolerance)
: Helper.GetPartLines(moving, direction, ChordTolerance);
? PartGeometry.GetOffsetPartLines(moving, halfSpacing, direction, ChordTolerance)
: PartGeometry.GetPartLines(moving, direction, ChordTolerance);
obstacleLines[i] ??= halfSpacing > 0
? Helper.GetOffsetPartLines(obstacleParts[i], halfSpacing, opposite, ChordTolerance)
: Helper.GetPartLines(obstacleParts[i], opposite, ChordTolerance);
? PartGeometry.GetOffsetPartLines(obstacleParts[i], halfSpacing, opposite, ChordTolerance)
: PartGeometry.GetPartLines(obstacleParts[i], opposite, ChordTolerance);
var d = Helper.DirectionalDistance(movingLines, obstacleLines[i], direction);
if (d < distance)