include; module pipe(radius, thickness, height){ difference () { cylinder(h = height, r = radius, center = true); cylinder(h = height, r = radius - thickness, center = true); } } module crown(r, th, h1, h2, a, e){ union(){ union(){ translate([0,0,h1/2]) pipe(r+th+e/2, th, h1); translate([0,0,h2/2]) pipe(r-th-e/2, th, h2); } union(){ translate([0,0,th/2]) pipe(r + th,3*th,th); translate([0,0,-a/2]) pipe(r + th,th,a); } } } module round_square_window(angle){ difference(){ rotate([0,0,angle]) translate([0,-r,0]) translate([0,0,-a/2]) rotate([90,0,0]) cube([b,b,2*th],center=true); difference(){ translate([-b/2,0,-b/2]) rotate([0,0,angle]) translate([0,-r,0]) translate([0,0,-a/2]) rotate([90,0,0]) cube([2*r1,2*r1,2*th],center=true); translate([-(b/2-r1),0,-(b/2-r1)]) rotate([0,0,angle]) translate([0,-r,0]) translate([0,0,-a/2]) rotate([90,0,0]) cylinder(h=2*th,r=r1,center=true); } difference(){ translate([b/2,0,-b/2]) rotate([0,0,angle]) translate([0,-r,0]) translate([0,0,-a/2]) rotate([90,0,0]) cube([2*r1,2*r1,2*th],center=true); translate([(b/2-r1),0,-(b/2-r1)]) rotate([0,0,angle]) translate([0,-r,0]) translate([0,0,-a/2]) rotate([90,0,0]) cylinder(h=2*th,r=r1,center=true); } difference(){ translate([b/2,0,b/2]) rotate([0,0,angle]) translate([0,-r,0]) translate([0,0,-a/2]) rotate([90,0,0]) cube([2*r1,2*r1,2*th],center=true); translate([(b/2-r1),0,(b/2-r1)]) rotate([0,0,angle]) translate([0,-r,0]) translate([0,0,-a/2]) rotate([90,0,0]) cylinder(h=2*th,r=r1,center=true); } difference(){ translate([-b/2,0,b/2]) rotate([0,0,angle]) translate([0,-r,0]) translate([0,0,-a/2]) rotate([90,0,0]) cube([2*r1,2*r1,2*th],center=true); translate([-(b/2-r1),0,(b/2-r1)]) rotate([0,0,angle]) translate([0,-r,0]) translate([0,0,-a/2]) rotate([90,0,0]) cylinder(h=2*th,r=r1,center=true); } } } $fn=100; //Centimeters e=1; r=90+e/2; h1=50; h2=25; th=5; a=50; b=34; r1=2; difference() { union(){ rotate([0,0,180]) translate([0,-r-th+1,0]) translate([0,0,-a/2]) rotate([90,0,0]) baseplate_no_puzzle(); rotate([0,0,135]) translate([0,-r-th+1,0]) translate([0,0,-a/2]) rotate([90,0,0]) baseplate_no_puzzle(); rotate([0,0,90]) translate([0,-r-th+1,0]) translate([0,0,-a/2]) rotate([90,0,0]) baseplate_no_puzzle(); rotate([0,0,45]) translate([0,-r-th+1,0]) translate([0,0,-a/2]) rotate([90,0,0]) baseplate_no_puzzle(); rotate([0,0,0]) translate([0,-r-th+1,0]) translate([0,0,-a/2]) rotate([90,0,0]) baseplate_no_puzzle(); rotate([0,0,-90]) translate([0,-r-th+1,0]) translate([0,0,-a/2]) rotate([90,0,0]) baseplate_no_puzzle(); crown(r, th, h1, h2, a, e); } union(){ round_square_window(180); round_square_window(135); round_square_window(90); round_square_window(45); round_square_window(0); } }