From a5fb4d884b35d58e95679a519afcf45f19dbc127 Mon Sep 17 00:00:00 2001 From: gizmoplex Date: Sat, 5 Dec 2015 13:41:25 -0500 Subject: [PATCH] Updated gear module to correct calculations for circular_pitch and diametral_pitch. --- involute_gears.scad | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/involute_gears.scad b/involute_gears.scad index 5990e8a..c3afeba 100644 --- a/involute_gears.scad +++ b/involute_gears.scad @@ -315,10 +315,10 @@ module gear ( echo("MCAD ERROR: gear module needs either a diametral_pitch or circular_pitch"); //Convert diametrial pitch to our native circular pitch - circular_pitch = (circular_pitch!=false?circular_pitch:180/diametral_pitch); + circular_pitch = (circular_pitch!=false?circular_pitch:pi/diametral_pitch); // Pitch diameter: Diameter of pitch circle. - pitch_diameter = number_of_teeth * circular_pitch / 180; + pitch_diameter = number_of_teeth * circular_pitch / pi; pitch_radius = pitch_diameter/2; echo ("Teeth:", number_of_teeth, " Pitch radius:", pitch_radius);