$fn=64; // --- Parameters --- base_width = 160; // Width of the bin at the bottom base_depth = 120; // Depth of the bin at the bottom top_width = 200; // Width of the bin at the top (flared) top_depth = 160; // Depth of the bin at the top height = 140; // Total height of the bin wall_thickness = 3; // Thickness of the walls and base corner_radius = 15; // Radius of the rounded corners // --- Main Rendering --- difference() { // 1. Outer Bin Body with Top Rim union() { // Main body bin_shape(base_width, base_depth, top_width, top_depth, height, corner_radius); // Top lip/rim for structural strength translate([0, 0, height - 5]) bin_shape(top_width + 4, top_depth + 4, top_width + 4, top_depth + 4, 5, corner_radius + 2); } // 2. Inner Hollow (Subtracted) translate([0, 0, wall_thickness]) bin_shape( base_width - (wall_thickness * 2), base_depth - (wall_thickness * 2), top_width - (wall_thickness * 2), top_depth - (wall_thickness * 2), height + 2, // Extend past top to cut cleanly and prevent Z-fighting corner_radius - wall_thickness ); // 3. Bone-shaped Handle Cutouts (Front and Back) translate([0, 0, height - 30]) bone_handle(); } // --- Modules --- // Generates a flared, rounded rectangular prism module bin_shape(w_base, d_base, w_top, d_top, h, r) { hull() { for(x = [-1, 1], y = [-1, 1]) { // Bottom corners translate([x * (w_base/2 - r), y * (d_base/2 - r), 0]) cylinder(r=r, h=0.1); // Top corners translate([x * (w_top/2 - r), y * (d_top/2 - r), h - 0.1]) cylinder(r=r, h=0.1); } } } // Generates a 3D bone shape to be used as a cutter for the handles module bone_handle() { rotate([90, 0, 0]) linear_extrude(height = top_depth + 50, center = true) { union() { // Center bar hull() { translate([-20, 0]) circle(r=6); translate([20, 0]) circle(r=6); } // Left bone joints translate([-24, 6]) circle(r=8); translate([-24, -6]) circle(r=8); // Right bone joints translate([24, 6]) circle(r=8); translate([24, -6]) circle(r=8); } } }