From ecd660ed7e9f3b6fe2ab5e6eaadd426d93863915 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20B=C3=A4hr?= Date: Mon, 13 Feb 2023 20:16:04 +0100 Subject: [PATCH] PD: Fix the internal InvoluteGear's root/tip arc directions The arcs on the tip (around the addendum) and the root (between the fillets) used to have their bulge in the wrong direction for the internal gear profile: their center points has been on the outside. Since this error existed since the very first introcution of the internal gear I assume this was done by accident: Instead of only the fillets, all arcs have been inverted when the external profile was copied. This commit now inverts the tip and root arcs again, to be concentric with the pitch circle -- same as for the external profile. --- src/Mod/PartDesign/PartDesignTests/TestInvoluteGear.py | 2 +- src/Mod/PartDesign/fcgear/involute.py | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/Mod/PartDesign/PartDesignTests/TestInvoluteGear.py b/src/Mod/PartDesign/PartDesignTests/TestInvoluteGear.py index 2dfdbb6d71..a732c5e449 100644 --- a/src/Mod/PartDesign/PartDesignTests/TestInvoluteGear.py +++ b/src/Mod/PartDesign/PartDesignTests/TestInvoluteGear.py @@ -125,7 +125,7 @@ class TestInvoluteGear(unittest.TestCase): root_diameter = pitch_diameter + 2 * ded_coef * m # the test purpose here is just to ensure the gear's parameters are used, # not super precise profile verification. Thus a lax delta is just file here. - delta = 0.1 # FIXME it seems that the top land arc is in the wrong direction, thus a larger tolerance. + delta = 0.01 self.assertIntersection(hub.Shape, makeCircle(pitch_diameter/2), "Expecting intersection at pitch circle") self.assertNoIntersection(hub.Shape, makeCircle(tip_diameter/2 - delta), "Teeth extent below tip circle") self.assertNoIntersection(hub.Shape, makeCircle(root_diameter/2 + delta), "Teeth extend beyond root circle") diff --git a/src/Mod/PartDesign/fcgear/involute.py b/src/Mod/PartDesign/fcgear/involute.py index d749f4b930..4bbafde3d5 100644 --- a/src/Mod/PartDesign/fcgear/involute.py +++ b/src/Mod/PartDesign/fcgear/involute.py @@ -312,11 +312,7 @@ def CreateInternalGear(w, m, Z, phi, if (not tipWithinInvolute): w.line(tip) # line from tip down to base circle - if split: - w.arc(tipR, Ra, 0) # arc across addendum circle - else: - #w.arc(tipR[-1], Ra, 0) # arc across addendum circle - w.arc(tipR, Ra, 0) + w.arc(tipR, Ra, 1) # arc across addendum circle if (not tipWithinInvolute): w.line(invR[0]) # line up to the base circle @@ -329,7 +325,7 @@ def CreateInternalGear(w, m, Z, phi, if (rootNext[1] > rootR[1]): # is there a section of root circle between fillets? w.arc(rootR, fRad, 1) # back fillet - w.arc(rootNext, Rroot, 0) # root circle arc + w.arc(rootNext, Rroot, 1) # root circle arc w.arc(filletNext, fRad, 1)