openscad / MCAD

OpenSCAD Parametric CAD Library (LGPL 2.1)

Home Page:http://reprap.org/wiki/MCAD

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

involute_gears.scad has improper pitch check

SirNate0 opened this issue · comments

Somehow the check got broken or out of order. The if statement would probably work fine if it were below the ternary operator setting the circular_pitch, or it should check for the diametral_pitch being undef as well.

MCAD/involute_gears.scad

Lines 321 to 325 in bd0a7ba

if (circular_pitch==undef)
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!=undef?circular_pitch:pi/diametral_pitch);