From 0b49a061be0c164bf6a9e5c4dca36311df960104 Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Thu, 31 May 2018 01:14:04 +0300 Subject: [PATCH] - hopefully this will solve the conflict --- FlatCAMObj.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/FlatCAMObj.py b/FlatCAMObj.py index e4184aeb..d4d2dec0 100644 --- a/FlatCAMObj.py +++ b/FlatCAMObj.py @@ -511,15 +511,14 @@ class FlatCAMGerber(FlatCAMObj, Gerber): # to cut on the right side of the left over copper i.e on the left side of the features. geom = self.isolation_geometry(offset) if invert: - try: - if type(geom) is MultiPolygon: - pl = [] - for p in geom: - pl.append(Polygon(p.exterior.coords[::-1], p.interiors)) - geom = MultiPolygon(pl) - elif type(geom) is Polygon: - geom = Polygon(geom.exterior.coords[::-1], geom.interiors) - except Exception as e: + if type(geom) is MultiPolygon: + pl = [] + for p in geom: + pl.append(Polygon(p.exterior.coords[::-1], p.interiors)) + geom = MultiPolygon(pl) + elif type(geom) is Polygon: + geom = Polygon(geom.exterior.coords[::-1], geom.interiors) + else: str("Unexpected Geometry") return geom