diff --git a/src/Mod/Path/CMakeLists.txt b/src/Mod/Path/CMakeLists.txt
index 94d250bdf7..1d80c40c3d 100644
--- a/src/Mod/Path/CMakeLists.txt
+++ b/src/Mod/Path/CMakeLists.txt
@@ -288,7 +288,6 @@ SET(PathTests_SRCS
PathTests/TestMach3Mach4Post.py
PathTests/TestPathAdaptive.py
PathTests/TestPathCore.py
- PathTests/TestPathDeburr.py
PathTests/TestPathDepthParams.py
PathTests/TestPathDressupDogbone.py
PathTests/TestPathDressupDogboneII.py
@@ -302,6 +301,7 @@ SET(PathTests_SRCS
PathTests/TestPathHelixGenerator.py
PathTests/TestPathLanguage.py
PathTests/TestPathLog.py
+ PathTests/TestPathOpDeburr.py
PathTests/TestPathOpUtil.py
PathTests/TestPathPost.py
PathTests/TestPathPreferences.py
diff --git a/src/Mod/Path/Gui/Resources/panels/PageOpDeburrEdit.ui b/src/Mod/Path/Gui/Resources/panels/PageOpDeburrEdit.ui
index 5e05f83cbe..1941e4c923 100644
--- a/src/Mod/Path/Gui/Resources/panels/PageOpDeburrEdit.ui
+++ b/src/Mod/Path/Gui/Resources/panels/PageOpDeburrEdit.ui
@@ -185,7 +185,7 @@
- W =
+ W =
@@ -212,7 +212,7 @@
- h =
+ h =
diff --git a/src/Mod/Path/Path/Op/Deburr.py b/src/Mod/Path/Path/Op/Deburr.py
index 9ad1893ac9..3dfcfc614d 100644
--- a/src/Mod/Path/Path/Op/Deburr.py
+++ b/src/Mod/Path/Path/Op/Deburr.py
@@ -96,7 +96,7 @@ def toolDepthAndOffset(width, extraDepth, tool, printInfo):
toolDepth = 0 if Path.Geom.isRoughly(tan, 0) else width / tan
depth = toolDepth + extraDepth
- extraOffset = -width if angle == 180 else (extraDepth / tan)
+ extraOffset = -width if angle == 180 else (extraDepth * tan)
offset = toolOffset + extraOffset
return (depth, offset, extraOffset, suppressInfo)
diff --git a/src/Mod/Path/PathTests/TestPathDeburr.py b/src/Mod/Path/PathTests/TestPathOpDeburr.py
similarity index 87%
rename from src/Mod/Path/PathTests/TestPathDeburr.py
rename to src/Mod/Path/PathTests/TestPathOpDeburr.py
index 62eb793702..7872e3b985 100644
--- a/src/Mod/Path/PathTests/TestPathDeburr.py
+++ b/src/Mod/Path/PathTests/TestPathOpDeburr.py
@@ -36,7 +36,7 @@ class MockToolBit(object):
self.CuttingEdgeAngle = 60
-class TestPathDeburr(PathTestUtils.PathTestBase):
+class TestPathOpDeburr(PathTestUtils.PathTestBase):
def test00(self):
"""Verify chamfer depth and offset for an end mill."""
tool = MockToolBit()
@@ -92,19 +92,33 @@ class TestPathDeburr(PathTestUtils.PathTestBase):
def test03(self):
"""Verify chamfer depth and offset for a 60 deg v-bit with non 0 flat radius."""
tool = MockToolBit()
- tool.FlatRadius = 10
+ tool.FlatRadius = 0.1
tool.CuttingEdgeAngle = 60
- td = 1.73205
-
- (depth, offset, __, info) = PathDeburr.toolDepthAndOffset(1, 0, tool, True)
- self.assertRoughly(td, depth)
- self.assertRoughly(10, offset)
+ (depth, offset, __, info) = PathDeburr.toolDepthAndOffset(1, 0.5, tool, True)
+ self.assertRoughly(2.232051, depth)
+ self.assertRoughly(0.388675, offset)
self.assertFalse(info)
(depth, offset, __, info) = PathDeburr.toolDepthAndOffset(3, 1, tool, True)
- self.assertRoughly(td * 3 + 1, depth)
- self.assertRoughly(10 + td, offset)
+ self.assertRoughly(6.196153, depth)
+ self.assertRoughly(0.677350, offset)
+ self.assertFalse(info)
+
+ def test04(self):
+ """Verify chamfer depth and offset for a 30 deg v-bit with non 0 flat radius."""
+ tool = MockToolBit()
+ tool.FlatRadius = 0.1
+ tool.CuttingEdgeAngle = 30
+
+ (depth, offset, __, info) = PathDeburr.toolDepthAndOffset(1, 0.5, tool, True)
+ self.assertRoughly(4.232051, depth)
+ self.assertRoughly(0.233975, offset)
+ self.assertFalse(info)
+
+ (depth, offset, __, info) = PathDeburr.toolDepthAndOffset(3, 1, tool, True)
+ self.assertRoughly(12.196155, depth)
+ self.assertRoughly(0.367949, offset)
self.assertFalse(info)
def test10(self):
diff --git a/src/Mod/Path/TestPathApp.py b/src/Mod/Path/TestPathApp.py
index 00328d2e59..88fb9307a8 100644
--- a/src/Mod/Path/TestPathApp.py
+++ b/src/Mod/Path/TestPathApp.py
@@ -24,7 +24,6 @@ import TestApp
from PathTests.TestPathAdaptive import TestPathAdaptive
from PathTests.TestPathCore import TestPathCore
-from PathTests.TestPathDeburr import TestPathDeburr
from PathTests.TestPathDepthParams import depthTestCases
from PathTests.TestPathDressupDogbone import TestDressupDogbone
from PathTests.TestPathDressupDogboneII import TestDressupDogboneII
@@ -34,6 +33,7 @@ from PathTests.TestPathDrillGenerator import TestPathDrillGenerator
from PathTests.TestPathGeneratorDogboneII import TestGeneratorDogboneII
from PathTests.TestPathGeom import TestPathGeom
from PathTests.TestPathLanguage import TestPathLanguage
+from PathTests.TestPathOpDeburr import TestPathOpDeburr
# from PathTests.TestPathHelix import TestPathHelix
from PathTests.TestPathHelpers import TestPathHelpers
@@ -82,7 +82,7 @@ False if TestPathLanguage.__name__ else True
False if TestOutputNameSubstitution.__name__ else True
False if TestPathAdaptive.__name__ else True
False if TestPathCore.__name__ else True
-False if TestPathDeburr.__name__ else True
+False if TestPathOpDeburr.__name__ else True
False if TestPathDrillable.__name__ else True
False if TestPathGeom.__name__ else True
False if TestPathHelpers.__name__ else True