Merge pull request #4161 from bryanbendall/adaptive-work

Path: Adaptive work
This commit is contained in:
sliptonic
2020-12-26 06:49:56 -06:00
committed by GitHub
5 changed files with 100 additions and 94 deletions

View File

@@ -395,6 +395,7 @@ def Execute(op,obj):
"operationType": obj.OperationType,
"side": obj.Side,
"forceInsideOut" : obj.ForceInsideOut,
"finishingProfile" : obj.FinishingProfile,
"keepToolDownRatio": keepToolDownRatio,
"stockToLeave": float(obj.StockToLeave)
}
@@ -433,6 +434,7 @@ def Execute(op,obj):
a2d.stockToLeave =float(obj.StockToLeave)
a2d.tolerance = float(obj.Tolerance)
a2d.forceInsideOut = obj.ForceInsideOut
a2d.finishingProfile = obj.FinishingProfile
a2d.opType = opType
# EXECUTE
@@ -489,6 +491,7 @@ class PathAdaptive(PathOp.ObjectOp):
# obj.addProperty("App::PropertyBool", "ProcessHoles", "Adaptive","Process holes as well as the face outline")
obj.addProperty("App::PropertyBool", "ForceInsideOut", "Adaptive","Force plunging into material inside and clearing towards the edges")
obj.addProperty("App::PropertyBool", "FinishingProfile", "Adaptive","To take a finishing profile path at the end")
obj.addProperty("App::PropertyBool", "Stopped",
"Adaptive", "Stop processing")
obj.setEditorMode('Stopped', 2) #hide this property
@@ -517,6 +520,7 @@ class PathAdaptive(PathOp.ObjectOp):
obj.LiftDistance=0
# obj.ProcessHoles = True
obj.ForceInsideOut = False
obj.FinishingProfile = True
obj.Stopped = False
obj.StopProcessing = False
obj.HelixAngle = 5

View File

@@ -126,6 +126,11 @@ class TaskPanelOpPage(PathOpGui.TaskPanelPage):
form.ForceInsideOut.setChecked(True)
formLayout.addRow(QtGui.QLabel("Force Clearing Inside-Out"), form.ForceInsideOut)
# Finishing profile
form.FinishingProfile = QtGui.QCheckBox()
form.FinishingProfile.setChecked(True)
formLayout.addRow(QtGui.QLabel("Finishing Profile"), form.FinishingProfile)
layout.addLayout(formLayout)
# stop button
@@ -154,6 +159,7 @@ class TaskPanelOpPage(PathOpGui.TaskPanelPage):
# signals.append(self.form.ProcessHoles.stateChanged)
signals.append(self.form.ForceInsideOut.stateChanged)
signals.append(self.form.FinishingProfile.stateChanged)
signals.append(self.form.StopButton.toggled)
return signals
@@ -173,6 +179,7 @@ class TaskPanelOpPage(PathOpGui.TaskPanelPage):
# self.form.ProcessHoles.setChecked(obj.ProcessHoles)
self.form.ForceInsideOut.setChecked(obj.ForceInsideOut)
self.form.FinishingProfile.setChecked(obj.FinishingProfile)
self.setupToolController(obj, self.form.ToolController)
self.setupCoolant(obj, self.form.coolantController)
self.form.StopButton.setChecked(obj.Stopped)
@@ -201,6 +208,7 @@ class TaskPanelOpPage(PathOpGui.TaskPanelPage):
obj.StockToLeave = self.form.StockToLeave.value()
obj.ForceInsideOut = self.form.ForceInsideOut.isChecked()
obj.FinishingProfile = self.form.FinishingProfile.isChecked()
obj.Stopped = self.form.StopButton.isChecked()
if(obj.Stopped):
self.form.StopButton.setChecked(False) # reset the button