Removed 'Use Tip Length' and added 'Extra Offset' in Drilling OP
This commit is contained in:
@@ -63,13 +63,6 @@
|
||||
<item row="1" column="0">
|
||||
<widget class="QWidget" name="widget" native="true">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="7" column="1">
|
||||
<widget class="QCheckBox" name="useTipLength">
|
||||
<property name="text">
|
||||
<string>Use Tip Length</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="4">
|
||||
<widget class="QLabel" name="dwellTimelabel">
|
||||
<property name="enabled">
|
||||
@@ -135,6 +128,32 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="4">
|
||||
<widget class="QLabel" name="Offsetlabel">
|
||||
<property name="text">
|
||||
<string>Extra Offset</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="6">
|
||||
<widget class="QComboBox" name="ExtraOffset">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>None</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Tip Length</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>2x Tip Length</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -164,7 +183,6 @@
|
||||
<tabstop>toolController</tabstop>
|
||||
<tabstop>peckEnabled</tabstop>
|
||||
<tabstop>dwellEnabled</tabstop>
|
||||
<tabstop>useTipLength</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
||||
@@ -75,6 +75,8 @@ class ObjectDrilling(PathCircularHoleBase.ObjectOp):
|
||||
obj.addProperty("App::PropertyEnumeration", "ReturnLevel", "Drill", QtCore.QT_TRANSLATE_NOOP("App::Property", "Controls how tool retracts Default=G99"))
|
||||
obj.ReturnLevel = ['G99', 'G98'] # Canned Cycle Return Level
|
||||
obj.addProperty("App::PropertyDistance", "RetractHeight", "Drill", QtCore.QT_TRANSLATE_NOOP("App::Property", "The height where feed starts and height during retract tool when path is finished while in a peck operation"))
|
||||
obj.addProperty("App::PropertyEnumeration", "ExtraOffset", "Drill", QtCore.QT_TRANSLATE_NOOP("App::Property", "How far the drill depth is extended"))
|
||||
obj.ExtraOffset = ['None', 'Tip Length', '2x Tip Length'] # Canned Cycle Return Level
|
||||
|
||||
# Rotation related properties
|
||||
if not hasattr(obj, 'EnableRotation'):
|
||||
@@ -103,8 +105,10 @@ class ObjectDrilling(PathCircularHoleBase.ObjectOp):
|
||||
self.commandlist.append(Path.Command('G0', {'Z': obj.ClearanceHeight.Value, 'F': self.vertRapid}))
|
||||
|
||||
tiplength = 0.0
|
||||
if obj.AddTipLength:
|
||||
if obj.ExtraOffset == 'Tip Length':
|
||||
tiplength = PathUtils.drillTipLength(self.tool)
|
||||
elif obj.ExtraOffset == '2x Tip Length':
|
||||
tiplength = PathUtils.drillTipLength(self.tool) * 2
|
||||
|
||||
holes = PathUtils.sort_jobs(holes, ['x', 'y'])
|
||||
self.commandlist.append(Path.Command('G90'))
|
||||
@@ -218,6 +222,7 @@ def SetupProperties():
|
||||
setup.append("DwellEnabled")
|
||||
setup.append("AddTipLength")
|
||||
setup.append("ReturnLevel")
|
||||
setup.append("ExtraDepth")
|
||||
setup.append("RetractHeight")
|
||||
setup.append("EnableRotation")
|
||||
setup.append("ReverseDirection")
|
||||
|
||||
@@ -97,8 +97,8 @@ class TaskPanelOpPage(PathCircularHoleBaseGui.TaskPanelOpPage):
|
||||
obj.DwellEnabled = self.form.dwellEnabled.isChecked()
|
||||
if obj.PeckEnabled != self.form.peckEnabled.isChecked():
|
||||
obj.PeckEnabled = self.form.peckEnabled.isChecked()
|
||||
if obj.AddTipLength != self.form.useTipLength.isChecked():
|
||||
obj.AddTipLength = self.form.useTipLength.isChecked()
|
||||
if obj.ExtraOffset != str(self.form.ExtraOffset.currentText()):
|
||||
obj.ExtraOffset = str(self.form.ExtraOffset.currentText())
|
||||
|
||||
self.updateToolController(obj, self.form.toolController)
|
||||
self.updateCoolant(obj, self.form.coolantController)
|
||||
@@ -118,10 +118,7 @@ class TaskPanelOpPage(PathCircularHoleBaseGui.TaskPanelOpPage):
|
||||
else:
|
||||
self.form.peckEnabled.setCheckState(QtCore.Qt.Unchecked)
|
||||
|
||||
if obj.AddTipLength:
|
||||
self.form.useTipLength.setCheckState(QtCore.Qt.Checked)
|
||||
else:
|
||||
self.form.useTipLength.setCheckState(QtCore.Qt.Unchecked)
|
||||
self.selectInComboBox(obj.ExtraOffset, self.form.ExtraOffset)
|
||||
|
||||
self.setupToolController(obj, self.form.toolController)
|
||||
self.setupCoolant(obj, self.form.coolantController)
|
||||
@@ -136,10 +133,10 @@ class TaskPanelOpPage(PathCircularHoleBaseGui.TaskPanelOpPage):
|
||||
signals.append(self.form.dwellTime.editingFinished)
|
||||
signals.append(self.form.dwellEnabled.stateChanged)
|
||||
signals.append(self.form.peckEnabled.stateChanged)
|
||||
signals.append(self.form.useTipLength.stateChanged)
|
||||
signals.append(self.form.toolController.currentIndexChanged)
|
||||
signals.append(self.form.coolantController.currentIndexChanged)
|
||||
signals.append(self.form.coolantController.currentIndexChanged)
|
||||
signals.append(self.form.ExtraOffset.currentIndexChanged)
|
||||
|
||||
return signals
|
||||
|
||||
|
||||
Reference in New Issue
Block a user