- fixed the Tcl command Cncjob: there was a problem reported as issue #416. The command did not work due of the dpp parameter

- modified the Tcl command Cncjob such that if some of the parameters are not used then the default values will be used (set with set_sys)
- modified the Tcl command Drillcncjob to use the defaults when some of the parameters are not used
This commit is contained in:
Marius Stanciu
2020-05-12 03:12:21 +03:00
committed by Marius
parent 4ff5fb6b55
commit 267db756e1
5 changed files with 66 additions and 51 deletions

View File

@@ -2092,19 +2092,11 @@ class GeometryObject(FlatCAMObj, Geometry):
else:
self.app.new_object("cncjob", outname, job_init_multi_geometry, plot=plot)
def generatecncjob(
self, outname=None,
dia=None, offset=None,
z_cut=None, z_move=None,
feedrate=None, feedrate_z=None, feedrate_rapid=None,
spindlespeed=None, dwell=None, dwelltime=None,
multidepth=None, depthperpass=None,
toolchange=None, toolchangez=None, toolchangexy=None,
extracut=None, extracut_length=None, startz=None, endz=None,
pp=None,
segx=None, segy=None,
use_thread=True,
plot=True):
def generatecncjob(self, outname=None, dia=None, offset=None, z_cut=None, z_move=None,
feedrate=None, feedrate_z=None, feedrate_rapid=None, spindlespeed=None, dwell=None, dwelltime=None,
multidepth=None, dpp=None, toolchange=None, toolchangez=None, toolchangexy=None,
extracut=None, extracut_length=None, startz=None, endz=None, pp=None, segx=None, segy=None,
use_thread=True, plot=True):
"""
Only used by the TCL Command Cncjob.
Creates a CNCJob out of this Geometry object. The actual
@@ -2123,7 +2115,7 @@ class GeometryObject(FlatCAMObj, Geometry):
:param dwell:
:param dwelltime:
:param multidepth:
:param depthperpass:
:param dpp: Depth for each pass when multidepth parameter is True
:param toolchange:
:param toolchangez:
:param toolchangexy:
@@ -2150,7 +2142,7 @@ class GeometryObject(FlatCAMObj, Geometry):
feedrate_rapid = feedrate_rapid if feedrate_rapid is not None else float(self.options["feedrate_rapid"])
multidepth = multidepth if multidepth is not None else self.options["multidepth"]
depthperpass = depthperpass if depthperpass is not None else float(self.options["depthperpass"])
depthperpass = dpp if dpp is not None else float(self.options["depthperpass"])
segx = segx if segx is not None else float(self.app.defaults['geometry_segx'])
segy = segy if segy is not None else float(self.app.defaults['geometry_segy'])