Revert "refactor(compactor): deduplicate Push — PushDirection delegates to Vector overload"
This reverts commit 9012a9fc1c.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user