- updated the Gerber parser such that it will parse correctly Gerber files that have only one solid polygon inside with multiple clear polygons (like those generated by the Invert Tool)

This commit is contained in:
Marius Stanciu
2020-05-25 00:37:54 +03:00
committed by Marius
parent a6bdf04937
commit 2623bb0a65
4 changed files with 9 additions and 3 deletions

View File

@@ -228,6 +228,11 @@ class ToolInvertGerber(AppTool):
for poly in grb_obj.solid_geometry:
new_solid_geometry = new_solid_geometry.difference(poly)
try:
__ = iter(new_solid_geometry)
except TypeError:
new_solid_geometry = [new_solid_geometry]
new_options = {}
for opt in grb_obj.options:
new_options[opt] = deepcopy(grb_obj.options[opt])