From e60648dadd99c066f56f2d7caa4129f3c7194bca Mon Sep 17 00:00:00 2001 From: Revar Desmera Date: Wed, 10 Jul 2019 13:03:17 -0700 Subject: [PATCH] Make stroke() assert that path is 2D. --- shapes2d.scad | 1 + 1 file changed, 1 insertion(+) diff --git a/shapes2d.scad b/shapes2d.scad index d09c585..3843430 100644 --- a/shapes2d.scad +++ b/shapes2d.scad @@ -33,6 +33,7 @@ module stroke(path, width=1, endcaps=true, close=false) { $fn = quantup(segs(width/2),4); path = close? concat(path,[path[0]]) : path; + assert(is_list(path) && is_vector(path[0]) && len(path[0])==2, "path must be a 2D list of points."); segments = pair(path); segpairs = pair(segments);