]> www.fi.muni.cz Git - things.git/blob - paul-trap-holder.scad
switch holder.scad
[things.git] / paul-trap-holder.scad
1 include <yenyalib.scad>
2
3 base_wall = 4;
4 wall = 1.5;
5 rod_d = 5 + 1;
6 d_max = 45;
7 d_min = 20;
8 steps = 3;
9
10 strut_w = 15;
11 strut_l = 80;
12 strut_side_inner_l = 8;
13
14 center_hole_d = d_min-wall-rod_d;
15
16 module base() {
17         difference() {
18                 cylinder(r = d_max/2+2*wall + rod_d/2, h = base_wall, $fn = 6);
19                 Tz(wall) cylinder(r = d_max/2 + rod_d/2+wall, h = base_wall, $fn = 6);
20         }
21 }
22
23 module strut() {
24 Ty((d_max/2+wall+rod_d/2)*cos(30)) {
25         Tx(-strut_w/2) {
26                 cube([strut_w, strut_l, wall]);
27                 Ty(strut_l-wall) difference() {
28                         cube([strut_w, wall, strut_w]);
29                         Tx(strut_w/2) Tz(strut_w/2) Rx(-90) Tz(-eps) cylinder(r = 2.5, h = wall+2*eps, $fn = 6);
30                 }
31         }
32         Mx() hull() {
33                 Tx(strut_w/2-wall) {
34                         Ty(-strut_side_inner_l) cube([wall, eps, base_wall]);
35                         Ty(strut_l-wall) cube([wall, wall, strut_w]);
36                 }
37         }
38 }
39 }
40 difference() {
41         union() {
42                 base();
43                 strut();
44         }
45         for (i = [0:1:steps]) {
46                 Rz((steps-i)*85/steps)
47                 for (angle = [0:60:360]) Rz(angle) Tx(d_min/2+i*(d_max-d_min)/(2*(steps))) Tz(-eps)
48                         cylinder(r = rod_d/2, h = wall + 2*eps, $fn = 6);
49         }
50         Tz(-eps) cylinder(r = center_hole_d/2, h = infty);
51 }
52