//Test tube lamp to base adaptor. Big Clive 4th Jan 2020.
difference(){
union(){
//We start by adding solid objects to make the overall shape.
//Larger upper cylindrical section that goes into base.
//25mm (12.5mm radius) to fit existing lamp base.
translate([0, 0, 0])
cylinder(h = 10, r1 = 12.5,r2 = 12.5);
//Smaller cylindrical section that goes into lower base area.
translate([0, 0, -10])
cylinder(h = 8, r1 = 10.5,r2 = 10.5);
//Slight taper section between two cylindrical sections.
//(Mainly for support during printing.)
translate([0, 0, -2])
cylinder(h = 2, r1 = 10.5,r2 = 12.5);
// Squashed sphere to create rounded rim.
translate([0, 0, 12])
scale([1, 1, 0.33])
sphere(r=15);
}
//Now we're removing bits from the solid object.
//18.5mm (9.25mm radius) hole through middle for test tube.
translate([0, 0, -14])
cylinder(h = 50, r1 = 9.25,r2 = 9.25);
//Slight inner recess at top to hide oozed glue.
translate([0, 0, 9])
cylinder(h = 10, r1 = 10.5,r2 = 10.5);
}