
Here we see the simple use of variables in assignments and calculations. No declaration is required.
The quality is deliberately set to a low value with $fn=10; to get a polygonal rather than a round vase.
The base is made from the hull (hull()) of two cylinders.
Getting the vase watertight was not easy. It required increasing the number of walls and the amount of material. Those settings are made in the slicer.
// outer diameter of upper cylinder
a = 30;
// wall thickness of upper cylinder
b = 3;
// inner diameter of upper cylinder
c = a - b * 2;
// height of upper cylinder
d = 70;
// max. diameter of foot
e = 60;
// height of foot
f = 20;
$fn=10;
difference() {
cylinder(d=a, h=d);
cylinder(d=c, h=d);
}
hull() {
translate([0,0, -2])
cylinder(d=a, h =2);
translate([0, 0, -f-2])
cylinder(d=e, h = 2);
}


