Tweaks
This commit is contained in:
@@ -30,6 +30,8 @@ import Path
|
||||
import PathScripts.PathCircularHoleBase as PathCircularHoleBase
|
||||
import PathScripts.PathLog as PathLog
|
||||
import PathScripts.PathOp as PathOp
|
||||
import PathFeedRate
|
||||
|
||||
|
||||
__title__ = "Path Helix Drill Operation"
|
||||
__author__ = "Lorenz Hüdepohl"
|
||||
@@ -170,16 +172,7 @@ class ObjectHelix(PathCircularHoleBase.ObjectOp):
|
||||
PathLog.track()
|
||||
self.commandlist.append(Path.Command("(helix cut operation)"))
|
||||
|
||||
self.commandlist.append(
|
||||
Path.Command("G0", {"Z": obj.ClearanceHeight.Value, "F": self.vertRapid})
|
||||
)
|
||||
|
||||
zsafe = (
|
||||
max(baseobj.Shape.BoundBox.ZMax for baseobj, features in obj.Base)
|
||||
+ obj.ClearanceHeight.Value
|
||||
)
|
||||
output = ""
|
||||
output += "G0 Z" + fmt(zsafe)
|
||||
self.commandlist.append(Path.Command("G0", {"Z": obj.ClearanceHeight.Value}))
|
||||
|
||||
holes = sort_locations(holes, ["x", "y"])
|
||||
|
||||
@@ -205,12 +198,32 @@ class ObjectHelix(PathCircularHoleBase.ObjectOp):
|
||||
endPoint = FreeCAD.Vector(hole["x"], hole["y"], obj.FinalDepth.Value)
|
||||
args["edge"] = Part.makeLine(startPoint, endPoint)
|
||||
|
||||
# move to starting postion
|
||||
self.commandlist.append(
|
||||
Path.Command("G0", {"Z": obj.ClearanceHeight.Value})
|
||||
)
|
||||
self.commandlist.append(
|
||||
Path.Command(
|
||||
"G0",
|
||||
{
|
||||
"X": startPoint.x,
|
||||
"Y": startPoint.y,
|
||||
"Z": obj.ClearanceHeight.Value,
|
||||
},
|
||||
)
|
||||
)
|
||||
self.commandlist.append(
|
||||
Path.Command(
|
||||
"G0", {"X": startPoint.x, "Y": startPoint.y, "Z": startPoint.z}
|
||||
)
|
||||
)
|
||||
|
||||
results = helix_generator.generate(**args)
|
||||
|
||||
for command in results:
|
||||
self.commandlist.append(command)
|
||||
|
||||
PathLog.debug(output)
|
||||
PathFeedRate.setFeedRate(self.commandlist, obj.ToolController)
|
||||
|
||||
|
||||
def SetupProperties():
|
||||
|
||||
@@ -27,6 +27,7 @@ import PathScripts.PathCircularHoleBaseGui as PathCircularHoleBaseGui
|
||||
import PathScripts.PathHelix as PathHelix
|
||||
import PathScripts.PathLog as PathLog
|
||||
import PathScripts.PathOpGui as PathOpGui
|
||||
import PathScripts.PathGui as PathGui
|
||||
from PySide.QtCore import QT_TRANSLATE_NOOP
|
||||
|
||||
translate = FreeCAD.Qt.translate
|
||||
@@ -76,12 +77,13 @@ class TaskPanelOpPage(PathCircularHoleBaseGui.TaskPanelOpPage):
|
||||
def getFields(self, obj):
|
||||
"""getFields(obj) ... transfers values from UI to obj's proprties"""
|
||||
PathLog.track()
|
||||
if obj.Direction != str(self.form.direction.currentText()):
|
||||
obj.Direction = str(self.form.direction.currentText())
|
||||
if obj.StartSide != str(self.form.startSide.currentText()):
|
||||
obj.StartSide = str(self.form.startSide.currentText())
|
||||
if obj.Direction != str(self.form.direction.currentData()):
|
||||
obj.Direction = str(self.form.direction.currentData())
|
||||
if obj.StartSide != str(self.form.startSide.currentData()):
|
||||
obj.StartSide = str(self.form.startSide.currentData())
|
||||
if obj.StepOver != self.form.stepOverPercent.value():
|
||||
obj.StepOver = self.form.stepOverPercent.value()
|
||||
PathGui.updateInputField(obj, "OffsetExtra", self.form.extraOffset)
|
||||
|
||||
self.updateToolController(obj, self.form.toolController)
|
||||
self.updateCoolant(obj, self.form.coolantController)
|
||||
@@ -97,6 +99,8 @@ class TaskPanelOpPage(PathCircularHoleBaseGui.TaskPanelOpPage):
|
||||
self.setupToolController(obj, self.form.toolController)
|
||||
self.setupCoolant(obj, self.form.coolantController)
|
||||
|
||||
self.form.extraOffset.setText(FreeCAD.Units.Quantity(obj.OffsetExtra.Value, FreeCAD.Units.Length).UserString)
|
||||
|
||||
def getSignalsForUpdate(self, obj):
|
||||
"""getSignalsForUpdate(obj) ... return list of signals for updating obj"""
|
||||
signals = []
|
||||
|
||||
Reference in New Issue
Block a user