From 30c63fd1658c1421a398cf1e69862ccfa4214379 Mon Sep 17 00:00:00 2001 From: Adrian Mariano Date: Thu, 21 May 2020 15:50:55 -0400 Subject: [PATCH] Changed vnf_vertex_array to gracefully handle degenerate array inputs, and also switched error checking to use new shape functions so it will fail on undefs. --- vnf.scad | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vnf.scad b/vnf.scad index cbf5ef2..a6f716c 100644 --- a/vnf.scad +++ b/vnf.scad @@ -267,17 +267,18 @@ function vnf_vertex_array( ) = assert((!caps)||(caps&&col_wrap)) assert(in_list(style,["default","alt","quincunx"])) + assert(is_consistent(points), "Non-rectangular or invalid point array") let( pts = flatten(points), pcnt = len(pts), rows = len(points), cols = len(points[0]), - errchk = [for (row=points) assert(len(row)==cols, "All rows much have the same number of columns.") 0], cap1 = first_defined([cap1,caps,false]), cap2 = first_defined([cap2,caps,false]), colcnt = cols - (col_wrap?0:1), rowcnt = rows - (row_wrap?0:1) ) + rows<=1 || cols<=1 ? vnf : vnf_merge([ vnf, [ concat(