]> www.fi.muni.cz Git - things.git/blob - led-strip-holder1.scad
Holder for two LED strips with Al base
[things.git] / led-strip-holder1.scad
1 infty = 1000;
2 eps = 0.01;
3
4 wall = 2;
5 screw_hole = 3.5;
6 screw_l = 3;
7 screw_off = 10;
8
9 cable_w = 7;
10 cable_h = 3;
11 cable_off = 24;
12
13 led_w = 10;
14 led_h = 2.5;
15 led_d = (pow(led_w/2, 2) - pow(led_h, 2))
16                 / (2 * led_h);
17
18 holder_w = 8.5;
19
20 vert_l = 20;
21
22 module body() {
23         cube([wall, vert_l + wall, holder_w]);
24 //      translate([-10, -wall, 0])
25 //              cube([10+wall, wall+eps, holder_w]);
26         hull() {
27                 for (x = [0, cable_w - 2*cable_h])
28                 translate([0, cable_off+x, 0])
29                         cylinder(r = cable_h + wall, h = holder_w, $fn = 64);
30         }
31         translate([-led_w/2, led_d, 0])
32         cylinder(r = led_d + led_h + wall, h = holder_w);
33 }
34
35 difference() {
36         body();
37         translate([-50, 0, -50/2]) cube(50);
38         // screw hole
39         hull() {
40                 for (x = [0, screw_l])
41                         translate([-eps, screw_off + x, holder_w/2])
42                         rotate([0, 90, 0])
43                         rotate([0, 0, 90])
44                         cylinder(r = screw_hole/2, h = wall + 2*eps, $fn = 6);
45         }
46         // cable hole
47         hull() {
48                 for (x = [0, cable_w - 2*cable_h])
49                 translate([0, cable_off+x, -eps])
50                         cylinder(r = cable_h, h = holder_w + 2*eps, $fn = 64);
51         }
52         // led strip
53         intersection() {
54                 translate([-led_w/2, led_d, -eps])
55                         cylinder(r = led_d + led_h, h = holder_w + 2*eps);
56                 translate([-50, -50/2, -50/2]) cube(50);
57         }
58         // strip off the vertical part of led strip cylinder
59         translate([wall, -50+screw_off, -50/2]) cube(50);
60 }