From 4f8af51864a057e1f468fef1307851dbd931fe67 Mon Sep 17 00:00:00 2001 From: IMback Date: Thu, 8 Aug 2019 19:29:26 +0200 Subject: [PATCH] Restore R parameter behavior --- src/Mod/Path/PathScripts/PathDrilling.py | 9 +++------ src/Mod/Path/PathScripts/PathDrillingGui.py | 8 +++----- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/src/Mod/Path/PathScripts/PathDrilling.py b/src/Mod/Path/PathScripts/PathDrilling.py index ee58d3e3358e..8ab8b713c946 100644 --- a/src/Mod/Path/PathScripts/PathDrilling.py +++ b/src/Mod/Path/PathScripts/PathDrilling.py @@ -114,15 +114,14 @@ def circularHoleExecute(self, obj, holes): holes = PathUtils.sort_jobs(holes, ['x', 'y']) self.commandlist.append(Path.Command('G90')) self.commandlist.append(Path.Command(obj.ReturnLevel)) - + for p in holes: cmd = "G81" cmdParams = {} cmdParams['Z'] = p['trgtDep'] - tiplength cmdParams['F'] = self.vertFeed - cmdParams['R'] = obj.SafeHeight.Value + cmdParams['R'] = obj.RetractHeight.Value if obj.PeckEnabled and obj.PeckDepth.Value > 0: - cmdParams['R'] = obj.RetractHeight.Value cmd = "G83" cmdParams['Q'] = obj.PeckDepth.Value elif obj.DwellEnabled and obj.DwellTime > 0: @@ -168,7 +167,7 @@ def circularHoleExecute(self, obj, holes): # Perform and cancel canned drilling cycle self.commandlist.append(Path.Command(cmd, params)) - self.commandlist.append(Path.Command('G80')) + self.commandlist.append(Path.Command('G0', {'Z': obj.SafeHeight.Value})) @@ -176,8 +175,6 @@ def circularHoleExecute(self, obj, holes): if obj.EnableRotation != 'Off': lastAxis = axisOfRot lastAngle = angle - elif obj.PeckEnabled and obj.PeckDepth.Value > 0 and obj.RetractHeight.Value != obj.SafeHeight.Value: - self.commandlist.append(Path.Command('G0', {'Z': obj.SafeHeight.Value})) if obj.EnableRotation != 'Off': self.commandlist.append(Path.Command('G0', {'Z': obj.SafeHeight.Value, 'F': self.vertRapid})) diff --git a/src/Mod/Path/PathScripts/PathDrillingGui.py b/src/Mod/Path/PathScripts/PathDrillingGui.py index 8b053ec6eb6d..a8eacaf96109 100644 --- a/src/Mod/Path/PathScripts/PathDrillingGui.py +++ b/src/Mod/Path/PathScripts/PathDrillingGui.py @@ -57,21 +57,19 @@ def initPage(self, obj): def registerSignalHandlers(self, obj): self.form.peckEnabled.toggled.connect(self.form.peckDepth.setEnabled) - self.form.peckEnabled.toggled.connect(self.form.peckRetractHeight.setEnabled) - self.form.peckEnabled.toggled.connect(self.form.peckDepthLabel.setEnabled) - self.form.peckEnabled.toggled.connect(self.form.retractLabel.setEnabled) self.form.peckEnabled.toggled.connect(self.form.dwellEnabled.setDisabled) self.form.dwellEnabled.toggled.connect(self.form.dwellTime.setEnabled) self.form.dwellEnabled.toggled.connect(self.form.dwellTimelabel.setEnabled) self.form.dwellEnabled.toggled.connect(self.form.peckEnabled.setDisabled) + self.form.peckRetractHeight.setEnabled(True) + self.form.retractLabel.setEnabled(True) + if self.form.peckEnabled.isChecked(): self.form.dwellEnabled.setEnabled(False) self.form.peckDepth.setEnabled(True) - self.form.peckRetractHeight.setEnabled(True) self.form.peckDepthLabel.setEnabled(True) - self.form.retractLabel.setEnabled(True) elif self.form.dwellEnabled.isChecked(): self.form.peckEnabled.setEnabled(False) self.form.dwellTime.setEnabled(True)