
Five of these beauties, printed in silver PETG, protect our round fence posts from the rain.
On the OpenSCAD side there's nothing fundamentally new here … using variables, moving objects relative to the origin with translate, and "hollowing out" with difference().
// diameter inner lower
dil=98;
// diameter inner upper
diu=88;
// height between inner lower & inner upper
hiliu = 10;
// diameter outer lower
dol=105;
// diameter outer upper
dou=30;
// height cap
hc = 10;
// height base cylinder
hl = 10;
// diameter hole in cap
dh = 2;
$fn=100;
// cap
difference() {
translate([0,0,hiliu])
cylinder(d1=dol,d2=dou,h=hc);
// hole in cap
translate([0,0,hiliu])
cylinder(d=dh,h=hc);
}
// middle
difference() {
cylinder(d=dol,h=hiliu);
cylinder(d1=dil,d2=diu,h=hiliu);
}
// base cylinder
difference() {
translate([0,0,-hl])
cylinder(d=dol,h=hl);
translate([0,0,-hl])
cylinder(d=dil,h=hl);
}
And this is what the printed caps look like:



