$fn = 64; // --- Parameters --- width = 80; depth = 100; height = 100; wall = 2; clearance = 0.6; pin_d = 2.5; // Diameter for filament or metal hinge pin // Derived geometry values hinge_y = wall + 8; hinge_z = wall + 8; // Max radius of the bin's curved back to clear the housing ceiling R_outer = height - wall - hinge_z - 1.5; // --- Modules --- module housing() { difference() { // Main block cube([width, depth, height]); // Inner cavity (open front) translate([wall, -1, wall]) cube([width - 2*wall, depth, height - 2*wall]); // Hinge hole (goes all the way through) translate([-1, hinge_y, hinge_z]) rotate([0, 90, 0]) cylinder(d=pin_d, h=width + 2); // Thumb access notch in the top cover translate([width/2, 0, height]) cylinder(d=35, h=wall*3, center=true); } } module bin() { bin_w = width - 2*wall - 2*clearance; bin_bottom = wall + clearance; difference() { // Main solid body (intersection of bounding box and cylinder) intersection() { translate([0, 0, bin_bottom]) cube([bin_w, depth, height]); translate([0, hinge_y, hinge_z]) rotate([0, 90, 0]) cylinder(r=R_outer, h=bin_w); } // Hollow interior intersection() { translate([wall, wall, bin_bottom + wall]) cube([bin_w - 2*wall, depth, height]); translate([-1, hinge_y, hinge_z]) rotate([0, 90, 0]) cylinder(r=R_outer - wall, h=bin_w + 2); } // Hinge hole translate([-1, hinge_y, hinge_z]) rotate([0, 90, 0]) cylinder(d=pin_d, h=bin_w + 2); // Thumb notch in front face translate([bin_w/2, -1, hinge_z + R_outer]) rotate([-90, 0, 0]) cylinder(d=30, h=wall + 4); // Front-bottom chamfer to clear the housing floor during tilt translate([-1, 0, bin_bottom]) rotate([45, 0, 0]) translate([0, -10, -10]) cube([bin_w + 2, 20, 20]); } // Stopper bump (limits tilt angle by catching on the housing ceiling) translate([0, hinge_y, hinge_z]) rotate([-40, 0, 0]) translate([0, -2, R_outer - 1]) cube([bin_w, 4, 3]); } // --- Print Layout --- // Parts are laid out side-by-side for easy, support-free printing. // Assemble by sliding the bin into the housing and inserting a pin/filament. housing(); translate([width + 15, 0, 0]) bin();