diff --git a/docs/lib-rounded_cylinder.md b/docs/lib-rounded_cylinder.md index b50dd4e5..d582b75c 100644 --- a/docs/lib-rounded_cylinder.md +++ b/docs/lib-rounded_cylinder.md @@ -9,7 +9,6 @@ Creates a rounded cylinder. - `round_r` : The sphere radius which fits the edges of the bottom and the top. - `center` : `false` (default), z ranges from 0 to h. `true`, z ranges from -h/2 to +h/2 - `convexity` : See [Rotate Extrude](https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Using_the_2D_Subsystem#Rotate_Extrude) for details. -- `slices` : The fragments of the rounded edge. - `$fa`, `$fs`, `$fn` : Used to control the eight quadrants. Check [the circle module](https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Using_the_2D_Subsystem#circle) for more details. The final fragments of a sphere will be a multiple of 4 to fit edges. ## Examples diff --git a/src/rounded_cylinder.scad b/src/rounded_cylinder.scad index 1933d09b..57471700 100644 --- a/src/rounded_cylinder.scad +++ b/src/rounded_cylinder.scad @@ -13,15 +13,14 @@ include <__private__/__is_vector.scad>; include <__private__/__frags.scad>; -module rounded_cylinder(radius, h, round_r, convexity = 2, center = false, slices = undef) { +module rounded_cylinder(radius, h, round_r, convexity = 2, center = false) { is_vt = __is_vector(radius); r1 = is_vt ? radius[0] : radius; r2 = is_vt ? radius[1] : radius; function is_integer(n) = n % 1 == 0; - function round_frags(sector_angle) = - slices == undef ? __frags(round_r) * sector_angle / 360 : slices; + function round_frags(sector_angle) = __frags(round_r) * sector_angle / 360; function step_a(sector_angle, round_frags) = sector_angle / round_frags;