Rewrote cyl() to avoid minkowski, and allow use of both fillet and chamfer on opposite ends of the same cylinder.

This commit is contained in:
Revar Desmera
2019-03-02 11:14:36 -08:00
parent 31a542b810
commit fd2347dc19
2 changed files with 100 additions and 68 deletions

View File

@@ -396,6 +396,9 @@ function get_radius(r1=undef, r=undef, d1=undef, d=undef, dflt=undef) = (
function first_defined(v) = [for (x = v) if (x!=undef) x][0];
// Returns true if any item in the given array is not undef.
function any_defined(v) = len([for (x = v) if (x!=undef) x])>0;
// If given a vector, returns the vector. If given a scalar, returns [scalar, scalar, scalar]
function scalar_vec(v) = v[0]==undef? [v,v,v] : v;