X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=diffuser-adjustable.scad;h=624c5d858649f30ba446ec07ab5c379548b4b03f;hb=HEAD;hp=8c47adfe62643c3afea88373249f7221657c463e;hpb=00770d3a3e998f6d3369db7b48fbc9d1f30093dc;p=things.git diff --git a/diffuser-adjustable.scad b/diffuser-adjustable.scad index 8c47adf..624c5d8 100644 --- a/diffuser-adjustable.scad +++ b/diffuser-adjustable.scad @@ -10,23 +10,25 @@ // For any other flashlight, adjust the parameters below: // the true _diameter_ of the flashlight + some space around -ring_d = 34.3 + 1.0; +// ring_d = 34.3 + 1.0; // zsj-t29 +ring_d = 44 + 0.5; // lzz-186 // the diaphragm thickness, set so that it is printed with two print layers -diaphragm = 0.5; +diaphragm = 0.4; // outer wall thickness - preferably the integer multiple // of the print trace width -wall = 1.5; +wall = 1.0; // height of the center of clip beams + some space below + diaphragm thickness -clip_h = 7.3 + 0.5 + diaphragm; +// clip_h = 7.3 + 0.5 + diaphragm; // zsj-t29 +clip_h = 16 + 0.5 + diaphragm; // zsj-t29 // the clips protrude this much to the inner cylindrical hole // the bigger value means more stiff fit clip_w = 1.2; -clip_angle = 120; // at least 90 degrees; bigger is easier to put on and off, +clip_angle = 90; // at least 90 degrees; bigger is easier to put on and off, // smaller is more stiff, but harder to remove n_clips = 3; // number of clips; odd numbers prefered @@ -35,20 +37,30 @@ n_clips = 3; // number of clips; odd numbers prefered // on top of the clip clip_top = clip_h + (clip_w+wall/2)*tan(clip_angle/2); +// if the lens protrudes below the outer ring, it is better that +// the diffuser sits on the outer ring. So we can add an additional +// support ring +support_h = 3; +support_w = 3; + // the overall height: -// ring_h = clip_top; // cylindrical shape without the clips protruding on the top -ring_h = clip_h + wall; // clips protruding on the top +ring_h = clip_top; // cylindrical shape without the clips protruding on the top +// ring_h = clip_h + wall; // clips protruding on the top infty = 100; eps = 0.01; module diffuser() { difference() { + $fn = 256; // outer cylinder cylinder(r = ring_d/2 + wall, h = ring_h); - // inner cylinder hole + diaphragm + // inner cylinder hole + translate([0, 0, diaphragm + support_h]) + cylinder(r = ring_d/2, h = ring_h - support_h); + // support ring translate([0, 0, diaphragm]) - cylinder(r = ring_d/2, h = ring_h); + cylinder(r = ring_d/2 - support_w, h = support_h + eps); translate([0, 0, ring_h + eps - wall]) cylinder(r1 = ring_d/2, r2 = ring_d/2 + wall/2, h = wall); } @@ -61,7 +73,7 @@ module diffuser() { rotate([0, clip_angle/2, 0]) cube(infty); } - cylinder(r = ring_d/2 + wall, h = clip_top); + cylinder(r = ring_d/2 + wall, h = clip_top, $fn = 256); } }