Updated gear module to correctly display error message when neither circular_pitch or diametral_pitch parameters are
specified. Previous method of testing for false value did not work because circular_pitch is reassigned and becomes undef when diametral_pitch is false.
This commit is contained in:
parent
5ff8ce964c
commit
73909f3a0f
|
@ -310,7 +310,8 @@ module gear (
|
||||||
involute_facets=0,
|
involute_facets=0,
|
||||||
flat=false)
|
flat=false)
|
||||||
{
|
{
|
||||||
if (circular_pitch==false && diametral_pitch==false)
|
// Check for undefined circular pitch (happens when neither circular_pitch or diametral_pitch are specified)
|
||||||
|
if (circular_pitch==undef)
|
||||||
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
|
||||||
|
|
Loading…
Reference in a new issue