From 8c8912ae29f0a2a1036b8c68604ed628fe204d4b Mon Sep 17 00:00:00 2001 From: Revar Desmera Date: Mon, 31 Jul 2023 03:10:41 -0700 Subject: [PATCH] Minor code cleanup in gears.scad --- gears.scad | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/gears.scad b/gears.scad index 01a1671..99403a6 100644 --- a/gears.scad +++ b/gears.scad @@ -2273,6 +2273,8 @@ function _gear_tooth_profile( steps = 16, circ_pitch = circular_pitch(pitch=pitch, circ_pitch=circ_pitch, diam_pitch=diam_pitch, mod=mod), + mod = module_value(circ_pitch=circ_pitch), + clear = default(clearance, 0.25 * mod), // Calculate the important circle radii arad = outer_radius(circ_pitch, teeth, helical=helical, profile_shift=profile_shift, internal=internal), @@ -2280,11 +2282,6 @@ function _gear_tooth_profile( brad = _base_radius(circ_pitch, teeth, pressure_angle, helical=helical), rrad = _root_radius(circ_pitch, teeth, clearance, helical=helical, profile_shift=profile_shift, internal=internal), - adendum = _adendum(circ_pitch=circ_pitch, profile_shift=profile_shift), - dedendum = _dedendum(circ_pitch=circ_pitch, clearance=clearance, profile_shift=profile_shift), - mod = module_value(circ_pitch=circ_pitch), - clear = default(clearance, 0.25 * mod), - srad = max(rrad,brad), tthick = circ_pitch/PI / cos(helical) * (PI/2 + 2*profile_shift * tan(pressure_angle)) - backlash, tang = tthick / prad / 2 * 180 / PI,