|
@@ -37,9 +37,10 @@ class TclCommandCncjob(TclCommandSignaled):
|
|
|
('extracut_length', float),
|
|
('extracut_length', float),
|
|
|
('dpp', float),
|
|
('dpp', float),
|
|
|
('toolchangez', float),
|
|
('toolchangez', float),
|
|
|
- ('toolchangexy', tuple),
|
|
|
|
|
|
|
+ ('toolchangexy', str),
|
|
|
('startz', float),
|
|
('startz', float),
|
|
|
('endz', float),
|
|
('endz', float),
|
|
|
|
|
+ ('endxy', str),
|
|
|
('spindlespeed', int),
|
|
('spindlespeed', int),
|
|
|
('dwelltime', float),
|
|
('dwelltime', float),
|
|
|
('pp', str),
|
|
('pp', str),
|
|
@@ -65,9 +66,12 @@ class TclCommandCncjob(TclCommandSignaled):
|
|
|
('dpp', 'If present then use multidepth cnc cut. Height of one layer for multidepth.'),
|
|
('dpp', 'If present then use multidepth cnc cut. Height of one layer for multidepth.'),
|
|
|
('toolchangez', 'Z distance for toolchange (example: 30.0).\n'
|
|
('toolchangez', 'Z distance for toolchange (example: 30.0).\n'
|
|
|
'If used in the command then a toolchange event will be included in gcode'),
|
|
'If used in the command then a toolchange event will be included in gcode'),
|
|
|
- ('toolchangexy', 'X, Y coordonates for toolchange in format (x, y) (example: (2.0, 3.1) ).'),
|
|
|
|
|
|
|
+ ('toolchangexy', 'The X,Y coordinates at Toolchange event in format (x, y) (example: (30.0, 15.2) or '
|
|
|
|
|
+ 'without parenthesis like: 0.3,1.0 - no spaces allowed in this case).'),
|
|
|
('startz', 'Height before the first move.'),
|
|
('startz', 'Height before the first move.'),
|
|
|
('endz', 'Height where the last move will park.'),
|
|
('endz', 'Height where the last move will park.'),
|
|
|
|
|
+ ('endxy', 'The X,Y coordinates at job end in format (x, y) (example: (30.0, 15.2) or without parenthesis'
|
|
|
|
|
+ 'like: 0.3,1.0 - no spaces allowed in this case).'),
|
|
|
('spindlespeed', 'Speed of the spindle in rpm (example: 4000).'),
|
|
('spindlespeed', 'Speed of the spindle in rpm (example: 4000).'),
|
|
|
('dwelltime', 'Time to pause to allow the spindle to reach the full speed.\n'
|
|
('dwelltime', 'Time to pause to allow the spindle to reach the full speed.\n'
|
|
|
'If it is not used in command then it will not be included'),
|
|
'If it is not used in command then it will not be included'),
|
|
@@ -161,6 +165,17 @@ class TclCommandCncjob(TclCommandSignaled):
|
|
|
self.app.defaults["geometry_startz"]
|
|
self.app.defaults["geometry_startz"]
|
|
|
args["endz"] = args["endz"] if "endz" in args and args["endz"] else self.app.defaults["geometry_endz"]
|
|
args["endz"] = args["endz"] if "endz" in args and args["endz"] else self.app.defaults["geometry_endz"]
|
|
|
|
|
|
|
|
|
|
+ if "endxy" in args and args["endxy"]:
|
|
|
|
|
+ args["endxy"] = args["endxy"]
|
|
|
|
|
+ else:
|
|
|
|
|
+ if self.app.defaults["geometry_endxy"]:
|
|
|
|
|
+ args["endxy"] = self.app.defaults["geometry_endxy"]
|
|
|
|
|
+ else:
|
|
|
|
|
+ args["endxy"] = '0, 0'
|
|
|
|
|
+ if len(eval(args["endxy"])) != 2:
|
|
|
|
|
+ self.raise_tcl_error("The entered value for 'endxy' needs to have the format x,y - no spaces or "
|
|
|
|
|
+ "in format (x, y) - spaces allowed. But always two comma separated values.")
|
|
|
|
|
+
|
|
|
args["spindlespeed"] = args["spindlespeed"] if "spindlespeed" in args and args["spindlespeed"] != 0 else None
|
|
args["spindlespeed"] = args["spindlespeed"] if "spindlespeed" in args and args["spindlespeed"] != 0 else None
|
|
|
|
|
|
|
|
if 'dwelltime' in args:
|
|
if 'dwelltime' in args:
|
|
@@ -180,13 +195,21 @@ class TclCommandCncjob(TclCommandSignaled):
|
|
|
if args["toolchangez"] is not None:
|
|
if args["toolchangez"] is not None:
|
|
|
args["toolchangez"] = args["toolchangez"]
|
|
args["toolchangez"] = args["toolchangez"]
|
|
|
else:
|
|
else:
|
|
|
- args["toolchangez"] = obj.options["toolchangez"]
|
|
|
|
|
|
|
+ args["toolchangez"] = self.app.defaults["geometry_toolchangez"]
|
|
|
else:
|
|
else:
|
|
|
args["toolchange"] = self.app.defaults["geometry_toolchange"]
|
|
args["toolchange"] = self.app.defaults["geometry_toolchange"]
|
|
|
args["toolchangez"] = self.app.defaults["geometry_toolchangez"]
|
|
args["toolchangez"] = self.app.defaults["geometry_toolchangez"]
|
|
|
|
|
|
|
|
- args["toolchangexy"] = args["toolchangexy"] if "toolchangexy" in args and args["toolchangexy"] else \
|
|
|
|
|
- self.app.defaults["geometry_toolchangexy"]
|
|
|
|
|
|
|
+ if "toolchangexy" in args and args["toolchangexy"]:
|
|
|
|
|
+ args["toolchangexy"] = args["toolchangexy"]
|
|
|
|
|
+ else:
|
|
|
|
|
+ if self.app.defaults["geometry_toolchangexy"]:
|
|
|
|
|
+ args["toolchangexy"] = self.app.defaults["geometry_toolchangexy"]
|
|
|
|
|
+ else:
|
|
|
|
|
+ args["toolchangexy"] = '0, 0'
|
|
|
|
|
+ if len(eval(args["toolchangexy"])) != 2:
|
|
|
|
|
+ self.raise_tcl_error("The entered value for 'toolchangexy' needs to have the format x,y - no spaces or "
|
|
|
|
|
+ "in format (x, y) - spaces allowed. But always two comma separated values.")
|
|
|
|
|
|
|
|
del args['name']
|
|
del args['name']
|
|
|
|
|
|
|
@@ -195,7 +218,7 @@ class TclCommandCncjob(TclCommandSignaled):
|
|
|
continue
|
|
continue
|
|
|
else:
|
|
else:
|
|
|
if args[arg] is None:
|
|
if args[arg] is None:
|
|
|
- print(arg, args[arg])
|
|
|
|
|
|
|
+ print("None parameters: %s is None" % arg)
|
|
|
if muted is False:
|
|
if muted is False:
|
|
|
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'
|
|
@@ -234,6 +257,7 @@ class TclCommandCncjob(TclCommandSignaled):
|
|
|
local_tools_dict[tool_uid]['data']['toolchangexy'] = args["toolchangexy"]
|
|
local_tools_dict[tool_uid]['data']['toolchangexy'] = args["toolchangexy"]
|
|
|
local_tools_dict[tool_uid]['data']['startz'] = args["startz"]
|
|
local_tools_dict[tool_uid]['data']['startz'] = args["startz"]
|
|
|
local_tools_dict[tool_uid]['data']['endz'] = args["endz"]
|
|
local_tools_dict[tool_uid]['data']['endz'] = args["endz"]
|
|
|
|
|
+ local_tools_dict[tool_uid]['data']['endxy'] = args["endxy"]
|
|
|
local_tools_dict[tool_uid]['data']['spindlespeed'] = args["spindlespeed"]
|
|
local_tools_dict[tool_uid]['data']['spindlespeed'] = args["spindlespeed"]
|
|
|
local_tools_dict[tool_uid]['data']['dwell'] = args["dwell"]
|
|
local_tools_dict[tool_uid]['data']['dwell'] = args["dwell"]
|
|
|
local_tools_dict[tool_uid]['data']['dwelltime'] = args["dwelltime"]
|
|
local_tools_dict[tool_uid]['data']['dwelltime'] = args["dwelltime"]
|