-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrpi3A+.scad
127 lines (110 loc) · 3.3 KB
/
rpi3A+.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
/* 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 = 16; // 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.8; // [0:0.01:1]
green = 0.75; // [0:0.01:1]
blue = 0.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 = 68.5; // length on Y axis + 0.5mm fit clearance
pillar_dia = 6;
pillar_bore_dia = 2.7;
pillar_height = 3;
pillars_coords = [[3.5, 6.5], [52.5, 6.5], [52.5, 64.5], [3.5, 64.5]];
ph = pillar_height;
pcb_th = 1.4;
pcb_top = ph + pcb_th;
if (flat == false && show_board == true) {
rotate([0, 0, 180])
translate([-iw - off, - id - off, ph + th])
board_raspberrypi_model_a_plus_rev1_1();
}
visible_panels = [show_left, show_bottom, show_right, show_lid, show_back, show_front, show_feet];
arrange(visible_panels) {
diabolize_lr("left")
difference() {
db_panel("left_right");
union() {
// power plug
translate([off + 10.6, 1.5 + ph + pcb_th]) micro_usb_B();
// hdmi
translate([off + 32, 3 + ph + pcb_th]) hdmi();
// audio
translate([off + 53.5, 3.25 + ph + pcb_th]) audio();
}
}
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);
}
diabolize_lr("right") db_panel("left_right");
diabolize_bt(bottom=false)
difference() {
db_panel("top_bottom");
vents();
}
//SD side
difference() {
diabolize_fb() db_panel("front_back");
panel_sd_card(off, ow, dh, pcb_top);
}
//USB side
diabolize_fb()
difference() {
db_panel("front_back");
translate([
31.5, // as per datasheet
3 // half usb_A height
+ fc //
+ ph // pillars height
+ pcb_th // pcb thickness
+ 1, // extra space between pcb and connector
0]) usb_A();
}
// Feet
for(i=[0:3]) {translate([i*5, 0]) foot();}
}