]> www.fi.muni.cz Git - things.git/blob - camera-spring-base.scad
small control horn for rc plane
[things.git] / camera-spring-base.scad
1 infty = 200;
2 eps = 0.01;
3
4 wall = 1.5;
5
6 ziptie_w = 4;
7 ziptie_h = 3;
8
9 x_sep = 36;
10
11 corner_l = 9;
12 corner_w = 3;
13
14 hole1_yoff = 20;
15 hole2_yoff = 10;
16
17 body_w = 2*(hole1_yoff+ziptie_h/2+corner_w);
18 body_l = x_sep + 2*ziptie_w + 2*corner_w;
19
20 hook_w = 2;
21 hook_l = 3;
22 hook_hole = 2;
23
24 difference() {
25         union() {
26                 translate([-body_l/2, -body_w/2, 0])
27                         cube([body_l, body_w, wall]);
28                 
29                 // support raised corners
30                 for (x = [-1, 1]) for (y = [-1, 1]) scale([x, y, 1]) {
31                         translate([body_l/2-corner_w, body_w/2-corner_l, 0])
32                                 cube([corner_w, corner_l, 2*wall]);
33                         translate([x_sep/2-corner_w, body_w/2-corner_l, 0])
34                                 cube([corner_w, corner_l, 2*wall]);
35                 }
36
37                 // rubber hooks
38                 for (x = [-1, 1]) for (y = [-1, 1]) scale([x, y, 1]) {
39                         translate([body_l/2-eps, body_w/2-hook_w, 0])
40                                 cube([hook_w+hook_hole+eps, hook_w, wall]);
41                         translate([body_l/2+hook_hole, body_w/2-hook_w-hook_l, 0])
42                                 cube([hook_w, hook_l+hook_hole+2*hook_w, wall]);
43                         translate([body_l/2+hook_hole-hook_l, body_w/2+hook_hole, 0])
44                                 cube([hook_w+hook_l, hook_w, wall]);
45                 }
46         }
47
48         // center hole
49         translate([-x_sep/2+corner_w, -body_w/2+corner_l, -eps])
50                 cube([x_sep-2*corner_w, body_w-2*corner_l, 2*wall+2*eps]);
51
52         // ziptie angles
53         for (x = [-1, 1]) for (y = [-1, 1]) for (y1 = [-hole2_yoff, hole1_yoff])
54                 scale([x, y, 1]) translate([x_sep/2, y1, wall])
55                         rotate([-40, 0, 0])
56                         translate([0, -ziptie_h/2, -infty/2])
57                         cube([ziptie_w, ziptie_h, infty]);
58 }