| 1 | // cork for my weep of willow potion bottle |
| 2 | |
| 3 | // designed to fit a small submersible led tea light into the cap and |
| 4 | // illuminate the smoke rising from the smoker. LED sits in |
| 5 | // led_cork(), and led_cap() is placed over it to diffuse. Printed @ |
| 6 | // 100% infill, slow, and with the largest possible layer heights. |
| 7 | |
| 8 | $fa = 1; |
| 9 | $fs = 1; |
| 10 | |
| 11 | led_cork (); |
| 12 | //led_cap (); |
| 13 | |
| 14 | /* actual cork dimensions |
| 15 | bottom_d = 29.5; |
| 16 | top_d = 35.25; |
| 17 | height = 37.77; |
| 18 | */ |
| 19 | |
| 20 | module cork (bottom_d, top_d, height) { |
| 21 | hull () { |
| 22 | cylinder (d=bottom_d, h=0.1); |
| 23 | translate ([0, 0, height]) cylinder (d=top_d, h=0.1); |
| 24 | } |
| 25 | } |
| 26 | |
| 27 | |
| 28 | // logically, should be arguments, but are shared between led_cork and |
| 29 | // led_cap... |
| 30 | |
| 31 | bottom_inner_d = 30; |
| 32 | top_inner_d = 35.25; |
| 33 | height = 37.77; |
| 34 | wall = 1.0; |
| 35 | |
| 36 | module led_cork () { |
| 37 | difference () { |
| 38 | cork (bottom_inner_d + wall*2, top_inner_d + wall*2, height); |
| 39 | translate ([0, 0, wall*2]) cork (bottom_inner_d, top_inner_d, height); |
| 40 | } |
| 41 | |
| 42 | } |
| 43 | |
| 44 | // dome of the led, to be cut from cap |
| 45 | module led_dome (height = 8.5, diameter = 8.8) { |
| 46 | cylinder (d=diameter, h=height/2); |
| 47 | translate ([0, 0, height/2]) sphere (d=diameter); |
| 48 | |
| 49 | } |
| 50 | |
| 51 | module led_cap (cap_depth = 12, cap_tolerance = 0.5) { |
| 52 | difference () { |
| 53 | // doesn't have to be exact, just need to fit in |
| 54 | cork (bottom_inner_d, top_inner_d - cap_tolerance, cap_depth); |
| 55 | translate ([0, 0, -0.01]) led_dome (); |
| 56 | } |
| 57 | } |