]> www.fi.muni.cz Git - things.git/blob - mini-arrow-firewall.scad
camera spring base: wider hooks
[things.git] / mini-arrow-firewall.scad
1 infty = 100;
2 eps = 0.01;
3
4 motor_d = 28; // unused here, just for reference
5 motor_screw_dist1 = 19;
6 motor_screw_dist2 = 16;
7 motor_screw_d = 3 + 0.5;
8 motor_screw_head = 5 + 0.5;
9 motor_center_hole = 8 + 2;
10
11 outer_wall = 2;
12
13 body_w = 60 - 2*outer_wall - 0.5;
14 body_h = 33 - outer_wall - 0.5;
15 body_depth = 25;
16 strut_h = 12;
17 corner_l = 8;
18
19 motor_plate_h = 2.5; // base thickness of the motor mount
20 motor_plate_add = 2; // horizontal size added to the holes
21 wall = 1.5; // base thickness of other parts
22
23 side_overhang = 1.5;
24
25 // base plate overhang
26 difference() {
27         translate([-body_w/2-side_overhang, -body_h/2-side_overhang, 0])
28                 cube([body_w + 2*side_overhang, body_h + 2*side_overhang, wall]);
29         translate([-body_w/2+wall, -body_h/2+wall, -eps])
30                 cube([body_w - 2*wall, body_h - 2*wall, wall+2*eps]);
31 }
32
33 // bottom plate with motor mount
34
35 module motor_plate_body() {
36         hull() { // shorter screws
37                 cylinder(r = motor_center_hole/2 + motor_plate_add,
38                         h = motor_plate_h);
39                 for (angle = [-90,90]) {
40                         rotate([0, 0, angle])
41                         translate([motor_screw_dist1/2, 0, 0])
42                                 cylinder(r = motor_screw_head/2 + motor_plate_add, h = motor_plate_h);
43                 }
44         }
45
46         hull() { // longer screws
47                 cylinder(r = motor_center_hole/2 + motor_plate_add,
48                         h = motor_plate_h);
49                 for (angle = [0,180]) {
50                         rotate([0, 0, angle])
51                         translate([motor_screw_dist2/2, 0, 0])
52                                 cylinder(r = motor_screw_head/2 + motor_plate_add, h = motor_plate_h);
53                 }
54         }
55 }
56
57 difference() {
58         motor_plate_body();
59         // center hole
60         translate([0, 0, -eps])
61                 cylinder(r = motor_center_hole/2, h = motor_plate_h + 2*eps);
62         for (angle = [-90,90]) rotate([0, 0, angle]) {
63                 translate([motor_screw_dist1/2, 0, -eps])
64                         cylinder(r = motor_screw_d/2, h = motor_plate_h + 2*eps, $fn = 6);
65                 translate([motor_screw_dist1/2, 0, motor_plate_h - (motor_screw_head-motor_screw_d)/2])
66                         cylinder(r1 = motor_screw_d/2, r2 = motor_screw_head/2, h = (motor_screw_head-motor_screw_d)/2+eps, $fn = 6);
67         }
68         for (angle = [0,180]) rotate([0, 0, angle]) {
69                 translate([motor_screw_dist2/2, 0, -eps])
70                         cylinder(r = motor_screw_d/2, h = motor_plate_h + 2*eps, $fn = 6);
71                 translate([motor_screw_dist2/2, 0, motor_plate_h - (motor_screw_head-motor_screw_d)/2])
72                         cylinder(r1 = motor_screw_d/2, r2 = motor_screw_head/2, h = (motor_screw_head-motor_screw_d)/2+eps, $fn = 6);
73         }
74 }
75
76 // struts
77 for (x = [-1, 1]) for (y = [-1, 1]) scale([x, y, 1]) hull() {
78         translate([body_w/2-corner_l, body_h/2-wall/2, 0])
79                 cylinder(r = wall/2, h = strut_h);
80         translate([motor_screw_dist2/2 + motor_screw_head/2 + motor_plate_add - wall/2, 0, 0])
81                 cylinder(r = wall/2, h = motor_plate_h);
82 }
83
84 for (x = [-1, 1]) for (y = [-1, 1]) scale([x, y, 1]) hull() {
85         translate([body_w/2-corner_l, body_h/2-wall/2, 0])
86                 cylinder(r = wall/2, h = strut_h);
87         translate([motor_screw_head/2 + motor_plate_add - wall/2, motor_screw_dist1/2, 0])
88                 cylinder(r = wall/2, h = motor_plate_h);
89 }
90
91 // corners
92 for (x = [-1, 1]) scale([x, 1, 1]) {
93         translate([body_w/2-wall, -body_h/2, 0])
94                 cube([wall, body_h, strut_h]);
95                 
96         for (y = [-1, 1]) scale ([1, y, 1]) {
97                 translate([body_w/2-corner_l, body_h/2 - wall, 0])
98                         cube([corner_l, wall, strut_h]);
99         }
100 }
101
102 // sides
103 for (y = [-1, 1]) scale([1, y, 1])
104         translate([-body_w/2, body_h/2-wall, 0])
105                 cube([body_w, wall, strut_h/2]);