]> www.fi.muni.cz Git - things.git/blob - led-strip-end-round.scad
distri-zaslepka
[things.git] / led-strip-end-round.scad
1 include <yenyalib.scad>
2
3 base_wall = 0.6;
4 inside_z = base_wall + 5;
5
6 base_w = 18;
7 base_h1 = 7.5;
8 base_h2 = 14;
9
10 inside_yoff = 2.3;
11 inside_w = 12.4-0.2;
12 inside_h = 3.9-0.2;
13
14 inside_w1 = inside_w - 2;
15 inside_h1 = 2;
16
17 /*
18 base_w = 23.5;
19 base_h1 = 10;
20 base_h2 = 11;
21
22 inside_yoff = 1;
23 inside_w = 21;
24 inside_h = 1.8;
25
26 inside_w1 = inside_w - 2;
27 inside_h1 = 2;
28 */
29
30 // base
31 union() {
32         intersection() {
33                 let(r = (base_w^2)/(8*(base_h2-base_h1))
34                         + (base_h2-base_h1)/2)
35                         Ty(-r+base_h2)
36                         cylinder(r = r, h = base_wall, $fn = 256);
37                 Tx(-base_w/2) cube([base_w, infty, base_wall]);
38         }
39         Tx(-base_w/2) cube([base_w, base_h1, base_wall]);
40 }
41
42 // inside
43 Tx(-inside_w/2) Ty(inside_yoff)
44         cube([inside_w, inside_h, inside_z]);
45
46 // innside higher part
47 if (inside_w1 > 0) {
48         Tx(-inside_w1/2) Ty(inside_yoff+inside_h-eps)
49                 cube([inside_w1, inside_h1+eps, inside_z]);
50 }
51