- 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:
@@ -3229,6 +3229,10 @@ class App(QtCore.QObject):
|
|||||||
self.general_defaults_form.general_gui_group.sel_draw_color_entry.set_value(new_val_sel)
|
self.general_defaults_form.general_gui_group.sel_draw_color_entry.set_value(new_val_sel)
|
||||||
self.defaults['global_sel_draw_color'] = new_val_sel
|
self.defaults['global_sel_draw_color'] = new_val_sel
|
||||||
|
|
||||||
|
def on_deselect_all(self):
|
||||||
|
self.collection.set_all_inactive()
|
||||||
|
self.delete_selection_shape()
|
||||||
|
|
||||||
def on_workspace_modified(self):
|
def on_workspace_modified(self):
|
||||||
self.save_defaults(silent=True)
|
self.save_defaults(silent=True)
|
||||||
self.plotcanvas.draw_workspace()
|
self.plotcanvas.draw_workspace()
|
||||||
|
|||||||
@@ -988,6 +988,10 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
|
|||||||
<td height="20"><strong>SPACE</strong></td>
|
<td height="20"><strong>SPACE</strong></td>
|
||||||
<td> En(Dis)able Obj Plot</td>
|
<td> En(Dis)able Obj Plot</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr height="20">
|
||||||
|
<td height="20"><strong>Escape</strong></td>
|
||||||
|
<td> Deselects all objects</td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
@@ -1539,7 +1543,7 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
|
|||||||
self.app.on_file_saveproject()
|
self.app.on_file_saveproject()
|
||||||
|
|
||||||
# Toggle Plot Area
|
# Toggle Plot Area
|
||||||
if key == QtCore.Qt.Key_F10:
|
if key == QtCore.Qt.Key_F10 or key == 'F10':
|
||||||
self.app.on_toggle_plotarea()
|
self.app.on_toggle_plotarea()
|
||||||
|
|
||||||
return
|
return
|
||||||
@@ -1647,16 +1651,16 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
|
|||||||
return
|
return
|
||||||
|
|
||||||
# Toggle Fullscreen
|
# Toggle Fullscreen
|
||||||
if key == QtCore.Qt.Key_F10:
|
if key == QtCore.Qt.Key_F10 or key == 'F10':
|
||||||
self.app.on_fullscreen()
|
self.app.on_fullscreen()
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
# Open Manual
|
# Open Manual
|
||||||
if key == QtCore.Qt.Key_F1:
|
if key == QtCore.Qt.Key_F1 or key == 'F1':
|
||||||
webbrowser.open(self.app.manual_url)
|
webbrowser.open(self.app.manual_url)
|
||||||
|
|
||||||
# Open Video Help
|
# Open Video Help
|
||||||
if key == QtCore.Qt.Key_F2:
|
if key == QtCore.Qt.Key_F2 or key == 'F2':
|
||||||
webbrowser.open(self.app.video_url)
|
webbrowser.open(self.app.video_url)
|
||||||
|
|
||||||
# Switch to Project Tab
|
# Switch to Project Tab
|
||||||
@@ -1672,11 +1676,16 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
|
|||||||
self.app.on_select_tab('tool')
|
self.app.on_select_tab('tool')
|
||||||
|
|
||||||
# Delete
|
# Delete
|
||||||
if key == QtCore.Qt.Key_Delete and active:
|
if key == QtCore.Qt.Key_Delete or key == 'Delete':
|
||||||
|
if active:
|
||||||
# Delete via the application to
|
# Delete via the application to
|
||||||
# ensure cleanup of the GUI
|
# ensure cleanup of the GUI
|
||||||
active.app.on_delete()
|
active.app.on_delete()
|
||||||
|
|
||||||
|
# Escape = Deselect All
|
||||||
|
if key == QtCore.Qt.Key_Escape or key == 'Escape':
|
||||||
|
self.app.on_deselect_all()
|
||||||
|
|
||||||
# Space = Toggle Active/Inactive
|
# Space = Toggle Active/Inactive
|
||||||
if key == QtCore.Qt.Key_Space:
|
if key == QtCore.Qt.Key_Space:
|
||||||
for select in selected:
|
for select in selected:
|
||||||
|
|||||||
@@ -1701,7 +1701,7 @@ class FlatCAMExcellon(FlatCAMObj, Excellon):
|
|||||||
job_obj.dwell = self.options["dwell"]
|
job_obj.dwell = self.options["dwell"]
|
||||||
job_obj.dwelltime = self.options["dwelltime"]
|
job_obj.dwelltime = self.options["dwelltime"]
|
||||||
job_obj.pp_excellon_name = pp_excellon_name
|
job_obj.pp_excellon_name = pp_excellon_name
|
||||||
job_obj.toolchange_xy = self.app.defaults["excellon_toolchangexy"]
|
|
||||||
job_obj.toolchange_xy_type = "excellon"
|
job_obj.toolchange_xy_type = "excellon"
|
||||||
job_obj.coords_decimals = int(self.app.defaults["cncjob_coords_decimals"])
|
job_obj.coords_decimals = int(self.app.defaults["cncjob_coords_decimals"])
|
||||||
job_obj.fr_decimals = int(self.app.defaults["cncjob_fr_decimals"])
|
job_obj.fr_decimals = int(self.app.defaults["cncjob_fr_decimals"])
|
||||||
@@ -1740,6 +1740,7 @@ class FlatCAMExcellon(FlatCAMObj, Excellon):
|
|||||||
ret_val = job_obj.generate_from_excellon_by_tool(self, tools_csv,
|
ret_val = job_obj.generate_from_excellon_by_tool(self, tools_csv,
|
||||||
drillz=self.options['drillz'],
|
drillz=self.options['drillz'],
|
||||||
toolchange=self.options["toolchange"],
|
toolchange=self.options["toolchange"],
|
||||||
|
toolchangexy=self.app.defaults["excellon_toolchangexy"],
|
||||||
toolchangez=self.options["toolchangez"],
|
toolchangez=self.options["toolchangez"],
|
||||||
startz=self.options["startz"],
|
startz=self.options["startz"],
|
||||||
endz=self.options["endz"],
|
endz=self.options["endz"],
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ CAD program, and create G-Code for Isolation routing.
|
|||||||
- renamed the theme to layout because it is really a layout change
|
- renamed the theme to layout because it is really a layout change
|
||||||
- added plot kind for CNC Job in the App Preferences
|
- added plot kind for CNC Job in the App Preferences
|
||||||
- combined the geocutout and cutout_any TCL commands - work in progress
|
- combined the geocutout and cutout_any TCL commands - work in progress
|
||||||
|
- 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
|
||||||
|
|
||||||
5.02.3019
|
5.02.3019
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ class default(FlatCAMPostProc):
|
|||||||
gcode += '(Steps per circle: ' + str(p['steps_per_circle']) + ')\n'
|
gcode += '(Steps per circle: ' + str(p['steps_per_circle']) + ')\n'
|
||||||
|
|
||||||
if str(p['options']['type']) == 'Excellon' or str(p['options']['type']) == 'Excellon Geometry':
|
if str(p['options']['type']) == 'Excellon' or str(p['options']['type']) == 'Excellon Geometry':
|
||||||
gcode += '(Postprocessor Excellon: ' + str(p['pp_excellon_name']) + ')\n'
|
gcode += '(Postprocessor Excellon: ' + str(p['pp_excellon_name']) + ')\n' + '\n'
|
||||||
else:
|
else:
|
||||||
gcode += '(Postprocessor Geometry: ' + str(p['pp_geometry_name']) + ')\n' + '\n'
|
gcode += '(Postprocessor Geometry: ' + str(p['pp_geometry_name']) + ')\n' + '\n'
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
from ObjectCollection import *
|
from ObjectCollection import *
|
||||||
from tclCommands.TclCommand import TclCommandSignaled
|
from tclCommands.TclCommand import TclCommandSignaled
|
||||||
|
from copy import deepcopy
|
||||||
|
|
||||||
class TclCommandGeoCutout(TclCommandSignaled):
|
class TclCommandGeoCutout(TclCommandSignaled):
|
||||||
"""
|
"""
|
||||||
@@ -124,21 +124,14 @@ class TclCommandGeoCutout(TclCommandSignaled):
|
|||||||
elif isinstance(cutout_obj, FlatCAMGerber):
|
elif isinstance(cutout_obj, FlatCAMGerber):
|
||||||
|
|
||||||
def geo_init(geo_obj, app_obj):
|
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"
|
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.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)
|
cutout_obj = self.app.collection.get_by_name(outname)
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user