From 9613a81f15991dd3e47b7a429fc3565d4608d4ca Mon Sep 17 00:00:00 2001 From: Kurt Hutten Date: Tue, 6 Oct 2020 05:39:58 +1100 Subject: [PATCH] Keep polyRound extrude height consistent when r1 changed between a positive and negative radius the height of the extrude would change --- polyround.scad | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/polyround.scad b/polyround.scad index bfd2381..73f63dd 100644 --- a/polyround.scad +++ b/polyround.scad @@ -134,7 +134,7 @@ function extrudePolygonWithRadius(radiiPoints,h=5,r1=1,r2=1,fn=4)= let( // top is the top curved part of the extrude top=makeCurvedPartOfPolyHedron(radiiPoints,r1,fn), - topRadiusPoints=translate3Dcoords(top[0],[0,0,h-r1]), + topRadiusPoints=translate3Dcoords(top[0],[0,0,h-abs(r1)]), singeLayerLength=top[2], topRadiusFaces=top[1], radiusPointsLength=len(topRadiusPoints), // is the same length as bottomRadiusPoints