|
@@ -2648,7 +2648,9 @@ class App(QtCore.QObject):
|
|
|
'feedrate': float,
|
|
'feedrate': float,
|
|
|
'tooldia': float,
|
|
'tooldia': float,
|
|
|
'outname': str,
|
|
'outname': str,
|
|
|
- 'spindlespeed': int
|
|
|
|
|
|
|
+ 'spindlespeed': int,
|
|
|
|
|
+ 'multidepth' : bool,
|
|
|
|
|
+ 'depthperpass' : float
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
for key in kwa:
|
|
for key in kwa:
|
|
@@ -3219,13 +3221,15 @@ class App(QtCore.QObject):
|
|
|
'cncjob': {
|
|
'cncjob': {
|
|
|
'fcn': cncjob,
|
|
'fcn': cncjob,
|
|
|
'help': 'Generates a CNC Job from a Geometry Object.\n' +
|
|
'help': 'Generates a CNC Job from a Geometry Object.\n' +
|
|
|
- '> cncjob <name> [-z_cut <c>] [-z_move <m>] [-feedrate <f>] [-tooldia <t>] [-spindlespeed (int)] [-outname <n>]\n' +
|
|
|
|
|
|
|
+ '> cncjob <name> [-z_cut <c>] [-z_move <float>] [-feedrate <float>] [-tooldia <float>] [-spindlespeed <int>] [-multidepth <bool>] [-depthperpass <float>] [-outname <str>]\n' +
|
|
|
' name: Name of the source object\n' +
|
|
' name: Name of the source object\n' +
|
|
|
' z_cut: Z-axis cutting position\n' +
|
|
' z_cut: Z-axis cutting position\n' +
|
|
|
' z_move: Z-axis moving position\n' +
|
|
' z_move: Z-axis moving position\n' +
|
|
|
' feedrate: Moving speed when cutting\n' +
|
|
' feedrate: Moving speed when cutting\n' +
|
|
|
' tooldia: Tool diameter to show on screen\n' +
|
|
' tooldia: Tool diameter to show on screen\n' +
|
|
|
' spindlespeed: Speed of the spindle in rpm (example: 4000)\n' +
|
|
' spindlespeed: Speed of the spindle in rpm (example: 4000)\n' +
|
|
|
|
|
+ ' multidepth: Use or not multidepth cnccut\n'+
|
|
|
|
|
+ ' depthperpass: Height of one layer for multidepth\n'+
|
|
|
' outname: Name of the output object'
|
|
' outname: Name of the output object'
|
|
|
},
|
|
},
|
|
|
'write_gcode': {
|
|
'write_gcode': {
|
|
@@ -3424,13 +3428,17 @@ class App(QtCore.QObject):
|
|
|
for recent in self.recent:
|
|
for recent in self.recent:
|
|
|
filename = recent['filename'].split('/')[-1].split('\\')[-1]
|
|
filename = recent['filename'].split('/')[-1].split('\\')[-1]
|
|
|
|
|
|
|
|
- action = QtGui.QAction(QtGui.QIcon(icons[recent["kind"]]), filename, self)
|
|
|
|
|
|
|
+ try:
|
|
|
|
|
+ action = QtGui.QAction(QtGui.QIcon(icons[recent["kind"]]), filename, self)
|
|
|
|
|
+
|
|
|
|
|
+ # Attach callback
|
|
|
|
|
+ o = make_callback(openers[recent["kind"]], recent['filename'])
|
|
|
|
|
+ action.triggered.connect(o)
|
|
|
|
|
|
|
|
- # Attach callback
|
|
|
|
|
- o = make_callback(openers[recent["kind"]], recent['filename'])
|
|
|
|
|
- action.triggered.connect(o)
|
|
|
|
|
|
|
+ self.ui.recent.addAction(action)
|
|
|
|
|
|
|
|
- self.ui.recent.addAction(action)
|
|
|
|
|
|
|
+ except KeyError:
|
|
|
|
|
+ App.log.error("Unsupported file type: %s" % recent["kind"])
|
|
|
|
|
|
|
|
# self.builder.get_object('open_recent').set_submenu(recent_menu)
|
|
# self.builder.get_object('open_recent').set_submenu(recent_menu)
|
|
|
# self.ui.menufilerecent.set_submenu(recent_menu)
|
|
# self.ui.menufilerecent.set_submenu(recent_menu)
|