- fixed some issues recently introduced in the TclCommands CNCJob, DrillCNCJob adn write_gcode; changed some parameters names
This commit is contained in:
@@ -4906,14 +4906,14 @@ class FlatCAMGeometry(FlatCAMObj, Geometry):
|
|||||||
|
|
||||||
def generatecncjob(
|
def generatecncjob(
|
||||||
self, outname=None,
|
self, outname=None,
|
||||||
tooldia=None, offset=None,
|
dia=None, offset=None,
|
||||||
z_cut=None, z_move=None,
|
z_cut=None, z_move=None,
|
||||||
feedrate=None, feedrate_z=None, feedrate_rapid=None,
|
feedrate=None, feedrate_z=None, feedrate_rapid=None,
|
||||||
spindlespeed=None, dwell=None, dwelltime=None,
|
spindlespeed=None, dwell=None, dwelltime=None,
|
||||||
multidepth=None, depthperpass=None,
|
multidepth=None, depthperpass=None,
|
||||||
toolchange=None, toolchangez=None, toolchangexy=None,
|
toolchange=None, toolchangez=None, toolchangexy=None,
|
||||||
extracut=None, startz=None, endz=None,
|
extracut=None, startz=None, endz=None,
|
||||||
ppname_g=None,
|
pp=None,
|
||||||
segx=None, segy=None,
|
segx=None, segy=None,
|
||||||
use_thread=True,
|
use_thread=True,
|
||||||
plot=True):
|
plot=True):
|
||||||
@@ -4928,14 +4928,14 @@ class FlatCAMGeometry(FlatCAMObj, Geometry):
|
|||||||
:param feedrate: Feed rate while cutting on X - Y plane
|
:param feedrate: Feed rate while cutting on X - Y plane
|
||||||
:param feedrate_z: Feed rate while cutting on Z plane
|
:param feedrate_z: Feed rate while cutting on Z plane
|
||||||
:param feedrate_rapid: Feed rate while moving with rapids
|
:param feedrate_rapid: Feed rate while moving with rapids
|
||||||
:param tooldia: Tool diameter
|
:param dia: Tool diameter
|
||||||
:param outname: Name of the new object
|
:param outname: Name of the new object
|
||||||
:param spindlespeed: Spindle speed (RPM)
|
:param spindlespeed: Spindle speed (RPM)
|
||||||
:param ppname_g Name of the postprocessor
|
:param pp Name of the postprocessor
|
||||||
:return: None
|
:return: None
|
||||||
"""
|
"""
|
||||||
|
|
||||||
tooldia = tooldia if tooldia else float(self.options["cnctooldia"])
|
tooldia = dia if dia else float(self.options["cnctooldia"])
|
||||||
outname = outname if outname is not None else self.options["name"]
|
outname = outname if outname is not None else self.options["name"]
|
||||||
|
|
||||||
z_cut = z_cut if z_cut is not None else float(self.options["cutz"])
|
z_cut = z_cut if z_cut is not None else float(self.options["cutz"])
|
||||||
@@ -4966,7 +4966,7 @@ class FlatCAMGeometry(FlatCAMObj, Geometry):
|
|||||||
dwell = dwell if dwell else self.options["dwell"]
|
dwell = dwell if dwell else self.options["dwell"]
|
||||||
dwelltime = dwelltime if dwelltime else float(self.options["dwelltime"])
|
dwelltime = dwelltime if dwelltime else float(self.options["dwelltime"])
|
||||||
|
|
||||||
ppname_g = ppname_g if ppname_g else self.options["ppname_g"]
|
ppname_g = pp if pp else self.options["ppname_g"]
|
||||||
|
|
||||||
# Object initialization function for app.new_object()
|
# Object initialization function for app.new_object()
|
||||||
# RUNNING ON SEPARATE THREAD!
|
# RUNNING ON SEPARATE THREAD!
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ CAD program, and create G-Code for Isolation routing.
|
|||||||
- some GUI optimizations
|
- some GUI optimizations
|
||||||
- more GUI optimizations related to being part of the Advanced category or not
|
- more GUI optimizations related to being part of the Advanced category or not
|
||||||
- added possibility to change the positive SVG exported file color in Tool Film
|
- added possibility to change the positive SVG exported file color in Tool Film
|
||||||
|
- fixed some issues recently introduced in the TclCommands CNCJob, DrillCNCJob adn write_gcode; changed some parameters names
|
||||||
|
|
||||||
15.09.2019
|
15.09.2019
|
||||||
|
|
||||||
|
|||||||
@@ -7792,7 +7792,7 @@ class FAExcPrefGroupUI(OptionsGroupUI):
|
|||||||
self.layout.addWidget(self.exc_list_label)
|
self.layout.addWidget(self.exc_list_label)
|
||||||
|
|
||||||
self.exc_list_text = FCTextArea()
|
self.exc_list_text = FCTextArea()
|
||||||
self.exc_list_text.sizeHint(custom_sizehint=150)
|
# self.exc_list_text.sizeHint(custom_sizehint=150)
|
||||||
font = QtGui.QFont()
|
font = QtGui.QFont()
|
||||||
font.setPointSize(12)
|
font.setPointSize(12)
|
||||||
self.exc_list_text.setFont(font)
|
self.exc_list_text.setFont(font)
|
||||||
@@ -7825,7 +7825,7 @@ class FAGcoPrefGroupUI(OptionsGroupUI):
|
|||||||
self.layout.addWidget(self.gco_list_label)
|
self.layout.addWidget(self.gco_list_label)
|
||||||
|
|
||||||
self.gco_list_text = FCTextArea()
|
self.gco_list_text = FCTextArea()
|
||||||
self.gco_list_text.sizeHint(custom_sizehint=150)
|
# self.gco_list_text.sizeHint(custom_sizehint=150)
|
||||||
font = QtGui.QFont()
|
font = QtGui.QFont()
|
||||||
font.setPointSize(12)
|
font.setPointSize(12)
|
||||||
self.gco_list_text.setFont(font)
|
self.gco_list_text.setFont(font)
|
||||||
@@ -7858,7 +7858,7 @@ class FAGrbPrefGroupUI(OptionsGroupUI):
|
|||||||
self.layout.addWidget(self.grb_list_label)
|
self.layout.addWidget(self.grb_list_label)
|
||||||
|
|
||||||
self.grb_list_text = FCTextArea()
|
self.grb_list_text = FCTextArea()
|
||||||
self.grb_list_text.sizeHint(custom_sizehint=150)
|
# self.grb_list_text.sizeHint(custom_sizehint=150)
|
||||||
self.layout.addWidget(self.grb_list_text)
|
self.layout.addWidget(self.grb_list_text)
|
||||||
font = QtGui.QFont()
|
font = QtGui.QFont()
|
||||||
font.setPointSize(12)
|
font.setPointSize(12)
|
||||||
@@ -7869,6 +7869,7 @@ class FAGrbPrefGroupUI(OptionsGroupUI):
|
|||||||
"FlatCAM and the files with above extensions.\n"
|
"FlatCAM and the files with above extensions.\n"
|
||||||
"They will be active after next logon.\n"
|
"They will be active after next logon.\n"
|
||||||
"This work only in Windows."))
|
"This work only in Windows."))
|
||||||
|
|
||||||
self.layout.addWidget(self.grb_list_btn)
|
self.layout.addWidget(self.grb_list_btn)
|
||||||
|
|
||||||
# self.layout.addStretch()
|
# self.layout.addStretch()
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ class TclCommandCncjob(TclCommandSignaled):
|
|||||||
|
|
||||||
# dictionary of types from Tcl command, needs to be ordered , this is for options like -optionname value
|
# dictionary of types from Tcl command, needs to be ordered , this is for options like -optionname value
|
||||||
option_types = collections.OrderedDict([
|
option_types = collections.OrderedDict([
|
||||||
('tooldia', float),
|
('dia', float),
|
||||||
('z_cut', float),
|
('z_cut', float),
|
||||||
('z_move', float),
|
('z_move', float),
|
||||||
('feedrate', float),
|
('feedrate', float),
|
||||||
@@ -54,7 +54,7 @@ class TclCommandCncjob(TclCommandSignaled):
|
|||||||
'main': "Generates a CNC Job from a Geometry Object.",
|
'main': "Generates a CNC Job from a Geometry Object.",
|
||||||
'args': collections.OrderedDict([
|
'args': collections.OrderedDict([
|
||||||
('name', 'Name of the source object.'),
|
('name', 'Name of the source object.'),
|
||||||
('tooldia', 'Tool diameter to show on screen.'),
|
('dia', 'Tool diameter to show on screen.'),
|
||||||
('z_cut', 'Z-axis cutting position.'),
|
('z_cut', 'Z-axis cutting position.'),
|
||||||
('z_move', 'Z-axis moving position.'),
|
('z_move', 'Z-axis moving position.'),
|
||||||
('feedrate', 'Moving speed on X-Y plane when cutting.'),
|
('feedrate', 'Moving speed on X-Y plane when cutting.'),
|
||||||
@@ -95,6 +95,8 @@ class TclCommandCncjob(TclCommandSignaled):
|
|||||||
|
|
||||||
if 'muted' in args:
|
if 'muted' in args:
|
||||||
muted = args['muted']
|
muted = args['muted']
|
||||||
|
else:
|
||||||
|
muted = 0
|
||||||
|
|
||||||
obj = self.app.collection.get_by_name(str(name), isCaseSensitive=False)
|
obj = self.app.collection.get_by_name(str(name), isCaseSensitive=False)
|
||||||
|
|
||||||
@@ -110,7 +112,7 @@ class TclCommandCncjob(TclCommandSignaled):
|
|||||||
else:
|
else:
|
||||||
return
|
return
|
||||||
|
|
||||||
args["tooldia"] = args["tooldia"] if "tooldia" in args else obj.options["cnctooldia"]
|
args["dia"] = args["dia"] if "dia" in args else obj.options["cnctooldia"]
|
||||||
|
|
||||||
args["z_cut"] = args["z_cut"] if "z_cut" in args else obj.options["cutz"]
|
args["z_cut"] = args["z_cut"] if "z_cut" in args else obj.options["cutz"]
|
||||||
args["z_move"] = args["z_move"] if "z_move" in args else obj.options["travelz"]
|
args["z_move"] = args["z_move"] if "z_move" in args else obj.options["travelz"]
|
||||||
@@ -141,10 +143,11 @@ class TclCommandCncjob(TclCommandSignaled):
|
|||||||
del args['name']
|
del args['name']
|
||||||
|
|
||||||
for arg in args:
|
for arg in args:
|
||||||
if arg == "toolchange_xy" or arg == "spindlespeed":
|
if arg == "toolchange_xy" or arg == "spindlespeed" or arg == "startz":
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
if args[arg] is None:
|
if args[arg] is None:
|
||||||
|
print(arg, args[arg])
|
||||||
if not muted:
|
if not muted:
|
||||||
self.raise_tcl_error('One of the command parameters that have to be not None, is None.\n'
|
self.raise_tcl_error('One of the command parameters that have to be not None, is None.\n'
|
||||||
'The parameter that is None is in the default values found in the list \n'
|
'The parameter that is None is in the default values found in the list \n'
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ class TclCommandDrillcncjob(TclCommandSignaled):
|
|||||||
|
|
||||||
# dictionary of types from Tcl command, needs to be ordered , this is for options like -optionname value
|
# dictionary of types from Tcl command, needs to be ordered , this is for options like -optionname value
|
||||||
option_types = collections.OrderedDict([
|
option_types = collections.OrderedDict([
|
||||||
('tools', str),
|
|
||||||
('drilled_dias', str),
|
('drilled_dias', str),
|
||||||
('drillz', float),
|
('drillz', float),
|
||||||
('travelz', float),
|
('travelz', float),
|
||||||
@@ -88,6 +87,8 @@ class TclCommandDrillcncjob(TclCommandSignaled):
|
|||||||
|
|
||||||
if 'muted' in args:
|
if 'muted' in args:
|
||||||
muted = args['muted']
|
muted = args['muted']
|
||||||
|
else:
|
||||||
|
muted = 0
|
||||||
|
|
||||||
obj = self.app.collection.get_by_name(name)
|
obj = self.app.collection.get_by_name(name)
|
||||||
if obj is None:
|
if obj is None:
|
||||||
|
|||||||
@@ -67,6 +67,8 @@ class TclCommandWriteGCode(TclCommandSignaled):
|
|||||||
|
|
||||||
if 'muted' in args:
|
if 'muted' in args:
|
||||||
muted = args['muted']
|
muted = args['muted']
|
||||||
|
else:
|
||||||
|
muted = 0
|
||||||
|
|
||||||
# TODO: This is not needed any more? All targets should be present.
|
# TODO: This is not needed any more? All targets should be present.
|
||||||
# If there are promised objects, wait until all promises have been fulfilled.
|
# If there are promised objects, wait until all promises have been fulfilled.
|
||||||
|
|||||||
Reference in New Issue
Block a user