```
// https://agweber.net/3d/snippets.html
module rcube(size=[25,25,25], roundness=5) {
x = size[0]-roundness*2;
y = size[1]-roundness*2;
z = size[2]-roundness*2;
translate([roundness, roundness, roundness]) minkowski() {
cube([x,y,z]);
sphere(r=roundness);
}
}
```

cylinder. Set the $fn argument for both to the same value if you want a normal facetted edge.

```
// https://agweber.net/3d/snippets.html
module rcyl(r=20, h=50, roundness=5) {
translate([0,0,roundness]) minkowski() {
cylinder(r=r-roundness, h=h-roundness*2);
sphere(r=roundness);
}
}
```

```
// https://agweber.net/3d/snippets.html
module pill(r=5, h=20, roundness=5) {
s = r/roundness;
translate([0,0,roundness]) hull() {
scale([s,s,1]) sphere(r=roundness);
translate([0,0,h-roundness*2]) scale([s,s,1]) sphere(r=roundness);
}
}
```

```
// https://agweber.net/3d/snippets.html
module paracyl(r1=15, r2=5, h=20) {
s = r2/(r1-r2);
difference() {
cylinder(r1=r1, r2=r2, h=h);
color([.25,.5,.8,.4]) scale([s,s,1])
translate([0,0,h]) rotate_extrude()
translate([h+(r1-r2), 0, 0]) circle(r = h);
}
}
```