18 hook_center_hole = 15;
20 bottom_hole_l = body_l - 2*corner_r - 2*hook_l;
21 bottom_hole_w = body_w - 4*wall;
23 side_hole_l1 = body_l - 4*corner_r;
24 side_hole_l2 = body_l - corner_r;
25 side_hole_bot = 2*wall;
35 for (x = [-1, 1]) for (y = [-1, 1]) scale([x, y, 1])
36 translate([body_l/2 - corner_r,
37 body_w/2 - corner_r, 0])
38 cylinder(r = corner_r + wall, h = corner_side_h + wall);
40 // hole for the camera body
42 for (x = [-1, 1]) for (y = [-1, 1]) scale([x, y, 1])
43 translate([body_l/2 - corner_r,
44 body_w/2 - corner_r, wall])
45 cylinder(r = corner_r, h = body_h);
48 translate([-bottom_hole_l/2, -bottom_hole_w/2, -eps])
49 cube([bottom_hole_l, bottom_hole_w, body_h]);
52 translate([-side_hole_l1/2, -body_w/2-wall-eps, side_hole_bot+wall])
53 cube([side_hole_l1, body_w+2*wall+2*eps, wall]);
54 translate([-side_hole_l2/2, -body_w/2-wall-eps, corner_side_h+wall])
55 cube([side_hole_l2, body_w+2*wall+2*eps, wall]);
58 for (x = [-1, 1]) scale([x, 1, 1]) {
59 translate([body_l/2-lens_hole_l, 0, lens_zoff + wall])
61 cylinder(r = lens_d/2, h = lens_hole_l + wall + eps);
62 translate([body_l/2-lens_hole_l, -lens_d/2, lens_zoff + wall])
63 cube([lens_hole_l + wall + eps, lens_d, lens_d/2]);
67 // rubber band side hooks
68 for (x = [-1, 1]) for (y = [-1, 1]) scale([x, y, 1])
70 translate([body_l/2 - corner_r - hook_l,
72 cube([hook_l, hook_w + wall, hook_h]);
73 translate([body_l/2 - corner_r - hook_hole_l,
74 body_w/2 + wall, -eps])
75 cube([hook_hole_l + eps, hook_hole_w, hook_h+2*eps]);
79 for (y = [-1, 1]) scale([1, y, 1])
81 translate([-hook_center_hole/2-hook_l, body_w/2, 0])
82 cube([2*hook_l+hook_center_hole, hook_w + wall, hook_h]);
83 translate([-hook_center_hole/2, body_w/2 + wall, -eps])
84 cube([hook_center_hole, hook_hole_w, hook_h+2*eps]);
85 for (x = [-1, 1]) scale([x, 1, 1])
86 translate([hook_center_hole/2+hook_l - hook_hole_l,
87 body_w/2 + wall, -eps])
88 cube([hook_hole_l + eps, hook_hole_w, hook_h+2*eps]);
95 for (x = [-1, 1]) for (y = [-1, 1]) scale([x, y, 1])
96 translate([body_l/2 - corner_r,
97 body_w/2 - corner_r, 0])
98 cylinder(r = corner_r + wall, h = wall);
100 // translate([-body_l/2+corner_r + hook_l, -body_w/2+corner_r, -eps])
101 // cube([body_l-2*corner_r-2*hook_l, body_w - 2*corner_r, wall +2*eps]);
102 translate([-body_l/2+corner_r, -body_w/2+corner_r, -eps])
103 cube([body_l-2*corner_r, body_w - 2*corner_r, wall +2*eps]);
105 // more space for lens
106 for (x = [-1, 1]) scale([x, 1, 1])
107 translate([body_l/2, -body_w/2+corner_r, -eps])
108 cube([wall+eps, body_w-2*corner_r, wall+2*eps]);
111 // raised corner bottom
112 for (x = [-1, 1]) for (y = [-1, 1]) scale([x, y, 1])
113 translate([body_l/2 - corner_r,
114 body_w/2 - corner_r, wall-eps])
116 cylinder(r = corner_r + wall, h = wall+eps);
117 translate([-infty, -infty/2, -infty/2]) cube(infty);
118 translate([-infty/2, -infty, -infty/2]) cube(infty);
122 // raised corner side
123 for (x = [-1, 1]) for (y = [-1, 1]) scale([x, y, 1])
124 translate([body_l/2 - corner_r,
125 body_w/2 - corner_r, 2*wall-eps])
127 cylinder(r = corner_r + wall, h = corner_side_h+eps);
128 translate([0, 0,-eps])
129 cylinder(r = corner_r, h = infty);
130 translate([-infty, -infty/2, -infty/2]) cube(infty);
133 translate([-infty/2, -infty, -infty/2]) cube(infty);