From f1a70f62f3b04d77d7c060fbcf9f42fa1b3d288e Mon Sep 17 00:00:00 2001 From: Revar Desmera Date: Sun, 30 Jun 2019 18:09:43 -0700 Subject: [PATCH] Fixed // handling for arcs with negative arc angles. --- shapes2d.scad | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shapes2d.scad b/shapes2d.scad index 5582d9d..d09c585 100644 --- a/shapes2d.scad +++ b/shapes2d.scad @@ -141,7 +141,7 @@ function arc(N, r, angle, d, cp, points, width, thickness, start, wedge=false) = start = is_def(start)? start : is_vector(angle) ? angle[0] : 0, angle = is_vector(angle)? angle[1]-angle[0] : angle, r = get_radius(r=r,d=d), - N = max(3, is_undef(N)? ceil(segs(r)*angle/360) : N), + N = max(3, is_undef(N)? ceil(segs(r)*abs(angle)/360) : N), arcpoints = [for(i=[0:N-1]) let(theta = start + i*angle/(N-1)) r*[cos(theta),sin(theta)]+cp], extra = wedge? [cp] : [] )