- refactored the Isolation Plugin class

This commit is contained in:
Marius Stanciu
2022-01-30 03:50:27 +02:00
committed by Marius
parent 05c4993f92
commit 66b874835c
3 changed files with 127 additions and 85 deletions

View File

@@ -82,16 +82,18 @@ class TclCommandIsolate(TclCommandSignaled):
par = args['combine'].capitalize()
except AttributeError:
par = args['combine']
args['combine'] = bool(eval(par))
args['combine'] = bool(eval(str(par)))
else:
args['combine'] = bool(eval(str(self.app.defaults["tools_iso_combine_passes"])))
obj = self.app.collection.get_by_name(name)
if obj is None:
self.raise_tcl_error("Object not found: %s" % name)
return "fail"
if obj.kind != 'gerber':
self.raise_tcl_error('Expected GerberObject, got %s %s.' % (name, type(obj)))
return "fail"
args.pop('name', None)
obj.isolate(plot=False, **args)