diff --git a/Toothbrush holder.scad b/Toothbrush holder.scad index f5bf613..d510763 100644 --- a/Toothbrush holder.scad +++ b/Toothbrush holder.scad @@ -1,9 +1,6 @@ $fn = 100; dis = 35; hei = 20; -screw_holes = false; -scr1 = 0; -scr2 = 0; module base_holder() { @@ -16,15 +13,15 @@ hull() { translate([ -4, -4, -0 ]) cube([ 1, 8, 5 ]); - translate([ 12.5 - 13 - 19.8, -7.5, -0 ]) cube([ 0.0001, 15, 5 ]); + translate([ 12.5 - 13 - 19.8 - 5, -7.5, -0 ]) cube([ 0.0001, 15, 5 ]); } translate([ 0, 0, 0 ]) scale([ 3.3, 2.75, 0.5 ]) cylinder(d = 12, h = 10); } - translate([ 7, -18, -1 ]) cube([ 15, 36, 10 ]); + translate([ 9, -18, -1 ]) cube([ 15, 36, 10 ]); translate([ 0, 0, -1 ]) scale([ 3.3, 2.75, 0.5 ]) cylinder(d = 10, h = 14); } - translate([ 7, 13.93, 0 ]) cylinder(h = 5, d = 2.95); - translate([ 7, -13.93, 0 ]) cylinder(h = 5, d = 2.95); + translate([ 9, 13.1, 0 ]) cylinder(h = 5, d = 2.95); + translate([ 9, -13.1, 0 ]) cylinder(h = 5, d = 2.95); } } @@ -33,41 +30,34 @@ for (i = [0:3]) { translate([ 0, dis * i, 0 ]) base_holder(); }; - translate([ -.5, 0, 0 ]) difference() - { - translate([ -23, -7.5, 0 ]) cube([ 3.5, dis * 3 + 15, 5 ]); - if (screw_holes) { - translate([ -23.5, dis * 0.5, 2.5 ]) rotate([ 0, 90, 0 ]) cylinder(h = 10, d = scr1); - translate([ -20.4, dis * 0.5, 2.5 ]) rotate([ 0, 90, 0 ]) - cylinder(h = 1, d1 = 4, d2 = scr2); - translate([ -23.5, dis * 2.5, 2.5 ]) rotate([ 0, 90, 0 ]) cylinder(h = 4, d = scr1); - translate([ -20.4, dis * 2.5, 2.5 ]) rotate([ 0, 90, 0 ]) - cylinder(h = 1, d1 = 4, d2 = scr2); - } - } + translate([ -28.5, -7.5, 0 ]) cube([ 3.5, dis * 3 + 15, 5 ]); }; // p2 module top_holder() { - difference() - { - union() + union() { + difference() { + union() + { + hull() + { + translate([ -4, -4, -0 ]) cube([ 1, 8, 5 ]); + translate([ 12.5 - 13 - 19.8 -11, -7.5, -0 ]) cube([ 0.0001, 15, 5 ]); + } + translate([ 0, 0, 0 ]) cylinder(h = 5, d = 12); + } + hull() { - translate([ -4, -4, -0 ]) cube([ 1, 8, 5 ]); - translate([ 12.5 - 13 - 19.8, -7.5, -0 ]) cube([ 0.0001, 15, 5 ]); + translate([ 0, 0, -1 ]) cylinder(h = 7, d = 8); + translate([ 1, 0, -1 ]) cylinder(h = 7, d = 7.5); } - translate([ 0, 0, 0 ]) cylinder(h = 5, d = 10); - } - - hull() - { - translate([ 0, 0, -1 ]) cylinder(h = 7, d = 8); - translate([ 1, 0, -1 ]) cylinder(h = 7, d = 7.5); - } - translate([ 2, -18, -1 ]) cube([ 15, 36, 10 ]); - }; + translate([ 3.5, -18, -1 ]) cube([ 15, 36, 10 ]); + }; + translate([ 3.3, -3.9, 0 ]) cylinder(h = 5, d = 2.2); + translate([ 3.3, 3.9, 0 ]) cylinder(h = 5, d = 2.2); + } } union() @@ -77,17 +67,6 @@ for (i = [0:3]) { translate([ 0, dis * i, 0 ]) top_holder(); }; - difference() - { - translate([ -23, -7.5, 0 ]) cube([ 3, dis * 3 + 15, 5 ]); - if (screw_holes) { - translate([ -23.5, dis * 0.5, 2.5 ]) rotate([ 0, 90, 0 ]) cylinder(h = 10, d = scr1); - translate([ -20.9, dis * 0.5, 2.5 ]) rotate([ 0, 90, 0 ]) - cylinder(h = 1, d1 = 4, d2 = scr2); - translate([ -23.5, dis * 2.5, 2.5 ]) rotate([ 0, 90, 0 ]) cylinder(h = 4, d = scr1); - translate([ -20.9, dis * 2.5, 2.5 ]) rotate([ 0, 90, 0 ]) - cylinder(h = 1, d1 = scr1, d2 = scr2); - } - }; + translate([ -34, -7.5, 0 ]) cube([ 3, dis * 3 + 15, 5 ]); }; }; \ No newline at end of file