1+ // connector-board
2+ module connectorBoard(height=4){
3+ $ fn= 100 ;
4+ difference (){
5+ cube ([30 ,20 ,height]);
6+ translate ([3.3 ,10 ,- 0.5 ]) cylinder (height+ 1 ,1.1 ,1.1 );
7+ translate ([30 - 3.3 ,10 ,- 0.5 ]) cylinder (height+ 1 ,1.1 ,1.1 );
8+ }
9+ }
10+
11+ // io-board
12+ module ioBoard(height=4){
13+ $ fn= 100 ;
14+ difference (){
15+ cube ([35 ,42 ,height]);
16+ translate ([3.3 ,3.3 ,- 0.5 ]) cylinder (height+ 1 ,1.1 ,1.1 );
17+ translate ([35 - 3.3 ,3.3 ,- 0.5 ]) cylinder (height+ 1 ,1.1 ,1.1 );
18+ translate ([3.3 ,42 - 3.3 ,- 0.5 ]) cylinder (height+ 1 ,1.1 ,1.1 );
19+ translate ([35 - 3.3 ,42 - 3.3 ,- 0.5 ]) cylinder (height+ 1 ,1.1 ,1.1 );
20+ }
21+ }
22+
23+ // Mainboard
24+ module mainBoard(height=8){
25+ $ fn= 100 ;
26+ difference (){
27+ cube ([35 ,52 ,height]);
28+ translate ([3.3 ,3.3 ,- 0.5 ]) cylinder (height+ 1 ,1.1 ,1.1 );
29+ translate ([35 - 3.2 ,3.3 ,- 0.5 ]) cylinder (height+ 1 ,1.1 ,1.1 );
30+ translate ([3.3 ,52 - 3.3 ,- 0.5 ]) cylinder (height+ 1 ,1.1 ,1.1 );
31+ translate ([35 - 3.2 ,52 - 3.3 ,- 0.5 ]) cylinder (height+ 1 ,1.1 ,1.1 );
32+ }
33+ }
34+
35+ // bottomShell
36+ module bottomShell(){
37+ length= 64 ;
38+ width= 38 ;
39+ $ fn= 100 ;
40+ translate ([1 ,1 ,0 ]) hull (){
41+ cylinder (1 ,1 ,1 );
42+ translate ([width- 2 ,0 ,0 ]) cylinder (1 ,1 ,1 );
43+ translate ([0 ,length- 2 ,0 ]) cylinder (1 ,1 ,1 );
44+ translate ([width- 2 ,length- 2 ,0 ]) cylinder (1 ,1 ,1 );
45+ }
46+ }
47+
48+ // carrierShell
49+ module carrierShell(){
50+ length= 64 ;
51+ width= 38 ;
52+ $ fn= 100 ;
53+ translate ([1 ,1 ,0 ]) hull (){
54+ cylinder (2 ,1 ,1 );
55+ translate ([width- 2 ,0 ,0 ]) cylinder (2 ,1 ,1 );
56+ translate ([0 ,length- 2 ,0 ]) cylinder (2 ,1 ,1 );
57+ translate ([width- 2 ,length- 2 ,0 ]) cylinder (2 ,1 ,1 );
58+ }
59+ }
60+
61+ // topShell
62+ module topShell(height=25){
63+ length= 66 ;
64+ width= 40 ;
65+ $ fn= 100 ;
66+ difference (){
67+ // outerskin
68+ translate ([2 ,2 ,0 ]) hull (){
69+ cylinder (height- 2 ,2 ,2 );
70+ translate ([0 ,0 ,height- 2 ]) rotate ([0 ,0 ,180 ]) roundedCubeEdge();
71+ translate ([width- 4 ,0 ,0 ]) cylinder (height- 2 ,2 ,2 );
72+ translate ([width- 4 ,0 ,height- 2 ]) rotate ([0 ,0 ,270 ]) roundedCubeEdge();
73+ translate ([0 ,length- 4 ,0 ]) cylinder (height- 2 ,2 ,2 );
74+ translate ([0 ,length- 4 ,height- 2 ]) rotate ([0 ,0 ,90 ]) roundedCubeEdge();
75+ translate ([width- 4 ,length- 4 ,0 ]) cylinder (height- 2 ,2 ,2 );
76+ translate ([width- 4 ,length- 4 ,height- 2 ]) rotate ([0 ,0 ,0 ]) roundedCubeEdge();
77+ }
78+ // innerskin
79+ translate ([2 ,2 ,- 0.2 ]) cube ([width- 4 ,length- 4 ,height- 2.2 ]);
80+
81+ // inner edge for the bottom shell and the carrier shell
82+ translate ([2 ,2 ,- 0.2 ]) hull (){
83+ cylinder (3.2 ,1 ,1 );
84+ translate ([width- 4 ,0 ,0 ]) cylinder (3.2 ,1 ,1 );
85+ translate ([0 ,length- 4 ,0 ]) cylinder (3.2 ,1 ,1 );
86+ translate ([width- 4 ,length- 4 ,0 ]) cylinder (3.2 ,1 ,1 );
87+ }
88+ }
89+ }
90+
91+ // roundedCubeEdge
92+ module roundedCubeEdge(r=2){
93+ $ fn= 100 ;
94+ difference (){
95+ sphere (r);
96+ translate ([- r- 0.1 ,- r- 0.1 ,- r- 0.1 ]) cube ([2 * r+ 0.2 ,2 * r+ 0.2 ,r+ 0.1 ]);
97+ translate ([- r- 0.1 ,- r- 0.1 ,- 0.1 ]) cube ([r+ 0.1 ,2 * r+ 0.2 ,r+ 0.2 ]);
98+ translate ([- r- 0.1 ,- r- 0.1 ,- 0.1 ]) cube ([2 * r+ 0.2 ,r+ 0.1 ,r+ 0.2 ]);
99+ }
100+ }
101+
102+ translate ([2.5 ,7 ,19 ]) ioBoard();
103+ translate ([2.5 ,12 ,10 ]) mainBoard();
104+ translate ([1 ,1 ,0 ]) bottomShell();
105+ translate ([1 ,1 ,1 ]) carrierShell();
106+ % topShell();
0 commit comments