Skip to content

Commit

Permalink
Restore R parameter behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
IMback committed Aug 8, 2019
1 parent c8fda88 commit 4f8af51
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
9 changes: 3 additions & 6 deletions src/Mod/Path/PathScripts/PathDrilling.py
Expand Up @@ -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:
Expand Down Expand Up @@ -168,16 +167,14 @@ 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}))



# shift axis and angle values
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}))
Expand Down
8 changes: 3 additions & 5 deletions src/Mod/Path/PathScripts/PathDrillingGui.py
Expand Up @@ -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)
Expand Down

0 comments on commit 4f8af51

Please sign in to comment.