From 2ac6093a73f02b5aadc4e98b80980f0a22631c3c Mon Sep 17 00:00:00 2001 From: Adrian Mariano Date: Sun, 31 May 2020 21:49:27 -0400 Subject: [PATCH] Fix apply() to handle degenerate input of empty list. --- affine.scad | 1 + 1 file changed, 1 insertion(+) diff --git a/affine.scad b/affine.scad index 4ad3f1c..c25f667 100644 --- a/affine.scad +++ b/affine.scad @@ -407,6 +407,7 @@ function affine3d_chain(affines, _m=undef, _i=0) = // transformed = apply(rot(45), circle(r=3)); // Rotates 2d circle data by 45 deg // transformed = apply(rot(45)*right(4)*scale(3), circle(r=3)); // Scales, translates and rotates 2d circle data function apply(transform,points) = + points==[] ? [] : is_vector(points) ? apply(transform, [points])[0] : let( tdim = len(transform[0])-1,