- added a new function (and shortcut key Escape) that when triggered it deselects all selected objects and delete the selection box(es)

- fixed bug in Excellon Gcode generation that made the toolchange X,Y always none regardless of the value in Preferences
This commit is contained in:
Marius Stanciu
2019-02-06 21:37:50 +02:00
committed by Marius S
parent 9dfbae7515
commit 2ee80990e5
6 changed files with 32 additions and 23 deletions

View File

@@ -1,6 +1,6 @@
from ObjectCollection import *
from tclCommands.TclCommand import TclCommandSignaled
from copy import deepcopy
class TclCommandGeoCutout(TclCommandSignaled):
"""
@@ -124,21 +124,14 @@ class TclCommandGeoCutout(TclCommandSignaled):
elif isinstance(cutout_obj, FlatCAMGerber):
def geo_init(geo_obj, app_obj):
geo_obj.solid_geometry = obj_exteriors
try:
geo_obj.solid_geometry = cutout_obj.isolation_geometry((dia / 2), iso_type=0)
except Exception as e:
log.debug("TclCommandGeoCutout.execute() --> %s" % str(e))
return 'fail'
outname = cutout_obj.options["name"] + "_cutout"
cutout_obj.isolate(dia=dia, passes=1, overlap=1, combine=False, outname="_temp")
ext_obj = self.app.collection.get_by_name("_temp")
try:
obj_exteriors = ext_obj.get_exteriors()
except:
obj_exteriors = ext_obj.solid_geometry
self.app.new_object('geometry', outname, geo_init)
self.app.collection.set_all_inactive()
self.app.collection.set_active("_temp")
self.app.on_delete()
cutout_obj = self.app.collection.get_by_name(outname)
else: