Skip to content

Commit

Permalink
Added ClearEdges in MillFace to GUI
Browse files Browse the repository at this point in the history
  • Loading branch information
Schildkroet committed Mar 9, 2020
1 parent 8624564 commit 4234048
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/Mod/Path/Gui/Resources/panels/PageOpPocketFullEdit.ui
Expand Up @@ -255,6 +255,13 @@
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="clearEdges">
<property name="text">
<string>Clear Edges</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/Path/PathScripts/PathMillFace.py
Expand Up @@ -59,7 +59,7 @@ def initPocketOp(self, obj):
'''initPocketOp(obj) ... create facing specific properties'''
obj.addProperty("App::PropertyEnumeration", "BoundaryShape", "Face", QtCore.QT_TRANSLATE_NOOP("App::Property", "Shape to use for calculating Boundary"))
obj.BoundaryShape = ['Perimeter', 'Boundbox', 'Stock']
obj.addProperty("App::PropertyBool", "ClearEdges", "Face", QtCore.QT_TRANSLATE_NOOP("App::Property", "Clear edges"))
obj.addProperty("App::PropertyBool", "ClearEdges", "Face", QtCore.QT_TRANSLATE_NOOP("App::Property", "Clear edges of surface (Only applicable to BoundBox)"))

if not hasattr(obj, 'ExcludeRaisedAreas'):
obj.addProperty("App::PropertyBool", "ExcludeRaisedAreas", "Face", QtCore.QT_TRANSLATE_NOOP("App::Property", "Exclude milling raised areas inside the face."))
Expand Down
5 changes: 5 additions & 0 deletions src/Mod/Path/PathScripts/PathPocketBaseGui.py
Expand Up @@ -62,6 +62,7 @@ def getForm(self):

if not FeatureFacing & self.pocketFeatures():
form.facingWidget.hide()
form.clearEdges.hide()

if FeaturePocket & self.pocketFeatures():
form.extraOffsetLabel.setText(translate("PathPocket", "Pass Extension"))
Expand Down Expand Up @@ -121,6 +122,8 @@ def getFields(self, obj):
if FeatureFacing & self.pocketFeatures():
if obj.BoundaryShape != str(self.form.boundaryShape.currentText()):
obj.BoundaryShape = str(self.form.boundaryShape.currentText())
if obj.ClearEdges != self.form.clearEdges.isChecked():
obj.ClearEdges = self.form.clearEdges.isChecked()

def setFields(self, obj):
'''setFields(obj) ... transfers obj's property values to UI'''
Expand All @@ -143,6 +146,7 @@ def setFields(self, obj):

if FeatureFacing & self.pocketFeatures():
self.selectInComboBox(obj.BoundaryShape, self.form.boundaryShape)
self.form.clearEdges.setChecked(obj.ClearEdges)

def getSignalsForUpdate(self, obj):
'''getSignalsForUpdate(obj) ... return list of signals for updating obj'''
Expand All @@ -161,5 +165,6 @@ def getSignalsForUpdate(self, obj):

if FeatureFacing & self.pocketFeatures():
signals.append(self.form.boundaryShape.currentIndexChanged)
signals.append(self.form.clearEdges.clicked)

return signals

0 comments on commit 4234048

Please sign in to comment.