// A paranetric dish dryer for the kitchen. // The dryer consists of four elements: // 1. A base holding the connections to the next base and the pins // 2. A short connection for the first and last base to connec to // the next or previous base. // 3. A long connection for connecting the bases which each other // 4. The vertical pin. // A complete dryer, depending on the number n of slots requires the // following parts: // 1. Always required are two short struts and two pins without strut // 2. n + 1 * base struts // 3. n - 1 * long struts // 4. n * 2 pins with strut // /* [Dryer part Options] */ // The kind of dryer part to print kind = 0; // [0:None, 1:Base, 2:long strut, 3:short strut, 4:end pin, 5:normal pin ] // The width of the base and the struts base_width = 15; // The height of the base and the struts base_height = 5; // The radius of the edges of the base and the struts base_radius = 2; // The distance between the two holes on the base hole_distance = 140; // // The distance from the end to the center of the holes hole_to_end = 10; // The outer diameter of the holes hole_outer_diameter = 11.0; // The inner diameter of the holes, also the diameter of the pin hole_inner_diameter = 7.5; // The height of the pin pin_height = 80; // the diameter of the pin/hole in the middle of the base/strut center_hole_diameter = 5.0; /* [Hidden] */ // ********************** // ** Static Settings: ** // ********************** $fn = 50; correction = 0.02; // A cube with rounded corners module cube_with_rounded_corners(length, width, height, radius) { difference() { cube([length, width, height]); corner(height, radius); translate([length, 0, 0]) rotate(90) corner(height, radius); translate([length, width, 0]) rotate(180) corner(height, radius); translate([0, width, 0]) rotate(270) corner(height, radius); } } // build the corners of a rounded cube module corner(height, radius) { difference() { translate([-0.5, -0.5, -0.2]) cube([radius + 0.5, radius + 0.5, height + 0.5]); translate([radius, radius, height / 2]) cylinder(height, radius, radius, true); } } // The base connector providing the cylinders to connect the other components. module basestrut() { length = hole_distance + 2 * hole_to_end; difference () { union() { cube_with_rounded_corners(length, base_width, base_height, base_radius); translate([length /2 , base_width / 2, 0]) cylinder(h = base_height * 2, r = center_hole_diameter / 2, true); for(xpos = [hole_to_end, hole_to_end + hole_distance]) translate([xpos, base_width / 2, 0]) cylinder(h = base_height * 2, r = hole_outer_diameter / 2, true); } for(xpos = [hole_to_end, hole_to_end + hole_distance]) translate([xpos, base_width / 2, 0]) translate([0,0, 1]) cylinder(h = base_height * 2, r = hole_inner_diameter / 2, true); } } // The long strut to connect two base connectors whith each other module longstrut() { length = hole_distance + 2 * hole_to_end; difference () { cube_with_rounded_corners(length, base_width, base_height, base_radius); for(xpos = [hole_to_end, hole_to_end + hole_distance]) translate([xpos, base_width / 2, -correction]) cylinder(h = base_height + 2 * correction, r = hole_outer_diameter / 2 + correction, true); translate([length /2 , base_width / 2, -correction]) cylinder(h = base_height + 2 * correction, r = center_hole_diameter / 2 + correction, true); } } // The long strut to connect the first and the last base connectors module shortstrut() { length = hole_distance / 2 + 2 * hole_to_end; difference () { cube_with_rounded_corners(length, base_width, base_height, base_radius); for(xpos = [hole_to_end, hole_to_end + hole_distance]) translate([hole_to_end, base_width / 2, -correction]) cylinder(h = base_height + 2 * correction, r = hole_outer_diameter / 2 + correction, true); translate([length - hole_to_end, base_width / 2, -correction]) cylinder(h = base_height + 2 * correction, r = center_hole_diameter / 2 + correction, true); } } // The pin to be placed at the end of the struts. There are two versions, // one for strut under the pin and one without a strut under the pin module pin(with_strut=true) { cylinder(h = base_height * 2, r = hole_inner_diameter / 2 - correction, true); translate([0,0,base_height * 2 - 3]) cylinder(h = 2, r = (with_strut ? base_width : hole_outer_diameter) / 2 , true); translate([0,0,base_height * 2 - 1]) cylinder(h = pin_height, r = hole_inner_diameter / 2, true); } // The selector for the configurator. If no element is selected, all // of them are printed and aligned on the y axis module main() { if (kind != 0) { if (kind == 1) basestrut(); else if (kind == 2) longstrut(); else if (kind == 3) shortstrut(); else if (kind == 4) pin(false); else if (kind == 5) pin(true); } else { translate([0,80,0]) basestrut(); translate([0,60,0]) longstrut(); translate([0,40,0]) shortstrut(); translate([0,20,0]) pin(false); pin(true); } } // Do it! main();