]> www.fi.muni.cz Git - things.git/blob - led-strip-holder2.scad
switch holder.scad
[things.git] / led-strip-holder2.scad
1 infty = 1000;
2 eps = 0.01;
3
4 wall = 2;
5 screw_hole = 3.5;
6 screw_l = 1;
7 screw_head = 9;
8 holder_w = 8.5;
9 strip_w = 13;
10 strip_h = 0.5;
11 holder_l = strip_w + wall;
12
13 module body_solid() {
14         cube([wall + strip_h, holder_l, holder_w]);
15         translate([wall-eps, 0, 0])
16                 cube([screw_head + screw_l + eps, wall, holder_w]);
17 //      translate([holder_w/2, holder_w/2, wall-eps])
18 //              cylinder(r = screw_head/2, h = wall+eps, $fn = 128);
19 }
20
21 module body() {
22         difference() {
23         body_solid();
24         // LED strip
25         translate([-eps, -eps, -eps])
26                 cube([strip_h + eps, strip_w, holder_w + 2*eps]);
27         // screw hole
28         hull() for (x = [0, screw_l])
29                 translate([wall + screw_head/2 + x, -eps, holder_w/2])
30                 rotate([-90, 0, 0])
31                         cylinder(r = screw_hole/2, h = wall + 2*eps);
32 /*
33         hull() for (x = [0,1])
34                 translate([holder_w/2, wall + screw_hole/2 + screw_l*x, -eps])
35                         cylinder(r = screw_hole/2, h = wall + strip_h + 2*eps);
36         translate([-eps, holder_l - wall - strip_w, -eps])
37                 cube([holder_w + 2*eps, strip_w, strip_h+eps]);
38 */
39         }
40 }
41
42 body();