]> www.fi.muni.cz Git - things.git/blob - radiacni-stit-snzb01.scad
switch holder.scad
[things.git] / radiacni-stit-snzb01.scad
1 include <yenyalib.scad>
2
3 sens_h = 68;
4 sens_l = 15;
5 sens_w = 15;
6 bottom_d = 5;
7
8 base_d = 50;
9 base_h = 3;
10
11 wall = 2;
12 clip_angle = 30;
13
14 $fn = 128;
15
16 for (angle = [0:120:360]) Rz(angle) {
17 intersection() {
18         difference($fn = 128) {
19                 cylinder(r = base_d/2, h = base_h);
20                 Tz(-eps) cylinder(r = base_d/2-wall, h = base_h + 2*eps);
21         }
22         Rz(-clip_angle/2) cube([base_d/2+eps, base_d/2+eps, base_h]);
23         Rz(clip_angle/2) Sy(-1) cube([base_d/2+eps, base_d/2+eps, base_h]);
24 }
25
26 Rz(clip_angle/2) Ty(-wall/2) Tx(base_d/2) cylinder(r = wall/2, h = base_h);
27
28 Rz(-clip_angle/2) Tx(base_d/2-3*wall)
29 intersection() {
30         difference() {
31                 cylinder(r = 3*wall, h = base_h);
32                 Tz(-eps) cylinder(r = 2*wall, h = base_h+2*eps);
33         }
34         Tx(-wall) Ty(-infty) cube(infty);
35 }
36 }
37
38 // base_plate
39 difference() {
40         cylinder(r = base_d/2-3*wall, h = base_h);
41         Tz(wall) cylinder(r = base_d/2-4*wall, h = base_h);
42 }
43
44 sens_side = 15;
45 My() {
46         Tx(-sens_side/2) Ty(sens_l/2) {
47                 cube([sens_side, wall, sens_h]); // sensor side
48                 Tz(sens_h/2+wall) Ry(90) Sx(2) 
49                         cylinder(r=wall/2, h = sens_side); // middle strut
50         }
51 }
52 translate([-sens_side/2, -sens_l/2-wall, sens_h-wall])
53         cube([sens_side, sens_l+2*wall, wall]);
54
55