- Panelize Tool - fixed to work for panelizing Excellon objects with the new data structure storing drills and tools in the obj.tools dictionary

This commit is contained in:
Marius Stanciu
2020-06-18 20:24:02 +03:00
committed by Marius
parent 8dc4eecbf4
commit 755aa48490
3 changed files with 68 additions and 52 deletions

View File

@@ -957,6 +957,15 @@ class Excellon(Geometry):
# is finished since the tools definitions are spread in the Excellon body. We use as units the value
# from self.defaults['excellon_units']
# the data structure of the Excellon object has to include bot the 'drills' and the 'slots' keys otherwise
# I will need to test for them everywhere.
# Even if there are not drills or slots I just add the storage there with an empty list
for tool in self.tools:
if 'drills' not in self.tools[tool]:
self.tools[tool]['drills'] = []
if 'slots' not in self.tools[tool]:
self.tools[tool]['slots'] = []
log.info("Zeros: %s, Units %s." % (self.zeros, self.units))
except Exception:
log.error("Excellon PARSING FAILED. Line %d: %s" % (line_num, eline))