From cdbfe0217c1db1ab516db06f6bd6661586d037d6 Mon Sep 17 00:00:00 2001 From: Revar Desmera Date: Mon, 19 Jun 2023 22:36:13 -0700 Subject: [PATCH] Corrected helical gear twist calculation. --- gears.scad | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gears.scad b/gears.scad index ba1621b..eb7b7be 100644 --- a/gears.scad +++ b/gears.scad @@ -198,7 +198,7 @@ function spur_gear( p = pitch_radius(pitch, teeth), c = outer_radius(pitch, teeth, clearance, interior), r = _root_radius(pitch, teeth, clearance, interior), - twist = atan2(thickness*tan(helical),p), + twist = 360*thickness*tan(helical)/(2*PI*p), rgn = [ spur_gear2d( pitch = pitch, @@ -237,7 +237,7 @@ module spur_gear( p = pitch_radius(pitch, teeth); c = outer_radius(pitch, teeth, clearance, interior); r = _root_radius(pitch, teeth, clearance, interior); - twist = atan2(thickness*tan(helical),p); + twist = 360*thickness*tan(helical)/(2*PI*p); attachable(anchor,spin,orient, r=p, l=thickness) { zrot(twist/2) linear_extrude(