base_x = 70; base_y = 90; base_z = 40; register_d = 10; shape_d = 30; $fn = 50; module shape() { w = shape_d; translate([0, 0, w / -4]) difference() { cylinder(h = w / 2, d1 = w, d2 = w * .8); translate([0, 0, w / 2]) sphere(w / 10); } } module wick() { w = shape_d; d = 2; translate([0, 0, w / 2 - w / 4]) cylinder(h = shape_d * 2, d = d, center = true); } module pouring() { w = shape_d; d = 6; translate([-shape_d * .8 / 2 + d / 2, 0, w / 2 - w / 4]) cylinder(h = shape_d * 2, d1 = d, d2 = 10); } module venting() { w = shape_d; d = 3; translate([shape_d * .8 / 2 - d / 2, 0, w / 2 - w / 4]) cylinder(h = shape_d * 2, d = d); } module base() { cube([base_x, base_y, base_z], center = true); } module slice() { sep = 5; module register() { union() { difference() { cube([base_x, base_y, base_z / 2], center = true); cube([base_x - register_d * 2, base_y - register_d * 2, base_z / 2], center = true); } } translate([base_x / 2 - register_d, 0, 0]) cylinder(h = register_d, d = register_d, $fn = 200); } // bottom translate([base_x / 2 + sep / 2, 0, 0]) union() { difference() { children(); m = base_x; translate([base_x / -2, base_y / -2, 0]) cube([base_x, base_y, base_z]); } register(); } // top translate([(base_x / -2) - sep / 2, 0, 0]) rotate([180, 0, 0]) difference() { children(); m = base_x; translate([base_x / -2, base_y / -2, -base_z]) cube([base_x, base_y, base_z]); register(); } } module mold() { rotate([180, 0, 0]) difference() { cube([(base_x + register_d) * 2, base_y + register_d, base_z], center = true); slice() difference() { base(); rotate([90, 0, 0]) { shape(); wick(); pouring(); venting(); } } } } mold();