1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
use <pcb_case/conversion.scad>
use <pcb_case/panel.scad>
tol = 2;
module panel_front(pcb_dim, margins, t) {
dim = dim_pcb_to_case(pcb_dim, margins, t);
x_off = dim[0]-2*t;
difference() {
pcb_case_panel_front(pcb_dim, margins, t);
mini_hdmi_hole(pcb_dim, margins, t);
for(v=[
[usb_max_y-usb_max_delta_y-tol/2, 0.75*t],
[usb_max_y-usb_delta_y-tol/2, t]
]) {
translate([0, v[0], 0]) {
micro_usb_hole(pcb_dim, margins, t, v[1]);
}
}
for(y = [cinch_max_y-cinch_d/2, cinch_max_y-cinch_delta_y+cinch_d/2]) {
translate([0, y, 0]) {
cinch_hole(pcb_dim, margins, t);
}
}
}
}
hdmi_delta_y = 11.8;
hdmi_delta_z = 3.9;
hdmi_max_y = 31.7;
hdmi_max_z = 13.7;
module mini_hdmi_hole(pcb_dim, margins, t) {
case_dim = dim_pcb_to_case(pcb_dim, margins, t);
translate([
case_dim[0]-2*t,
hdmi_max_y-hdmi_delta_y-tol/2,
hdmi_max_z-hdmi_delta_z-tol/2]) {
cube([t, hdmi_delta_y+tol, hdmi_delta_z+tol]);
}
}
usb_delta_y = 8;
usb_max_delta_y = 20.6;
usb_delta_z = 3;
usb_max_y = 71.55;
usb_max_z = 12.7;
module micro_usb_hole(pcb_dim, margins, t, dx) {
echo(dx);
case_dim = dim_pcb_to_case(pcb_dim, margins, t);
translate([
case_dim[0]-2*t,
0,
usb_max_z-usb_delta_z-tol/2]) {
cube([dx, usb_delta_y+tol, usb_delta_z+tol]);
}
}
cinch_d = 8.8;
cinch_delta_y = 24.5;
cinch_max_y = 70.4;
cinch_max_z = 34.25;
module cinch_hole(pcb_dim, margins, t) {
case_dim = dim_pcb_to_case(pcb_dim, margins, t);
translate([case_dim[0]-2*t, 0, cinch_max_z-cinch_d/2]) {
rotate([0, 90, 0]) {
cylinder(d=cinch_d+tol, h=t, $fn=30);
}
}
}
|