Просмотр исходного кода

- fixed an issue in the remade Cutout Tool where when applied on a single Gerber object, the Freeform Cutout produced no cutout Geometry object

Marius Stanciu 6 лет назад
Родитель
Сommit
7f0a1695ef
2 измененных файлов с 9 добавлено и 1 удалено
  1. 1 0
      README.md
  2. 8 1
      flatcamTools/ToolCutOut.py

+ 1 - 0
README.md

@@ -13,6 +13,7 @@ CAD program, and create G-Code for Isolation routing.
 
 
 - remade the Tool Cutout to work on panels
 - remade the Tool Cutout to work on panels
 - remade the Tool Cutour such that on multiple applications on the same object it will yield the same result
 - remade the Tool Cutour such that on multiple applications on the same object it will yield the same result
+- fixed an issue in the remade Cutout Tool where when applied on a single Gerber object, the Freeform Cutout produced no cutout Geometry object
 
 
 16.05.2019
 16.05.2019
 
 

+ 8 - 1
flatcamTools/ToolCutOut.py

@@ -562,8 +562,15 @@ class CutOut(FlatCAMTool):
 
 
         def geo_init(geo_obj, app_obj):
         def geo_init(geo_obj, app_obj):
             solid_geo = []
             solid_geo = []
+            object_geo = cutout_obj.solid_geometry
+
+            try:
+                _ = iter(object_geo)
+            except TypeError:
+                object_geo = [object_geo]
+
+            for poly in object_geo:
 
 
-            for poly in cutout_obj.solid_geometry:
                 xmin, ymin, xmax, ymax = poly.bounds
                 xmin, ymin, xmax, ymax = poly.bounds
                 geo = box(xmin, ymin, xmax, ymax)
                 geo = box(xmin, ymin, xmax, ymax)