]> www.fi.muni.cz Git - bike-lights.git/blob - parts/rearlight-dual-mudflap.scad
mudflap for dual rearlights
[bike-lights.git] / parts / rearlight-dual-mudflap.scad
1 // Holder for two Fraen FHS-HEB1-LB01-x lenses for Luxeon LEDs.
2
3 eps = 0.01;
4 infty = 100;
5
6 wall = 1.5;
7
8 screw_zoff = 5.5;
9 screw_d = 4;
10 screw_head = 10;
11 lens_dist = 45;
12
13 base_w = 45;
14 base_l = 30;
15 base_l2 = 3;
16 screw_wall = 3;
17
18 translate([-base_w/2, -base_l2, 0])
19         cube([base_w, base_l/2+base_l2, wall]);
20 translate([0, base_l/2, 0])
21         scale([-base_w/base_l, 1, 1])
22                 cylinder(r = base_l/2, h = wall, $fn = 128);
23 hull() { // sides
24         translate([-screw_head/2-wall, 0, 0])
25                 cube([screw_head+2*wall, screw_wall, wall+2]);
26         for (x = [-1, 1]) scale([x, 1,1])
27                 translate([base_w*0.4, 0, 0])
28                         cube([wall, screw_wall, wall]);
29 }
30
31 difference() {
32         hull() {
33                 translate([-screw_head/2-wall, 0, 0])
34                         cube([screw_head+2*wall, screw_wall, wall+screw_head/2+screw_zoff]);
35                 translate([-screw_head/2-wall, base_l-2*wall, 0])
36                         cube([screw_head+2*wall, wall, wall]);
37         }
38         translate([-screw_head/2, screw_wall, wall])
39                 cube([screw_head, infty, screw_head/2+screw_zoff+eps]);
40         translate([0, -eps, wall+screw_zoff])
41         rotate([-90, 0, 0])
42                 cylinder(r = screw_d/2, h = screw_wall+2*eps, $fn = 6);
43 }