]> www.fi.muni.cz Git - things.git/blob - servo-tube-holder-half.scad
switch holder.scad
[things.git] / servo-tube-holder-half.scad
1 eps = 0.01;
2 infty = 200;
3
4 wall = 1.5;
5
6 tube_d = 8.0 + 0.5;
7
8 clip_w = 6;
9
10 slot_w = 3;
11 slot_angle = 180+45;
12
13 support_l = tube_d/2 + 10;
14
15 module clip(support_zoff) {
16 difference() {
17         union() {
18                 // clip cylinder
19                 cylinder(r = tube_d/2 + wall, h = clip_w);
20                 // under the servo
21                 hull() {
22                         translate([0, tube_d/2+support_zoff - wall, 0])
23                                 cube([tube_d/2+wall, wall, clip_w]);
24                         translate([support_l-wall, tube_d/2+support_zoff - wall, 0])
25                                 cube([wall, wall, clip_w/2]);
26                 }
27                 // vertical strut
28                 hull() {
29                         translate([support_l - eps, tube_d/2+support_zoff-wall, 0])
30                                 cube([eps, wall, wall]);
31                         translate([0, -tube_d/2-wall/2, 0])
32                                 cube([eps, tube_d+wall/2+support_zoff, wall]);
33                 }
34                 
35         }
36
37         // fuse tube
38         translate([0, 0, -eps])
39                 cylinder(r = tube_d/2, h = clip_w + 2*eps);
40
41         // slot
42         rotate([0, 0, slot_angle])
43         translate([0, -slot_w/2, -eps])
44                 cube([tube_d, slot_w, clip_w + 2*eps]);
45 }
46 }
47
48 // clip(support_zoff = -2);
49 for (x = [-1, 1]) scale([x, 1, 1]) translate([tube_d, tube_d, 0])
50         clip(support_zoff = wall);
51
52 for (x = [-1, 1]) scale([x, -1, 1]) translate([tube_d, tube_d, 0])
53         clip(support_zoff = wall-3);