- cascaded_union() method will be deprecated in Shapely 1.8 in favor of unary_union; replaced the usage of cascaded_union with unary_union in all the app

This commit is contained in:
Marius Stanciu
2020-10-21 13:55:41 +03:00
committed by Marius
parent 265028de76
commit 66a3e36701
26 changed files with 116 additions and 115 deletions

View File

@@ -12,7 +12,7 @@
from shapely.geometry import Point, Polygon, MultiPolygon, MultiLineString, LineString, LinearRing
from shapely.ops import cascaded_union
from shapely.ops import unary_union
from appParsers.ParseGerber import Gerber
from appObjects.FlatCAMObj import *
@@ -386,7 +386,7 @@ class GerberObject(FlatCAMObj, Gerber):
try:
self.solid_geometry = MultiPolygon(self.solid_geometry)
except Exception:
self.solid_geometry = cascaded_union(self.solid_geometry)
self.solid_geometry = unary_union(self.solid_geometry)
bounding_box = self.solid_geometry.envelope.buffer(float(self.options["noncoppermargin"]))
if not self.options["noncopperrounded"]:
@@ -412,7 +412,7 @@ class GerberObject(FlatCAMObj, Gerber):
try:
self.solid_geometry = MultiPolygon(self.solid_geometry)
except Exception:
self.solid_geometry = cascaded_union(self.solid_geometry)
self.solid_geometry = unary_union(self.solid_geometry)
# Bounding box with rounded corners
bounding_box = self.solid_geometry.envelope.buffer(float(self.options["bboxmargin"]))