- fixed issue in the latest feature in NCC Tool: now it works also with reference objects made out of LineStrings (tool 'Path' in Geometry Editor)

This commit is contained in:
Marius Stanciu
2019-08-10 15:12:59 +03:00
parent eea66c0311
commit 4a7ff22c8e
2 changed files with 3 additions and 1 deletions

View File

@@ -762,7 +762,8 @@ class NonCopperClear(FlatCAMTool, Gerber):
# Prepare non-copper polygons
try:
if not isinstance(self.bound_obj.solid_geometry, MultiPolygon):
env_obj = MultiPolygon(self.bound_obj.solid_geometry).convex_hull
env_obj = cascaded_union(self.bound_obj.solid_geometry)
env_obj = env_obj.convex_hull
else:
env_obj = self.bound_obj.solid_geometry.convex_hull
bounding_box = env_obj.buffer(distance=margin, join_style=base.JOIN_STYLE.mitre)