Merged master into consolidate
This commit is contained in:
@@ -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
|
# Attach callback
|
||||||
o = make_callback(openers[recent["kind"]], recent['filename'])
|
o = make_callback(openers[recent["kind"]], recent['filename'])
|
||||||
action.triggered.connect(o)
|
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)
|
||||||
|
|||||||
@@ -144,7 +144,6 @@ class FlatCAMObj(QtCore.QObject):
|
|||||||
except:
|
except:
|
||||||
self.app.log.warning("Unexpected error:", sys.exc_info())
|
self.app.log.warning("Unexpected error:", sys.exc_info())
|
||||||
|
|
||||||
|
|
||||||
def build_ui(self):
|
def build_ui(self):
|
||||||
"""
|
"""
|
||||||
Sets up the UI/form for this object. Show the UI
|
Sets up the UI/form for this object. Show the UI
|
||||||
@@ -199,16 +198,22 @@ class FlatCAMObj(QtCore.QObject):
|
|||||||
:type option: str
|
:type option: str
|
||||||
:return: None
|
:return: None
|
||||||
"""
|
"""
|
||||||
#try read field only when option have equivalent in form_fields
|
|
||||||
if option in self.form_fields:
|
try:
|
||||||
option_type=type(self.options[option])
|
self.options[option] = self.form_fields[option].get_value()
|
||||||
try:
|
except KeyError:
|
||||||
value=self.form_fields[option].get_value()
|
self.app.log.warning("Failed to read option from field: %s" % option)
|
||||||
#catch per option as it was ignored anyway, also when syntax error (probably uninitialized field),don't read either.
|
|
||||||
except (KeyError,SyntaxError):
|
# #try read field only when option have equivalent in form_fields
|
||||||
self.app.log.warning("Failed to read option from field: %s" % option)
|
# if option in self.form_fields:
|
||||||
else:
|
# option_type=type(self.options[option])
|
||||||
self.app.log.warning("Form fied does not exists: %s" % option)
|
# try:
|
||||||
|
# value=self.form_fields[option].get_value()
|
||||||
|
# #catch per option as it was ignored anyway, also when syntax error (probably uninitialized field),don't read either.
|
||||||
|
# except (KeyError,SyntaxError):
|
||||||
|
# self.app.log.warning("Failed to read option from field: %s" % option)
|
||||||
|
# else:
|
||||||
|
# self.app.log.warning("Form fied does not exists: %s" % option)
|
||||||
|
|
||||||
def plot(self):
|
def plot(self):
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user