diff --git a/src/rounded_cylinder.scad b/src/rounded_cylinder.scad index fc74f7d6..5f32450f 100644 --- a/src/rounded_cylinder.scad +++ b/src/rounded_cylinder.scad @@ -17,15 +17,20 @@ include <__private__/__half_trapezium.scad>; module rounded_cylinder(radius, h, round_r, convexity = 2, center = false) { r_corners = __half_trapezium(radius, h, round_r); + + shape_pts = concat( + [[0, -h/2]], + r_corners, + [[0, h/2]] + ); + + center_pt = center ? [0, 0, 0] : [0, 0, h/2]; translate(center ? [0, 0, 0] : [0, 0, h/2]) rotate(180) rotate_extrude(convexity = convexity) - polygon( - concat( - [[0, -h/2]], - r_corners, - [[0, h/2]] - ) - ); -} \ No newline at end of file + polygon(shape_pts); + + +} +