Soap dish v1 & v3 tray
by Mach3 ·
(Optional) tray to collect water from soap dish v1 ( https://modelrift.com/models/soap-dish-v1 ) and v3 ( https://modelrift.com/models/soap-dish-v3-radial-lines ) . tolerance: 1mm
Prompt
from this soap dish, create another part which "contains" this dish (to collect water) - remove all the logic of the actual dish and create just its container (tolerance 1mm)
OpenSCAD Code
// Honeycomb Soap Dish - Drip Tray (Container)
// Designed to fit a 135mm x 135mm dish
// --- Parameters ---
dish_width = 135;
dish_height = 135;
dish_depth = 24;
dish_corner_radius = 35;
tolerance = 1.0; // 1mm gap on all sides
wall_thickness = 2.0; // Thickness of the tray walls/bottom
tray_height = 8; // Slightly shorter than dish for easy removal
$fn = 80;
// --- Calculations ---
inner_w = dish_width + (tolerance * 2);
inner_h = dish_height + (tolerance * 2);
inner_r = dish_corner_radius + tolerance;
outer_w = inner_w + (wall_thickness * 2);
outer_h = inner_h + (wall_thickness * 2);
outer_r = inner_r + wall_thickness;
// --- Main Render ---
difference() {
// Outer Body
rounded_square(outer_w, outer_h, tray_height, outer_r);
// Interior Cavity (Hollowed out)
// Shifted up by wall_thickness to leave a solid bottom
translate([0, 0, wall_thickness])
rounded_square(inner_w, inner_h, tray_height, inner_r);
}
// --- Modules ---
module rounded_square(w, h, z, r) {
// Centers the object and creates the rounded rectangular prism
translate([-w/2 + r, -h/2 + r, 0])
hull() {
cylinder(h=z, r=r);
translate([w - 2*r, 0, 0]) cylinder(h=z, r=r);
translate([0, h - 2*r, 0]) cylinder(h=z, r=r);
translate([w - 2*r, h - 2*r, 0]) cylinder(h=z, r=r);
}
}