$fn = 64; // --- Parameters --- bin_width = 160; bin_depth = 110; bin_height = 80; wall_thickness = 3; corner_radius = 12; // --- Modules --- // Creates a solid rounded box centered on X and Y, sitting on Z=0 module rounded_box(w, d, h, r) { hull() { for(x = [-w/2 + r, w/2 - r]) { for(y = [-d/2 + r, d/2 - r]) { translate([x, y, 0]) cylinder(r=r, h=h); } } } } // Creates a 3D bone shape for cutouts module bone_shape() { linear_extrude(wall_thickness * 4, center=true) { union() { // Main shaft square([30, 12], center=true); // Left knobs translate([-15, 6]) circle(r=7); translate([-15, -6]) circle(r=7); // Right knobs translate([15, 6]) circle(r=7); translate([15, -6]) circle(r=7); } } } // --- Main Assembly --- difference() { // 1. Outer Bin Shape rounded_box(bin_width, bin_depth, bin_height, corner_radius); // 2. Inner Hollow (shifted up by wall_thickness to leave a solid floor) // Height is kept the same so it naturally extends past the top edge translate([0, 0, wall_thickness]) rounded_box( bin_width - (wall_thickness * 2), bin_depth - (wall_thickness * 2), bin_height, corner_radius - wall_thickness ); // 3. Side Handle Cutouts translate([0, 0, bin_height - 18]) { hull() { translate([0, 20, 0]) rotate([0, 90, 0]) cylinder(r=6, h=bin_width + 10, center=true); translate([0, -20, 0]) rotate([0, 90, 0]) cylinder(r=6, h=bin_width + 10, center=true); } } // 4. Front Pet Bone Decoration Cutout translate([0, -bin_depth/2, bin_height/2]) rotate([90, 0, 0]) bone_shape(); // 5. Back Pet Bone Decoration Cutout translate([0, bin_depth/2, bin_height/2]) rotate([90, 0, 0]) bone_shape(); }