diff --git a/src/Mod/Path/Gui/Resources/panels/ContourEdit.ui b/src/Mod/Path/Gui/Resources/panels/ContourEdit.ui
index f80fdf98c..d5f3c8c82 100644
--- a/src/Mod/Path/Gui/Resources/panels/ContourEdit.ui
+++ b/src/Mod/Path/Gui/Resources/panels/ContourEdit.ui
@@ -23,7 +23,7 @@
-
- 0
+ 3
@@ -31,7 +31,7 @@
0
0
334
- 318
+ 313
@@ -66,19 +66,6 @@
- -
-
-
- 3
-
-
- 0.100000000000000
-
-
- 1.000000000000000
-
-
-
-
@@ -93,6 +80,16 @@
+ -
+
+
+ 0.000000000000000
+
+
+ mm
+
+
+
@@ -101,7 +98,7 @@
0
0
334
- 318
+ 313
@@ -151,7 +148,7 @@
0
0
334
- 318
+ 313
@@ -209,7 +206,7 @@
0
0
334
- 318
+ 313
@@ -280,35 +277,8 @@
-
-
-
-
-
- Extra Offset
-
-
-
- -
-
-
- -
-
-
- Segment Length
-
-
-
- -
-
-
- -
-
-
- Roll Radius
-
-
-
- -
-
+
-
+
-
@@ -317,8 +287,49 @@
- -
-
+
-
+
+
+ Roll Radius
+
+
+
+ -
+
+
+ Segment Length
+
+
+
+ -
+
+
+ Extra Offset
+
+
+
+ -
+
+
+ -
+
+
+ 0.000000000000000
+
+
+ mm
+
+
+
+ -
+
+
+ 0.000000000000000
+
+
+ mm
+
+
diff --git a/src/Mod/Path/Gui/Resources/panels/PocketEdit.ui b/src/Mod/Path/Gui/Resources/panels/PocketEdit.ui
index edb60bf13..c4ebd835a 100644
--- a/src/Mod/Path/Gui/Resources/panels/PocketEdit.ui
+++ b/src/Mod/Path/Gui/Resources/panels/PocketEdit.ui
@@ -10,6 +10,12 @@
525
+
+
+ 0
+ 0
+
+
0
@@ -23,7 +29,7 @@
-
- 0
+ 5
@@ -34,7 +40,7 @@
0
0
334
- 329
+ 321
@@ -112,7 +118,7 @@
0
0
334
- 329
+ 321
@@ -165,19 +171,6 @@
- -
-
-
- 3
-
-
- 0.100000000000000
-
-
- 1.000000000000000
-
-
-
-
@@ -185,6 +178,16 @@
+ -
+
+
+ 0.000000000000000
+
+
+ mm
+
+
+
@@ -193,7 +196,7 @@
0
0
334
- 329
+ 321
@@ -243,7 +246,7 @@
0
0
334
- 329
+ 321
@@ -257,7 +260,7 @@
0
0
334
- 329
+ 321
@@ -331,7 +334,7 @@
0
0
334
- 329
+ 321
@@ -406,20 +409,35 @@
- -
+
-
-
-
-
-
-
- Material Allowance
-
-
-
- -
-
-
-
+
+
+
+ -
+
+
+ Material Allowance
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Qt::LeftToRight
+
+
+ 0.000000000000000
+
+
+ mm
+
diff --git a/src/Mod/Path/Gui/Resources/panels/ProfileEdgesEdit.ui b/src/Mod/Path/Gui/Resources/panels/ProfileEdgesEdit.ui
index 80ad39a54..200acefd7 100644
--- a/src/Mod/Path/Gui/Resources/panels/ProfileEdgesEdit.ui
+++ b/src/Mod/Path/Gui/Resources/panels/ProfileEdgesEdit.ui
@@ -23,7 +23,7 @@
-
- 0
+ 4
@@ -34,7 +34,7 @@
0
0
334
- 319
+ 313
@@ -111,8 +111,8 @@
0
0
- 168
- 99
+ 334
+ 313
@@ -151,19 +151,6 @@
- -
-
-
- 3
-
-
- 0.100000000000000
-
-
- 1.000000000000000
-
-
-
-
@@ -171,6 +158,22 @@
+ -
+
+
+ 10000.000000000000000
+
+
+ 0.000000000000000
+
+
+ 8
+
+
+ mm
+
+
+
@@ -178,8 +181,8 @@
0
0
- 165
- 70
+ 334
+ 313
@@ -229,7 +232,7 @@
0
0
334
- 319
+ 313
@@ -285,9 +288,9 @@
0
- 0
- 322
- 306
+ -15
+ 320
+ 338
@@ -331,8 +334,18 @@
-
-
-
-
+
-
+
+
+ -
+
+
+ 0.000000000000000
+
+
+ mm
+
+
-
@@ -341,9 +354,6 @@
- -
-
-
-
@@ -351,9 +361,6 @@
- -
-
-
-
@@ -361,7 +368,7 @@
- -
+
-
-
@@ -371,6 +378,16 @@
+ -
+
+
+ 0.000000000000000
+
+
+ mm
+
+
+
diff --git a/src/Mod/Path/Gui/Resources/panels/ProfileEdit.ui b/src/Mod/Path/Gui/Resources/panels/ProfileEdit.ui
index 8238fc685..74293db72 100644
--- a/src/Mod/Path/Gui/Resources/panels/ProfileEdit.ui
+++ b/src/Mod/Path/Gui/Resources/panels/ProfileEdit.ui
@@ -23,7 +23,7 @@
-
- 0
+ 4
@@ -34,7 +34,7 @@
0
0
381
- 353
+ 346
@@ -112,7 +112,7 @@
0
0
381
- 353
+ 346
@@ -151,19 +151,6 @@
- -
-
-
- 3
-
-
- 0.100000000000000
-
-
- 1.000000000000000
-
-
-
-
@@ -171,6 +158,19 @@
+ -
+
+
+ 10000.000000000000000
+
+
+ 0.000000000000000
+
+
+ mm
+
+
+
@@ -179,7 +179,7 @@
0
0
381
- 353
+ 346
@@ -229,7 +229,7 @@
0
0
381
- 353
+ 346
@@ -285,9 +285,9 @@
0
- 0
- 381
- 353
+ -28
+ 367
+ 384
@@ -345,6 +345,13 @@
-
+
-
+
+
+ Plunge Angle
+
+
+
-
@@ -352,9 +359,6 @@
- -
-
-
-
@@ -362,12 +366,6 @@
- -
-
-
- -
-
-
-
@@ -375,15 +373,31 @@
- -
-
-
- Plunge Angle
+
-
+
+
+ -
+
+
+ 0.000000000000000
+
+
+ mm
- -
-
+
-
+
+
+ -
+
+
+ 0.000000000000000
+
+
+ mm
+
+
diff --git a/src/Mod/Path/Gui/Resources/panels/ToolEdit.ui b/src/Mod/Path/Gui/Resources/panels/ToolEdit.ui
index 45a60cb1b..0d18a258f 100644
--- a/src/Mod/Path/Gui/Resources/panels/ToolEdit.ui
+++ b/src/Mod/Path/Gui/Resources/panels/ToolEdit.ui
@@ -7,7 +7,7 @@
0
0
361
- 418
+ 450
@@ -167,19 +167,6 @@
- -
-
-
- mm
-
-
- 0.010000000000000
-
-
- 5.000000000000000
-
-
-
-
@@ -187,13 +174,6 @@
- -
-
-
- mm
-
-
-
-
@@ -201,13 +181,6 @@
- -
-
-
- mm
-
-
-
-
@@ -215,13 +188,6 @@
- -
-
-
- mm
-
-
-
-
@@ -243,16 +209,86 @@
- -
-
-
- mm
+
-
+
+
+ 0 mm
+
+
+ 0.125000000000000
+
+
+ 100.000000000000000
- 0.100000000000000
+ 0.000000000000000
-
- 10.000000000000000
+
+ mm
+
+
+
+ -
+
+
+ 0 mm
+
+
+ 100.000000000000000
+
+
+ 0.000000000000000
+
+
+ mm
+
+
+
+ -
+
+
+ 0 mm
+
+
+ 100.000000000000000
+
+
+ 0.000000000000000
+
+
+ mm
+
+
+
+ -
+
+
+ 0 mm
+
+
+ 100.000000000000000
+
+
+ 0.000000000000000
+
+
+ mm
+
+
+
+ -
+
+
+ 0 mm
+
+
+ 100.000000000000000
+
+
+ 0.000000000000000
+
+
+ mm
@@ -271,6 +307,13 @@
+
+
+ Gui::InputField
+ QLineEdit
+
+
+
diff --git a/src/Mod/Path/PathScripts/PathContour.py b/src/Mod/Path/PathScripts/PathContour.py
index 3e33b6a5e..f113e720f 100644
--- a/src/Mod/Path/PathScripts/PathContour.py
+++ b/src/Mod/Path/PathScripts/PathContour.py
@@ -67,8 +67,8 @@ class ObjectContour:
# Depth Properties
obj.addProperty("App::PropertyDistance", "ClearanceHeight", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","The height needed to clear clamps and obstructions"))
obj.addProperty("App::PropertyDistance", "SafeHeight", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","Rapid Safety Height between locations."))
- obj.addProperty("App::PropertyFloatConstraint", "StepDown", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","Incremental Step Down of Tool"))
- obj.StepDown = (1, 0.01, 1000, 0.5)
+ obj.addProperty("App::PropertyDistance", "StepDown", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","Incremental Step Down of Tool"))
+ #obj.StepDown = (1, 0.01, 1000, 0.5)
obj.addProperty("App::PropertyDistance", "StartDepth", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","Starting Depth of Tool- first cut depth in Z"))
obj.addProperty("App::PropertyDistance", "FinalDepth", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","Final Depth of Tool- lowest value in Z"))
@@ -198,7 +198,7 @@ class ObjectContour:
depthparams = depth_params(
obj.ClearanceHeight.Value,
- obj.SafeHeight.Value, obj.StartDepth.Value, obj.StepDown, 0.0,
+ obj.SafeHeight.Value, obj.StartDepth.Value, obj.StepDown.Value, 0.0,
obj.FinalDepth.Value, None)
PathKurveUtils.profile2(
@@ -447,13 +447,13 @@ class TaskPanel:
if hasattr(self.obj, "ClearanceHeight"):
self.obj.ClearanceHeight = self.form.clearanceHeight.text()
if hasattr(self.obj, "StepDown"):
- self.obj.StepDown = self.form.stepDown.value()
+ self.obj.StepDown = self.form.stepDown.text()
if hasattr(self.obj, "OffsetExtra"):
- self.obj.OffsetExtra = self.form.extraOffset.value()
+ self.obj.OffsetExtra = self.form.extraOffset.text()
if hasattr(self.obj, "SegLen"):
self.obj.SegLen = self.form.segLen.value()
if hasattr(self.obj, "RollRadius"):
- self.obj.RollRadius = self.form.rollRadius.value()
+ self.obj.RollRadius = self.form.rollRadius.text()
if hasattr(self.obj, "PlungeAngle"):
self.obj.PlungeAngle = str(self.form.plungeAngle.value())
if hasattr(self.obj, "UseComp"):
@@ -471,10 +471,10 @@ class TaskPanel:
self.form.finalDepth.setText(str(self.obj.FinalDepth.Value))
self.form.safeHeight.setText(str(self.obj.SafeHeight.Value))
self.form.clearanceHeight.setText(str(self.obj.ClearanceHeight.Value))
- self.form.stepDown.setValue(self.obj.StepDown)
- self.form.extraOffset.setValue(self.obj.OffsetExtra.Value)
+ self.form.stepDown.setText(str(self.obj.StepDown.Value))
+ self.form.extraOffset.setText(str(self.obj.OffsetExtra.Value))
self.form.segLen.setValue(self.obj.SegLen.Value)
- self.form.rollRadius.setValue(self.obj.RollRadius.Value)
+ self.form.rollRadius.setText(str(self.obj.RollRadius.Value))
self.form.plungeAngle.setValue(self.obj.PlungeAngle.Value)
self.form.useCompensation.setChecked(self.obj.UseComp)
self.form.useStartPoint.setChecked(self.obj.UseStartPoint)
diff --git a/src/Mod/Path/PathScripts/PathPocket.py b/src/Mod/Path/PathScripts/PathPocket.py
index fdffa2859..6689e178e 100644
--- a/src/Mod/Path/PathScripts/PathPocket.py
+++ b/src/Mod/Path/PathScripts/PathPocket.py
@@ -65,8 +65,8 @@ class ObjectPocket:
# Depth Properties
obj.addProperty("App::PropertyDistance", "ClearanceHeight", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","The height needed to clear clamps and obstructions"))
obj.addProperty("App::PropertyDistance", "SafeHeight", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","Rapid Safety Height between locations."))
- obj.addProperty("App::PropertyFloatConstraint", "StepDown", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","Incremental Step Down of Tool"))
- obj.StepDown = (0.0, 0.01, 100.0, 0.5)
+ obj.addProperty("App::PropertyDistance", "StepDown", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","Incremental Step Down of Tool"))
+ #obj.StepDown = (0.0, 0.01, 100.0, 0.5)
obj.addProperty("App::PropertyDistance", "StartDepth", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","Starting Depth of Tool- first cut depth in Z"))
obj.addProperty("App::PropertyDistance", "FinalDepth", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","Final Depth of Tool- lowest value in Z"))
obj.addProperty("App::PropertyDistance", "FinishDepth", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","Maximum material removed on final pass."))
@@ -553,9 +553,9 @@ class TaskPanel:
if hasattr(self.obj, "ClearanceHeight"):
self.obj.ClearanceHeight = self.form.clearanceHeight.text()
if hasattr(self.obj, "StepDown"):
- self.obj.StepDown = self.form.stepDown.value()
+ self.obj.StepDown = self.form.stepDown.text()
if hasattr(self.obj, "MaterialAllowance"):
- self.obj.MaterialAllowance = self.form.extraOffset.value()
+ self.obj.MaterialAllowance = self.form.extraOffset.text()
if hasattr(self.obj, "UseStartPoint"):
self.obj.UseStartPoint = self.form.useStartPoint.isChecked()
if hasattr(self.obj, "Algorithm"):
@@ -578,8 +578,8 @@ class TaskPanel:
self.form.finalDepth.setText(str(self.obj.FinalDepth.Value))
self.form.safeHeight.setText(str(self.obj.SafeHeight.Value))
self.form.clearanceHeight.setText(str(self.obj.ClearanceHeight.Value))
- self.form.stepDown.setValue(self.obj.StepDown)
- self.form.extraOffset.setValue(self.obj.MaterialAllowance.Value)
+ self.form.stepDown.setText(str(self.obj.StepDown))
+ self.form.extraOffset.setText(str(self.obj.MaterialAllowance.Value))
self.form.useStartPoint.setChecked(self.obj.UseStartPoint)
self.form.useZigZag.setChecked(self.obj.UseZigZag)
self.form.zigZagUnidirectional.setChecked(self.obj.ZigUnidirectional)
diff --git a/src/Mod/Path/PathScripts/PathProfile.py b/src/Mod/Path/PathScripts/PathProfile.py
index 72e04326e..2ac149e8b 100644
--- a/src/Mod/Path/PathScripts/PathProfile.py
+++ b/src/Mod/Path/PathScripts/PathProfile.py
@@ -68,8 +68,8 @@ class ObjectProfile:
# Depth Properties
obj.addProperty("App::PropertyDistance", "ClearanceHeight", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","The height needed to clear clamps and obstructions"))
obj.addProperty("App::PropertyDistance", "SafeHeight", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","Rapid Safety Height between locations."))
- obj.addProperty("App::PropertyFloatConstraint", "StepDown", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","Incremental Step Down of Tool"))
- obj.StepDown = (1, 0.01, 1000, 0.5)
+ obj.addProperty("App::PropertyDistance", "StepDown", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","Incremental Step Down of Tool"))
+ #obj.StepDown = (1, 0.01, 1000, 0.5)
obj.addProperty("App::PropertyDistance", "StartDepth", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","Starting Depth of Tool- first cut depth in Z"))
obj.addProperty("App::PropertyDistance", "FinalDepth", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","Final Depth of Tool- lowest value in Z"))
@@ -96,8 +96,8 @@ class ObjectProfile:
obj.addProperty("App::PropertyDistance", "OffsetExtra", "Profile", QtCore.QT_TRANSLATE_NOOP("App::Property","Extra value to stay away from final profile- good for roughing toolpath"))
obj.addProperty("App::PropertyLength", "SegLen", "Profile", QtCore.QT_TRANSLATE_NOOP("App::Property","Tesselation value for tool paths made from beziers, bsplines, and ellipses"))
obj.addProperty("App::PropertyAngle", "PlungeAngle", "Profile", QtCore.QT_TRANSLATE_NOOP("App::Property","Plunge angle with which the tool enters the work piece. Straight down is 90 degrees, if set small enough or zero the tool will descent exactly one layer depth down per turn"))
- obj.addProperty("App::PropertyBool", "processHoles", "Profile", QtCore.QT_TRANSLATE_NOOP("App::Property","Profile holes as well as the outline"))
- obj.addProperty("App::PropertyBool", "processPerimeter", "Profile", QtCore.QT_TRANSLATE_NOOP("App::Property","Profile the outline"))
+ obj.addProperty("App::PropertyBool", "processHoles", "Profile", QtCore.QT_TRANSLATE_NOOP("App::Property","Profile holes as well as the outline"))
+ obj.addProperty("App::PropertyBool", "processPerimeter", "Profile", QtCore.QT_TRANSLATE_NOOP("App::Property","Profile the outline"))
obj.addProperty("App::PropertyVectorList", "locs", "Tags", QtCore.QT_TRANSLATE_NOOP("App::Property","List of holding tag locations"))
@@ -165,7 +165,7 @@ class ObjectProfile:
obj.Base = baselist
self.execute(obj)
- def _buildPathLibarea(self, obj, edgelist, isHole):
+ def _buildPathLibarea(self, obj, edgelist, isHole):
import PathScripts.PathKurveUtils as PathKurveUtils
import math
import area
@@ -194,7 +194,7 @@ class ObjectProfile:
output = ""
output += "G0 Z" + str(obj.ClearanceHeight.Value) + "F " + PathUtils.fmt(self.vertRapid) + "\n"
- curve = PathKurveUtils.makeAreaCurve(edgelist, direction, startpoint, endpoint)
+ curve = PathKurveUtils.makeAreaCurve(edgelist, direction, startpoint, endpoint)
'''The following line uses a profile function written for use with FreeCAD. It's clean but incomplete. It doesn't handle
print "x = " + str(point.x)
@@ -230,7 +230,7 @@ print "y - " + str(point.y)
depthparams = depth_params(
obj.ClearanceHeight.Value,
- obj.SafeHeight.Value, obj.StartDepth.Value, obj.StepDown, 0.0,
+ obj.SafeHeight.Value, obj.StartDepth.Value, obj.StepDown.Value, 0.0,
obj.FinalDepth.Value, None)
PathKurveUtils.profile2(
@@ -495,13 +495,13 @@ class TaskPanel:
if hasattr(self.obj, "ClearanceHeight"):
self.obj.ClearanceHeight = self.form.clearanceHeight.text()
if hasattr(self.obj, "StepDown"):
- self.obj.StepDown = self.form.stepDown.value()
+ self.obj.StepDown = self.form.stepDown.text()
if hasattr(self.obj, "OffsetExtra"):
- self.obj.OffsetExtra = self.form.extraOffset.value()
+ self.obj.OffsetExtra = self.form.extraOffset.text()
if hasattr(self.obj, "SegLen"):
self.obj.SegLen = self.form.segLen.value()
if hasattr(self.obj, "RollRadius"):
- self.obj.RollRadius = self.form.rollRadius.value()
+ self.obj.RollRadius = self.form.rollRadius.text()
if hasattr(self.obj, "PlungeAngle"):
self.obj.PlungeAngle = str(self.form.plungeAngle.value())
if hasattr(self.obj, "UseComp"):
@@ -525,10 +525,10 @@ class TaskPanel:
self.form.finalDepth.setText(str(self.obj.FinalDepth.Value))
self.form.safeHeight.setText(str(self.obj.SafeHeight.Value))
self.form.clearanceHeight.setText(str(self.obj.ClearanceHeight.Value))
- self.form.stepDown.setValue(self.obj.StepDown)
- self.form.extraOffset.setValue(self.obj.OffsetExtra.Value)
+ self.form.stepDown.setText(str(self.obj.StepDown))
+ self.form.extraOffset.setText(str(self.obj.OffsetExtra.Value))
self.form.segLen.setValue(self.obj.SegLen.Value)
- self.form.rollRadius.setValue(self.obj.RollRadius.Value)
+ self.form.rollRadius.setText(str(self.obj.RollRadius.Value))
self.form.plungeAngle.setValue(self.obj.PlungeAngle.Value)
self.form.useCompensation.setChecked(self.obj.UseComp)
self.form.useStartPoint.setChecked(self.obj.UseStartPoint)
diff --git a/src/Mod/Path/PathScripts/PathProfileEdges.py b/src/Mod/Path/PathScripts/PathProfileEdges.py
index a56a21440..2c71d6adf 100644
--- a/src/Mod/Path/PathScripts/PathProfileEdges.py
+++ b/src/Mod/Path/PathScripts/PathProfileEdges.py
@@ -70,8 +70,8 @@ class ObjectProfile:
# Depth Properties
obj.addProperty("App::PropertyDistance", "ClearanceHeight", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","The height needed to clear clamps and obstructions"))
obj.addProperty("App::PropertyDistance", "SafeHeight", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","Rapid Safety Height between locations"))
- obj.addProperty("App::PropertyFloatConstraint", "StepDown", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","Incremental Step Down of Tool"))
- obj.StepDown = (1, 0.01, 1000, 0.5)
+ obj.addProperty("App::PropertyDistance", "StepDown", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","Incremental Step Down of Tool"))
+ #obj.StepDown = (1, 0.01, 1000, 0.5)
obj.addProperty("App::PropertyDistance", "StartDepth", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","Starting Depth of Tool- first cut depth in Z"))
obj.addProperty("App::PropertyDistance", "FinalDepth", "Depth", QtCore.QT_TRANSLATE_NOOP("App::Property","Final Depth of Tool- lowest value in Z"))
@@ -226,7 +226,7 @@ print "y - " + str(point.y)
depthparams = depth_params(
obj.ClearanceHeight.Value,
- obj.SafeHeight.Value, obj.StartDepth.Value, obj.StepDown, 0.0,
+ obj.SafeHeight.Value, obj.StartDepth.Value, obj.StepDown.Value, 0.0,
obj.FinalDepth.Value, None)
PathKurveUtils.profile2(
@@ -482,13 +482,13 @@ class TaskPanel:
if hasattr(self.obj, "ClearanceHeight"):
self.obj.ClearanceHeight = self.form.clearanceHeight.text()
if hasattr(self.obj, "StepDown"):
- self.obj.StepDown = self.form.stepDown.value()
+ self.obj.StepDown = self.form.stepDown.text()
if hasattr(self.obj, "OffsetExtra"):
- self.obj.OffsetExtra = self.form.extraOffset.value()
+ self.obj.OffsetExtra = self.form.extraOffset.text()
if hasattr(self.obj, "SegLen"):
self.obj.SegLen = self.form.segLen.value()
if hasattr(self.obj, "RollRadius"):
- self.obj.RollRadius = self.form.rollRadius.value()
+ self.obj.RollRadius = self.form.rollRadius.text()
if hasattr(self.obj, "PlungeAngle"):
self.obj.PlungeAngle = str(self.form.plungeAngle.value())
if hasattr(self.obj, "UseComp"):
@@ -510,10 +510,10 @@ class TaskPanel:
self.form.finalDepth.setText(str(self.obj.FinalDepth.Value))
self.form.safeHeight.setText(str(self.obj.SafeHeight.Value))
self.form.clearanceHeight.setText(str(self.obj.ClearanceHeight.Value))
- self.form.stepDown.setValue(self.obj.StepDown)
- self.form.extraOffset.setValue(self.obj.OffsetExtra.Value)
+ self.form.stepDown.setText(str(self.obj.StepDown.Value))
+ self.form.extraOffset.setText(str(self.obj.OffsetExtra.Value))
self.form.segLen.setValue(self.obj.SegLen.Value)
- self.form.rollRadius.setValue(self.obj.RollRadius.Value)
+ self.form.rollRadius.setText(str(self.obj.RollRadius.Value))
self.form.plungeAngle.setValue(self.obj.PlungeAngle.Value)
self.form.useCompensation.setChecked(self.obj.UseComp)
self.form.useStartPoint.setChecked(self.obj.UseStartPoint)
diff --git a/src/Mod/Path/PathScripts/PathToolLibraryManager.py b/src/Mod/Path/PathScripts/PathToolLibraryManager.py
index f252b06fc..67103a513 100644
--- a/src/Mod/Path/PathScripts/PathToolLibraryManager.py
+++ b/src/Mod/Path/PathScripts/PathToolLibraryManager.py
@@ -190,6 +190,23 @@ class ToolLibraryManager():
headers = ["","Tool Num.","Name","Tool Type","Material","Diameter","Length Offset","Flat Radius","Corner Radius","Cutting Edge Angle","Cutting Edge Height"]
model = QtGui.QStandardItemModel()
model.setHorizontalHeaderLabels(headers)
+
+ def unitconv(ivalue):
+ parms = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Units")
+ digits = parms.GetContents()[1][2] #get user's number of digits of precision
+ if parms.GetContents()[0][2]==0:
+ suffix = 'mm'
+ conversion = 1.0
+ elif parms.GetContents()[0][2]==3:
+ suffix = 'in'
+ conversion = 25.4
+ else:
+ suffix = ''
+ val = FreeCAD.Units.parseQuantity(str(round(ivalue/conversion,digits))+suffix)
+ displayed_val = val.UserString #just the displayed value-not the internal one
+
+ return displayed_val
+
if tt:
if len(tt.Tools) == 0:
tooldata.append([])
@@ -201,12 +218,12 @@ class ToolLibraryManager():
itemName = QtGui.QStandardItem(t.Name)
itemToolType = QtGui.QStandardItem(t.ToolType)
itemMaterial = QtGui.QStandardItem(t.Material)
- itemDiameter = QtGui.QStandardItem(str(t.Diameter))
- itemLengthOffset = QtGui.QStandardItem(str(t.LengthOffset))
- itemFlatRadius = QtGui.QStandardItem(str(t.FlatRadius))
- itmCornerRadius = QtGui.QStandardItem(str(t.CornerRadius))
+ itemDiameter = QtGui.QStandardItem(unitconv(t.Diameter))
+ itemLengthOffset = QtGui.QStandardItem(unitconv(t.LengthOffset))
+ itemFlatRadius = QtGui.QStandardItem(unitconv(t.FlatRadius))
+ itmCornerRadius = QtGui.QStandardItem(unitconv(t.CornerRadius))
itemCuttingEdgeAngle = QtGui.QStandardItem(str(t.CuttingEdgeAngle))
- itemCuttingEdgeHeight = QtGui.QStandardItem(str(t.CuttingEdgeHeight))
+ itemCuttingEdgeHeight = QtGui.QStandardItem(unitconv(t.CuttingEdgeHeight))
row = [itemcheck, itemNumber, itemName, itemToolType, itemMaterial, itemDiameter, itemLengthOffset, itemFlatRadius, itmCornerRadius, itemCuttingEdgeAngle, itemCuttingEdgeHeight]
model.appendRow(row)
@@ -397,12 +414,12 @@ class EditorPanel():
t.Name = str(editform.NameField.text())
t.ToolType = self.getType(editform.TypeField.currentIndex())
t.Material = self.getMaterial(editform.MaterialField.currentIndex())
- t.Diameter = editform.DiameterField.value()
- t.LengthOffset = editform.LengthOffsetField.value()
- t.FlatRadius = editform.FlatRadiusField.value()
- t.CornerRadius = editform.CornerRadiusField.value()
+ t.Diameter = FreeCAD.Units.parseQuantity(editform.DiameterField.text())
+ t.LengthOffset = FreeCAD.Units.parseQuantity(editform.LengthOffsetField.text())
+ t.FlatRadius = FreeCAD.Units.parseQuantity(editform.FlatRadiusField.text())
+ t.CornerRadius = FreeCAD.Units.parseQuantity(editform.CornerRadiusField.text())
t.CuttingEdgeAngle = editform.CuttingEdgeAngleField.value()
- t.CuttingEdgeHeight = editform.CuttingEdgeHeightField.value()
+ t.CuttingEdgeHeight = FreeCAD.Units.parseQuantity(editform.CuttingEdgeHeightField.text())
listname = self.form.listView.selectedIndexes()[0].data()
if self.TLM.addnew(listname, t) is True:
@@ -463,12 +480,12 @@ class EditorPanel():
editform.NameField.setText(tool.Name)
editform.TypeField.setCurrentIndex(self.getType(tool.ToolType))
editform.MaterialField.setCurrentIndex(self.getMaterial(tool.Material))
- editform.DiameterField.setValue(tool.Diameter)
- editform.LengthOffsetField.setValue(tool.LengthOffset)
- editform.FlatRadiusField.setValue(tool.FlatRadius)
- editform.CornerRadiusField.setValue(tool.CornerRadius)
+ editform.DiameterField.setText(str(tool.Diameter))
+ editform.LengthOffsetField.setText(str(tool.LengthOffset))
+ editform.FlatRadiusField.setText(str(tool.FlatRadius))
+ editform.CornerRadiusField.setText(str(tool.CornerRadius))
editform.CuttingEdgeAngleField.setValue(tool.CuttingEdgeAngle)
- editform.CuttingEdgeHeightField.setValue(tool.CuttingEdgeHeight)
+ editform.CuttingEdgeHeightField.setText(str(tool.CuttingEdgeHeight))
r = editform.exec_()
if r:
@@ -476,12 +493,12 @@ class EditorPanel():
tool.Name = str(editform.NameField.text())
tool.ToolType = self.getType(editform.TypeField.currentIndex())
tool.Material = self.getMaterial(editform.MaterialField.currentIndex())
- tool.Diameter = editform.DiameterField.value()
- tool.LengthOffset = editform.LengthOffsetField.value()
- tool.FlatRadius = editform.FlatRadiusField.value()
- tool.CornerRadius = editform.CornerRadiusField.value()
+ tool.Diameter = FreeCAD.Units.parseQuantity(editform.DiameterField.text())
+ tool.LengthOffset = FreeCAD.Units.parseQuantity(editform.LengthOffsetField.text())
+ tool.FlatRadius = FreeCAD.Units.parseQuantity(editform.FlatRadiusField.text())
+ tool.CornerRadius = FreeCAD.Units.parseQuantity(editform.CornerRadiusField.text())
tool.CuttingEdgeAngle = editform.CuttingEdgeAngleField.value()
- tool.CuttingEdgeHeight = editform.CuttingEdgeHeightField.value()
+ tool.CuttingEdgeHeight = FreeCAD.Units.parseQuantity(editform.CuttingEdgeHeightField.text())
if self.TLM.updateTool(listname, toolnum, tool) is True:
self.loadTable(self.form.listView.selectedIndexes()[0])