-
Notifications
You must be signed in to change notification settings - Fork 0
/
RaspberryPiCase.scad
146 lines (118 loc) · 2.56 KB
/
RaspberryPiCase.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
141
142
143
144
145
//based on http://www.thingiverse.com/thing:47270
//adapted for model B+
width = 60.5;
length = 90.0;
thickness = 2;
total_height = 28;
// Raspberry PI
*translate([43.4+thickness,28.5+thickness,6.5]) {
import("../RaspberryPi_B.stl");
}
// ----- Modules -----//
// Base box
module basebox() {
difference() {
cube([length+(thickness*2),(width+(thickness*2))-2.5,14]);
translate ([thickness, thickness, thickness]) {
cube([length,width-2.5,28]);
}
}
}
//basebox();
// Top box
module topbox() {
translate([0,0,14]) {
difference() {
cube([length+(thickness*2),(width+(thickness*2))-2.5,14]);
translate ([thickness, thickness, -thickness]) {
cube([length,width-2.5,14]);
}
}
}
}
// Hole - Digital
module digital() { //<-- moved for B+
translate ([57,-0.1,10]) { //pos=70
rotate([-90,90,0]) cylinder(3,4.2,3.2,$fn=25);
}
}
// Hole - HDMI
module hdmi() {
translate ([27,-1,10.5]) {
hull(){
cube([15,4,4]);
translate([2.5,0,-2.5]) cube([10,4,1]);
}
}
}
// Hole - Ethernet
module ethernet() {
union() {
translate ([length,5,11.5]) cube([5,14,8.5]);
translate ([length,8.5,9.7]) cube([5,7,2]);
translate ([length,9.5,8.5]) cube([5,5,2]);
}
}
// Hole - USB
module usb() {
translate ([length,26.6,17.5]) cube([5,13.1,5.5]);
translate ([length,26.6,8.8]) cube([5,13.1,5.5]);
translate ([length,44,17.5]) cube([5,13.1,5.5]); //<-- added for B+
translate ([length,44,8.8]) cube([5,13.1,5.5]); //<-- added for B+
}
// Hole - Power
module power() { //<-- rotated and repositioned for B+
rotate([0,0,90]){
hull() {
translate ([-1,-17,9]) cube([4,7.9,2]);
translate ([-1,-16,8]) cube([4,5.9,.2]);
}
}
}
//power();
// Hole - SD Card
module sdcard() {
translate ([-1,24,3]) cube([8,14,3.5]); //<-- changed for B+ sd -> microsd (28->14)
}
// Ventilation
module vents() {
cube([2,10,10]);
translate([4,0,0]) cube([2,10,10]);
translate([8,0,0]) cube([2,10,10]);
}
// Elements //
*difference() {
union() {
difference() {
basebox();
ethernet();
}
translate ([2,58,2]) cube([20,2,4]);
translate ([2,2,2]) cube([20,2,4]);
translate ([66,58,2]) cube([20,2,4]);
translate ([59,2,2]) cube([20,2,4]);
}
digital();
hdmi();
usb();
power();
sdcard();
}
difference() {
union() {
difference() {
topbox();
ethernet();
}
translate ([63,2,9]) cube([20,2,17]);
//translate ([18,2,9]) cube([20,2,17]);
translate ([64,58,9]) cube([20,2,17]);
translate ([18,58,11]) cube([20,2,15]);
translate ([2,20,9]) cube([2,20,17]);
}
digital();
hdmi();
usb();
translate([5,-1,19]) vents();
translate([5,53,19]) vents();
}