- fixed bug in CutOut Tool

This commit is contained in:
Marius Stanciu
2019-07-05 12:13:53 +03:00
parent 76ce5843e3
commit 1edb049d86
2 changed files with 106 additions and 98 deletions

View File

@@ -9,6 +9,10 @@ CAD program, and create G-Code for Isolation routing.
================================================= =================================================
5.07.2019
- fixed bug in CutOut Tool
1.07.2019 1.07.2019
- Spanish translation at 36% - Spanish translation at 36%

View File

@@ -419,9 +419,13 @@ class CutOut(FlatCAMTool):
except TypeError: except TypeError:
object_geo = [object_geo] object_geo = [object_geo]
for geo in object_geo: # for geo in object_geo:
if isinstance(cutout_obj, FlatCAMGerber): if isinstance(cutout_obj, FlatCAMGerber):
geo = (geo.buffer(margin + abs(dia / 2))).exterior geo = (object_geo.buffer(margin + abs(dia / 2))).exterior
else:
geo = object_geo
geo = unary_union(geo)
# Get min and max data for each object as we just cut rectangles across X or Y # Get min and max data for each object as we just cut rectangles across X or Y
xmin, ymin, xmax, ymax = recursive_bounds(geo) xmin, ymin, xmax, ymax = recursive_bounds(geo)
@@ -575,9 +579,9 @@ class CutOut(FlatCAMTool):
except TypeError: except TypeError:
object_geo = [object_geo] object_geo = [object_geo]
for poly in object_geo: object_geo = unary_union(object_geo)
xmin, ymin, xmax, ymax = poly.bounds xmin, ymin, xmax, ymax = object_geo.bounds
geo = box(xmin, ymin, xmax, ymax) geo = box(xmin, ymin, xmax, ymax)
# if Gerber create a buffer at a distance # if Gerber create a buffer at a distance