- fixed the Gerber.merge() to work for the case when one of the merged Gerber objects solid_geometry type is Polygon and not a list

This commit is contained in:
Marius Stanciu 2019-03-20 03:08:07 +02:00
parent bebb827bd2
commit 0eb3ea0283
2 changed files with 8 additions and 3 deletions

View File

@ -411,9 +411,13 @@ class FlatCAMGerber(FlatCAMObj, Gerber):
except:
log.warning("Failed to copy option.", option)
for geos in grb.solid_geometry:
grb_final.solid_geometry.append(geos)
grb_final.follow_geometry.append(geos)
try:
for geos in grb.solid_geometry:
grb_final.solid_geometry.append(geos)
grb_final.follow_geometry.append(geos)
except TypeError:
grb_final.solid_geometry.append(grb.solid_geometry)
grb_final.follow_geometry.append(grb.solid_geometry)
for ap in grb.apertures:
if ap not in grb_final.apertures:

View File

@ -12,6 +12,7 @@ CAD program, and create G-Code for Isolation routing.
19.03.2019
- added autocomplete for Code editor; TODO: needs to be enabled only when doing Scripts, right now is available for everyone.
- fixed the Gerber.merge() to work for the case when one of the merged Gerber objects solid_geometry type is Polygon and not a list
18.03.2019