开发:优化数组合并的代码,使用concat避免内存浪费

pull/1440/head
ChenX 4 years ago
parent 3120240a72
commit 47889cdcf7

@ -300,7 +300,7 @@ export class Container
if (!this.PlacedHull)
this.PlacedHull = TranslatePath(part.State.Contour.Points, m);
else
this.PlacedHull = ConvexHull2D([...this.PlacedHull, ...TranslatePath(part.State.Contour.Points, m)]);
this.PlacedHull = ConvexHull2D(this.PlacedHull.concat(TranslatePath(part.State.Contour.Points, m)));
}
}
if (calc || this._PlaceType !== PlaceType.Box)

Loading…
Cancel
Save