- fixed an error due of missing attribute of PlotCanvasLegacy when using Legacy2D graphic engine

- solving deprecation warnings issued by Shapely
- made sure that the Gerber Object geometry is always flattened
This commit is contained in:
Marius Stanciu
2021-09-21 15:55:35 +03:00
committed by Marius
parent 5f417f7156
commit dd029d6ded
17 changed files with 143 additions and 202 deletions

View File

@@ -13,7 +13,7 @@
from shapely.geometry import MultiLineString, LineString, LinearRing, box
import shapely.affinity as affinity
from camlib import Geometry, grace
from camlib import Geometry, flatten_shapely_geometry
from appObjects.FlatCAMObj import *
@@ -1529,11 +1529,7 @@ class GeometryObject(FlatCAMObj, Geometry):
if geo_final.solid_geometry is None:
geo_final.solid_geometry = []
try:
__ = iter(geo_final.solid_geometry)
except TypeError:
geo_final.solid_geometry = [geo_final.solid_geometry]
geo_final.solid_geometry = flatten_shapely_geometry(geo_final.solid_geometry)
new_solid_geometry = []
new_options = {}
new_tools = {}