From b1a8056c51896247461141571ae3fa226a29a7da Mon Sep 17 00:00:00 2001 From: Adrian Mariano Date: Tue, 5 Jan 2021 23:39:07 -0500 Subject: [PATCH] Check N=integer --- shapes2d.scad | 1 + 1 file changed, 1 insertion(+) diff --git a/shapes2d.scad b/shapes2d.scad index 7a94b71..e3cfb3a 100644 --- a/shapes2d.scad +++ b/shapes2d.scad @@ -381,6 +381,7 @@ function arc(N, r, angle, d, cp, points, width, thickness, start, wedge=false, l assert(is_bool(endpoint)) !endpoint ? assert(!wedge, "endpoint cannot be false if wedge is true") slice(arc(N,r,angle,d,cp,points,width,thickness,start,wedge,long,cw,ccw,true),0,-2) : + assert(is_integer(N), "Number of points must be an integer") // First try for 2D arc specified by width and thickness is_def(width) && is_def(thickness)? ( assert(!any_defined([r,cp,points]) && !any([cw,ccw,long]),"Conflicting or invalid parameters to arc")