Revert "refactor(compactor): deduplicate Push — PushDirection delegates to Vector overload"

This reverts commit 9012a9fc1c.
This commit is contained in:
2026-03-18 20:24:33 -04:00
parent 9012a9fc1c
commit e695e29355
5 changed files with 181 additions and 26 deletions

View File

@@ -213,14 +213,12 @@ namespace OpenNest.Forms
if (System.Math.Sqrt(dx * dx + dy * dy) < 0.01)
continue;
var direction = new Vector(dx, dy);
var len = System.Math.Sqrt(dx * dx + dy * dy);
if (len > 0) direction = new Vector(dx / len, dy / len);
var angle = System.Math.Atan2(dy, dx);
var single = new List<Part> { part };
var obstacles = parts.Where(p => p != part).ToList();
totalMoved += Compactor.Push(single, obstacles,
syntheticWorkArea, spacing, direction);
syntheticWorkArea, spacing, angle);
}
if (totalMoved < 0.01)