threads-scad
threads-scad copied to clipboard
Safeguards for undef to avoid long computations
If one of the parameters of the modules is undef, it can take for ever to return because of undefined value propagations.
For example :
ScrewThread(12, undef, pitch=0, tooth_angle=30, tolerance=0.4, tip_height=0, tooth_height=0, tip_min_fract=0);
Adding asserts or is_num tests at the relevant points should suffice to avoid it at very low cost.
I just ran into this as well. Happy to open a PR for at least a couple obvious ones.