Change gear module to use 'undef' as default value for circular_pitch and diametral_pitch parameters. This seems to make
more sense than using 'false'.
This commit is contained in:
parent
526aa67e1c
commit
6474be3183
|
@ -295,7 +295,7 @@ module involute_bevel_gear_tooth (
|
||||||
|
|
||||||
module gear (
|
module gear (
|
||||||
number_of_teeth=15,
|
number_of_teeth=15,
|
||||||
circular_pitch=false, diametral_pitch=false,
|
circular_pitch=undef, diametral_pitch=undef,
|
||||||
pressure_angle=28,
|
pressure_angle=28,
|
||||||
clearance = false,
|
clearance = false,
|
||||||
gear_thickness=5,
|
gear_thickness=5,
|
||||||
|
@ -315,7 +315,7 @@ 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:pi/diametral_pitch);
|
circular_pitch = (circular_pitch!=undef?circular_pitch:pi/diametral_pitch);
|
||||||
|
|
||||||
// Calculate default clearance if not specified
|
// Calculate default clearance if not specified
|
||||||
clearance = (clearance!=false?clearance:0.25 * circular_pitch / pi);
|
clearance = (clearance!=false?clearance:0.25 * circular_pitch / pi);
|
||||||
|
|
Loading…
Reference in a new issue