]> www.fi.muni.cz Git - things.git/blob - e-paper-437-case.scad
switch holder.scad
[things.git] / e-paper-437-case.scad
1 include <yenyalib.scad>
2
3 disp_thick = 3 + 0.3;
4 mount_thick = 3.5 + 0.3;
5
6 wall = 3*0.45;
7
8 disp_w = 102;
9 disp_h = 82;
10 body_h = 35;
11 disp_inner_w = 92;
12 disp_inner_h = 62;
13 disp_inner_top = 3.5; // offset from the top
14
15 difference() {
16         // main block
17         translate([-disp_w/2-wall, -disp_h/2-wall, 0])
18                 cube([disp_w+2*wall, disp_h+2*wall, body_h]);
19         // inside space
20         translate([-disp_w/2, -disp_h/2, wall])
21                 cube([disp_w, disp_h, body_h]);
22         // front hole for visible part of the display
23         Ty((disp_h-disp_inner_h)/2-disp_inner_top) hull() {
24                 translate([-disp_inner_w/2-wall/2, -disp_inner_h/2-wall/2, -eps])
25                         cube([disp_inner_w+wall, disp_inner_h+wall, eps]);
26                 translate([-disp_inner_w/2, -disp_inner_h/2, wall])
27                         cube([disp_inner_w, disp_inner_h, eps]);
28         }
29 }
30
31 Mx() Tz(wall+mount_thick) Rx(90) Tx(disp_w/2) Tz(-10) cylinder(r = wall, h = 20, $fn = 4);
32 My() Tz(body_h-wall) Ry(90) Ty(disp_h/2) Tz(-10) cylinder(r = wall, h = 20, $fn = 4);
33