$fn = 64; // --- Parameters --- holder_width = 140; // Total width of the holder holder_depth = 80; // Total depth of the holder holder_height = 90; // Maximum height (at the back) wall_thickness = 3; // Thickness of the outer walls and dividers comb_slot_depth = 18; // Depth of the rear slot for combs corner_radius = 6; // Radius of the outer corners top_angle = 12; // Angle of the top slant // --- Calculated Variables --- brush_slot_width = (holder_width - (wall_thickness * 3)) / 2; brush_slot_depth = holder_depth - (wall_thickness * 3) - comb_slot_depth; // --- Modules --- // Creates a rectangular block with rounded vertical corners module rounded_rect(w, d, h, r) { hull() { translate([r, r, 0]) cylinder(r=r, h=h); translate([w-r, r, 0]) cylinder(r=r, h=h); translate([r, d-r, 0]) cylinder(r=r, h=h); translate([w-r, d-r, 0]) cylinder(r=r, h=h); } } // --- Main Geometry --- difference() { // 1. Main Solid Body rounded_rect(holder_width, holder_depth, holder_height, corner_radius); // 2. Rear Comb Slot Cutout translate([wall_thickness, holder_depth - wall_thickness - comb_slot_depth, wall_thickness]) rounded_rect( holder_width - (wall_thickness * 2), comb_slot_depth, holder_height + 10, corner_radius / 2 ); // 3. Left Brush Slot Cutout translate([wall_thickness, wall_thickness, wall_thickness]) rounded_rect( brush_slot_width, brush_slot_depth, holder_height + 10, corner_radius / 2 ); // 4. Right Brush Slot Cutout translate([wall_thickness * 2 + brush_slot_width, wall_thickness, wall_thickness]) rounded_rect( brush_slot_width, brush_slot_depth, holder_height + 10, corner_radius / 2 ); // 5. Angled Top Cut translate([-10, holder_depth, holder_height]) rotate([-top_angle, 0, 0]) translate([0, -(holder_depth + 20), 0]) cube([holder_width + 20, holder_depth + 40, holder_height]); // 6. Drainage Holes (Brush Slots) translate([wall_thickness + brush_slot_width / 2, wall_thickness + brush_slot_depth / 2, -1]) cylinder(d=15, h=wall_thickness + 2); translate([wall_thickness * 2 + brush_slot_width * 1.5, wall_thickness + brush_slot_depth / 2, -1]) cylinder(d=15, h=wall_thickness + 2); // 7. Drainage Holes (Comb Slot) for(i = [1 : 3]) { translate([holder_width * (i / 4), holder_depth - wall_thickness - comb_slot_depth / 2, -1]) cylinder(d=10, h=wall_thickness + 2); } }