diff --git a/README.md b/README.md index 6a72b728..75711dbf 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ CAD program, and create G-Code for Isolation routing. - added to Paint and NCC Tool a feature that allow polygon area selection when the reference is selected as Area Selection - in Paint Tool and NCC Tool added ability to use Escape Tool to cancel Area Selection and for Paint Tool to cancel Polygon Selection - fixed issue in "re-cut" feature when combined with multi-depth feature +- fixed bugs in cncjob TclCommand 13.03.2020 diff --git a/camlib.py b/camlib.py index bcf3c68e..96587a0e 100644 --- a/camlib.py +++ b/camlib.py @@ -3905,7 +3905,7 @@ class CNCjob(Geometry): self.feedrate_rapid = float(feedrate_rapid) if feedrate_rapid is not None else \ self.app.defaults["geometry_feedrate_rapid"] - self.spindlespeed = int(spindlespeed) if spindlespeed != 0 else None + self.spindlespeed = int(spindlespeed) if spindlespeed != 0 and spindlespeed is not None else None self.spindledir = spindledir self.dwell = dwell self.dwelltime = float(dwelltime) if dwelltime is not None else self.app.defaults["geometry_dwelltime"] @@ -3919,7 +3919,7 @@ class CNCjob(Geometry): "in the format (x, y) but now there is only one value, not two.")) return 'fail' - self.z_depthpercut = float(depthpercut) if depthpercut is not None else 0.0 + self.z_depthpercut = float(depthpercut) if depthpercut is not None and depthpercut != 0 else abs(self.z_cut) self.multidepth = multidepth self.z_toolchange = float(toolchangez) if toolchangez is not None else self.app.defaults["geometry_toolchangez"] self.extracut_length = float(extracut_length) if extracut_length is not None else \ diff --git a/tclCommands/TclCommandCncjob.py b/tclCommands/TclCommandCncjob.py index eeaa4321..ffb91ba7 100644 --- a/tclCommands/TclCommandCncjob.py +++ b/tclCommands/TclCommandCncjob.py @@ -213,7 +213,12 @@ class TclCommandCncjob(TclCommandSignaled): local_tools_dict[tool_uid]['data']['feedrate_rapid'] = args["feedrate_rapid"] local_tools_dict[tool_uid]['data']['multidepth'] = args["multidepth"] local_tools_dict[tool_uid]['data']['extracut'] = args["extracut"] - local_tools_dict[tool_uid]['data']['extracut_length'] = args["extracut_length"] + + if args["extracut"] is True: + local_tools_dict[tool_uid]['data']['extracut_length'] = args["extracut_length"] + else: + local_tools_dict[tool_uid]['data']['extracut_length'] = None + local_tools_dict[tool_uid]['data']['depthperpass'] = args["depthperpass"] local_tools_dict[tool_uid]['data']['toolchange'] = args["toolchange"] local_tools_dict[tool_uid]['data']['toolchangez'] = args["toolchangez"]