- fixed postprocessor files to work with toolchange_xy parameter value = None (no values in Edit - Preferences fields) - actual fix

- fixed Tcl commands CncJob and DrillCncJob to work with toolchange
This commit is contained in:
Marius Stanciu
2019-01-31 01:45:14 +02:00
committed by Marius S
parent 7bc806f1dc
commit 4441e40042
10 changed files with 205 additions and 57 deletions

View File

@@ -55,6 +55,9 @@ class TclCommandCncjob(TclCommandSignaled):
('multidepth', 'Use or not multidepth cnccut. (True or False)'),
('depthperpass', 'Height of one layer for multidepth.'),
('extracut', 'Use or not an extra cnccut over the first point in path,in the job end (example: True)'),
('toolchange', 'Enable tool changes (example: True).'),
('toolchangez', 'Z distance for toolchange (example: 30.0).'),
('toolchangexy', 'X, Y coordonates for toolchange in format (x, y) (example: (2.0, 3.1) ).'),
('endz', 'Height where the last move will park.'),
('outname', 'Name of the resulting Geometry object.'),
('ppname_g', 'Name of the Geometry postprocessor. No quotes, case sensitive')
@@ -96,6 +99,10 @@ class TclCommandCncjob(TclCommandSignaled):
args["endz"]= args["endz"] if "endz" in args else obj.options["endz"]
args["ppname_g"] = args["ppname_g"] if "ppname_g" in args else obj.options["ppname_g"]
args["toolchange"] = True if "toolchange" in args and args["toolchange"] == 1 else False
args["toolchangez"] = args["toolchangez"] if "toolchangez" in args else obj.options["toolchangez"]
args["toolchangexy"] = args["toolchangexy"] if "toolchangexy" in args else obj.options["toolchangexy"]
del args['name']
# HACK !!! Should be solved elsewhere!!!

View File

@@ -47,6 +47,7 @@ class TclCommandDrillcncjob(TclCommandSignaled):
('spindlespeed', 'Speed of the spindle in rpm (example: 4000).'),
('toolchange', 'Enable tool changes (example: True).'),
('toolchangez', 'Z distance for toolchange (example: 30.0).'),
('toolchangexy', 'X, Y coordonates for toolchange in format (x, y) (example: (2.0, 3.1) ).'),
('endz', 'Z distance at job end (example: 30.0).'),
('ppname_e', 'This is the Excellon postprocessor name: case_sensitive, no_quotes'),
('outname', 'Name of the resulting Geometry object.'),
@@ -93,13 +94,16 @@ class TclCommandDrillcncjob(TclCommandSignaled):
toolchange = True if "toolchange" in args and args["toolchange"] == 1 else False
toolchangez = args["toolchangez"] if "toolchangez" in args else obj.options["toolchangez"]
toolchangexy = args["toolchangexy"] if "toolchangexy" in args else obj.options["toolchangexy"]
endz = args["endz"] if "endz" in args else obj.options["endz"]
tools = args["tools"] if "tools" in args else 'all'
opt_type = args["opt_type"] if "opt_type" in args else 'B'
job_obj.generate_from_excellon_by_tool(obj, tools, drillz=drillz, toolchangez=toolchangez, endz=endz,
job_obj.generate_from_excellon_by_tool(obj, tools, drillz=drillz, toolchangez=toolchangez,
toolchangexy=toolchangexy,
endz=endz,
toolchange=toolchange, excellon_optimization_type=opt_type)
job_obj.gcode_parse()
job_obj.create_geometry()