mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-07-31 12:00:23 +02:00
refactored
This commit is contained in:
@@ -18,14 +18,19 @@ include <__private__/__half_trapezium.scad>;
|
||||
module rounded_cylinder(radius, h, round_r, convexity = 2, center = false) {
|
||||
r_corners = __half_trapezium(radius, h, round_r);
|
||||
|
||||
translate(center ? [0, 0, 0] : [0, 0, h/2])
|
||||
rotate(180)
|
||||
rotate_extrude(convexity = convexity)
|
||||
polygon(
|
||||
concat(
|
||||
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(shape_pts);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user