Updated gear module to correct calculations for circular_pitch and diametral_pitch.
This commit is contained in:
parent
73909f3a0f
commit
a5fb4d884b
|
@ -315,10 +315,10 @@ module gear (
|
||||||
echo("MCAD ERROR: gear module needs either a diametral_pitch or circular_pitch");
|
echo("MCAD ERROR: gear module needs either a diametral_pitch or circular_pitch");
|
||||||
|
|
||||||
//Convert diametrial pitch to our native 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: 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;
|
pitch_radius = pitch_diameter/2;
|
||||||
echo ("Teeth:", number_of_teeth, " Pitch radius:", pitch_radius);
|
echo ("Teeth:", number_of_teeth, " Pitch radius:", pitch_radius);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue