- added a new FlatCAM Tool: Gerber Invert Tool. It will invert the copper features in a Gerber file: where is copper there will be empty and where is empty it will be copper

This commit is contained in:
Marius Stanciu
2020-02-14 17:08:06 +02:00
parent 6926b5be65
commit 9fc2ba8ffd
12 changed files with 324 additions and 27 deletions

View File

@@ -1414,9 +1414,12 @@ class Gerber(Geometry):
self.follow_geometry = follow_buffer
# this treats the case when we are storing geometry as solids
if len(poly_buffer) == 0 and len(self.solid_geometry) == 0:
log.error("Object is not Gerber file or empty. Aborting Object creation.")
try:
if len(poly_buffer) == 0 and len(self.solid_geometry) == 0:
log.error("Object is not Gerber file or empty. Aborting Object creation.")
return 'fail'
except TypeError as e:
log.error("Object is not Gerber file or empty. Aborting Object creation. %s" % str(e))
return 'fail'
log.warning("Joining %d polygons." % len(poly_buffer))