-
Notifications
You must be signed in to change notification settings - Fork 0
/
rpi4A+.scad
140 lines (122 loc) · 3.81 KB
/
rpi4A+.scad
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
/* This file is part of Diabolopi - customizable raspberry pi cases
Copyright (C) 2024 Luc Milland
Diabolopi is free software: you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation, either version 3
of the License, or (at your option) any later version.
Diabolopi is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Diabolopi. If not, see <https://www.gnu.org/licenses/> */
include <diabolobox/diabolobox.scad>;
use <utils/conn_shapes.scad>;
use <utils/rpi_common.scad>;
use <rpi/misc_boards.scad>;
/* [Dimensions] */
height = 21; // 0.1
thickness = 2.4; // 0.1
edge_offset = 1.5; // 0.1
corner_radius = 1; // 0.1
fit_clearance = 0.3; // 0.05
/* [View] */
flat = false;
show_lid = true;
show_left = true;
show_right = true;
show_back = true;
show_front = true;
show_bottom = true;
show_feet = true;
show_board = true;
explode_distance = 0.0; // [0:0.5:20]
/* [Color] */
red = 0.04; // [0:0.01:1]
green = 0.51; // [0:0.01:1]
blue = 1; // [0:0.01:1]
alpha = 1; // [0:0.01:1]
module __Customizer_Limit__ () {}
inner_dim = true; // case size based on the pcb size
width = 56.5; // length on X axis + 0.5mm fit clearance
depth = 88.7; // length on Y axis + 0.5mm fit clearance
pillar_dia = 6;
pillar_bore_dia = 2.7;
pillar_height = 3;
pillars_coords = [[3.5, 26.7], [52.5, 26.7], [52.5, 84.8], [3.5, 84.8]];
ph = pillar_height;
pcb_th = 1.4;
pcb_top = ph + pcb_th;
// left panel connectors positions
// | offset | specs | corr. | half shape| top pcb | corr.
power_plug_pos = [ off + 11.2 + 0 , 3.5/2 + pcb_top + 0 ];
u_hdmi_1_pos = [ off + 26 + 0 , 3.5/2 + pcb_top + 0 ];
u_hdmi_2_pos = [ off + 39.5 + 0 , 3.5/2 + pcb_top + 0 ];
audio_pos = [ off + 54 + 0 , 3.25 + pcb_top + 0 ];
if (flat == false && show_board == true) {
rotate([0, 0, 180])
translate([-iw - off, - id - off, ph + th])
board_raspberrypi_4_model_b();
}
visible_panels = [show_left, show_bottom, show_right, show_lid, show_back, show_front, show_feet];
arrange(visible_panels) {
/* left panel */
diabolize_lr("left")
difference() {
db_panel("left_right");
union() {
translate(power_plug_pos) usb_C();
translate(u_hdmi_1_pos) u_hdmi();
translate(u_hdmi_2_pos) u_hdmi();
translate(audio_pos) audio();
}
}
/* bottom */
diabolize_bt()
difference() {
union() {
db_panel("top_bottom");
pillars();
sd_card_guard(off, od, ow, th);
}
vents();
feet_slots();
bottom_sd_card(off, od, ow);
// logo
linear_extrude(0.3)
mirror([0,1,0])
rotate([0, 0, 90])
translate([7.5 - od, -8, -0.1])
text("▶diabolobox◀",7, "FreeMono:style=Bold", spacing=0.9);
}
/* right panel */
diabolize_lr("right") db_panel("left_right");
/* lid */
diabolize_bt(bottom=false)
difference() {
db_panel("top_bottom");
hex_vents();
}
/* back panel */
difference() {
diabolize_fb()
difference() {
db_panel("front_back");
// status led
translate([7, ph + 1.4, -0.01])
cube([6, 0.7, th + 0.02]);
}
// sd slot
panel_sd_card(off, ow, dh, pcb_top);
}
/* front panel */
diabolize_fb()
difference() {
db_panel("front_back");
translate([9, 7.5 + pcb_th + ph + 1, 0]) double_usb_A();
translate([27, 7.5 + pcb_th + ph + 1, 0]) double_usb_A();
translate([45.75, 6 + ph + pcb_th + 1, 0]) ethernet();
}
// Feet
for(i=[1:1:4]) {translate([i*5, -10]) foot();}
}