Skip to content

Commit 7c4723c

Browse files
jbaehrlooooo
authored andcommitted
Interpret the backlash as "Circumferential Backlash"
This fixes some unit mismatch, as the backlash is specified as length, but the involute tooth generation code used to interpret it as angular value in radians (no idea why it was additionaly diveded by four; we need the half on each side of the tooth). Now half of the value specified as "backlash" can be directly measured at the pitch circle when comparing each tooth flank of a gear with and without backlash.
1 parent d0e7720 commit 7c4723c

File tree

4 files changed

+15
-8
lines changed

4 files changed

+15
-8
lines changed

freecad/gears/features.py

+8-4
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,8 @@ def add_computed_properties(self, obj):
194194
"computed", "transverse_pitch", 1)
195195

196196
def add_tolerance_properties(self, obj):
197-
obj.addProperty("App::PropertyLength", "backlash", "tolerance", "backlash")
197+
obj.addProperty("App::PropertyLength", "backlash", "tolerance",
198+
"The arc length on the pitch circle by which the tooth thicknes is reduced.")
198199
obj.addProperty("App::PropertyBool", "reversed_backlash", "tolerance", "backlash direction")
199200
obj.addProperty(
200201
"App::PropertyFloat", "clearance", "tolerance", "clearance")
@@ -358,7 +359,8 @@ def add_fillet_properties(self, obj):
358359
obj.addProperty("App::PropertyFloat", "root_fillet", "fillets", "a fillet for the tooth-root, radius = root_fillet x module")
359360

360361
def add_tolerance_properties(self, obj):
361-
obj.addProperty("App::PropertyLength", "backlash", "tolerance", "backlash")
362+
obj.addProperty("App::PropertyLength", "backlash", "tolerance",
363+
"The arc length on the pitch circle by which the tooth thicknes is reduced.")
362364
obj.addProperty("App::PropertyBool", "reversed_backlash", "tolerance", "backlash direction")
363365
obj.addProperty("App::PropertyFloat", "head", "tolerance", "head_value * modul_value = additional length of head")
364366
obj.addProperty("App::PropertyFloat", "clearance", "tolerance", "clearance")
@@ -887,7 +889,8 @@ def add_fillet_properties(self, obj):
887889

888890
def add_tolerance_properties(self, obj):
889891
obj.addProperty("App::PropertyFloat", "clearance", "tolerance", "clearance")
890-
obj.addProperty("App::PropertyLength", "backlash", "tolerance", "backlash in mm")
892+
obj.addProperty("App::PropertyLength", "backlash", "tolerance",
893+
"The arc length on the pitch circle by which the tooth thicknes is reduced.")
891894
obj.addProperty("App::PropertyFloat", "head", "tolerance", "head_value * modul_value = additional length of head")
892895

893896
def add_cycloid_properties(self, obj):
@@ -969,7 +972,8 @@ def __init__(self, obj):
969972
obj.addProperty("App::PropertyFloat", "clearance", "tolerance", "clearance")
970973
obj.addProperty("App::PropertyInteger", "numpoints", "precision", "number of points for spline")
971974
obj.addProperty("App::PropertyBool", "reset_origin", "base", "if value is true the gears outer face will match the z=0 plane")
972-
obj.addProperty("App::PropertyLength", "backlash", "tolerance", "backlash in mm")
975+
obj.addProperty("App::PropertyLength", "backlash", "tolerance",
976+
"The arc length on the pitch circle by which the tooth thicknes is reduced.")
973977
obj.addProperty("App::PropertyPythonObject", "gear", "base", "test")
974978
obj.addProperty("App::PropertyAngle", "beta","helical", "angle used for spiral bevel-gears")
975979
obj.gear = self.bevel_tooth

pygears/bevel_tooth.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ def __init__(self, pressure_angle=70 * pi / 180, pitch_angle=pi / 4, clearance=0
3030
self.z = z
3131
self.clearance = clearance
3232
self.backlash = backlash
33+
self.angular_backlash = backlash / (z * module / 2)
3334
self.module = module
3435

3536
self.involute_end = arccos(
@@ -108,7 +109,7 @@ def involute_points(self, num=10):
108109
intersection_point = intersection_line_circle(xy[i], point, r_cut)
109110
xy = array([intersection_point] + list(xy[i+1:]))
110111
xyz = [[p[0], p[1], 1] for p in xy]
111-
backlash_rot = rotation3D(self.backlash / 4)
112+
backlash_rot = rotation3D(self.angular_backlash / 2)
112113
xyz = backlash_rot(xyz)
113114
return(xyz)
114115

pygears/cycloid_tooth.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ def _calc_gear_factors(self):
4040
self.da = self.d + 2 * (1 + self.head) * self.m
4141
self.di = self.d - 2 * (1 + self.clearance) * self.m
4242
self.phipart = 2 * pi / self.z
43+
self.angular_backlash = self.backlash / (self.d / 2)
4344

4445
def epicycloid_x(self):
4546
def func(t):
@@ -92,7 +93,7 @@ def points(self, num=10):
9293
pts_outer = transpose([pts_outer_x, pts_outer_y])
9394
pts_inner = transpose([pts_inner_x, pts_inner_y])
9495
pts1 = vstack([pts_inner[:-2], pts_outer])
95-
rot = rotation(self.phipart / 4 - self.backlash)
96+
rot = rotation(self.phipart / 4 - self.angular_backlash / 2)
9697
pts1 = rot(pts1)
9798
ref = reflection(0.)
9899
pts2 = ref(pts1)[::-1]

pygears/involute_tooth.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ def _calc_gear_factors(self):
6969
self.involute_rot2 = 1 / self.z * \
7070
(pi / 2 + 2 * self.shift * tan(self.pressure_angle_t))
7171
self.involute_rot = self.involute_rot1 + self.involute_rot2
72+
self.angular_backlash = self.backlash / (self.d / 2)
7273
self.involute_start = 0.
7374
if self.dg <= self.df:
7475
self.involute_start = sqrt(self.df ** 2 - self.dg ** 2) / self.dg
@@ -81,7 +82,7 @@ def undercut_points(self, num=10):
8182
y = array(list(map(fy, pts)))
8283
xy = transpose([x, y])
8384
rotate = rotation(
84-
self.undercut_rot + self.phipart / 2 - self.backlash / 4)
85+
self.undercut_rot + self.phipart / 2 - self.angular_backlash / 2)
8586
xy = rotate(xy)
8687
return(array(xy))
8788

@@ -91,7 +92,7 @@ def involute_points(self, num=10):
9192
x = array(list(map(fx, pts)))
9293
fy = self.involute_function_y()
9394
y = array(list(map(fy, pts)))
94-
rot = rotation(self.involute_rot - self.backlash / 4)
95+
rot = rotation(self.involute_rot - self.angular_backlash / 2)
9596
xy = rot(transpose(array([x, y])))
9697
return(xy)
9798

0 commit comments

Comments
 (0)