$fn = 256; od = 21.5; id = 15; h = 2; ep = 0.01; recess = 0.8; tiltAngle = 60; difference() { union() { translate([0, 0, (sin(tiltAngle) * od) / 2]) rotate([0, tiltAngle, 0]) union() { difference() { union() { cylinder(d=od, h=h - recess + ep); // Top protrustion translate([0, 0, h - recess]) cylinder(d1=id + recess*2 + 0.2, d2=id, h=recess); //translate([0, 0, h - recess]) cylinder(d=id, h=recess); } // Bottom cut color("red") translate([0, 0, -ep]) cylinder(d1=id + recess*2 + 0.4, d2=id + 0.4, h=recess); //cylinder(d=id + 0.8, h=recess); } } difference() { translate([-(cos(tiltAngle) * (id - 2)) / 2 + 0.25, -0.4, 0]) cube([cos(tiltAngle) * (id - 2), 0.8, sin(tiltAngle) * od]); color("blue") union() { translate([0, 0, (sin(tiltAngle) * od) / 2]) rotate([0, tiltAngle, 0]) translate([-sin(tiltAngle) * od, -0.5, recess - 0.2]) cube([2 * od, 1, od]); } } translate([0.6, 0, (sin(tiltAngle) * od) / 2 - 1]) rotate([0, tiltAngle, 0]) union() { difference() { color("pink") cylinder(d=od, h=h - recess + ep); color("blue") translate([-1, 0, -ep]) union() { cylinder(d=od, h=h - recess + 3*ep); //translate([-2, (od + 2*ep) / 2, -ep]) translate([-(od / 2) - 2, -(od + 2*ep) / 2, -ep]) cube([od, od + 4*ep, h]); } } } } translate([-od, -od/2, -2]) cube([2 * od, od, 2]); }