Skip to content

Commit a9328a8

Browse files
committed
main components updated
1 parent 819f133 commit a9328a8

File tree

1 file changed

+103
-59
lines changed

1 file changed

+103
-59
lines changed

shell.scad

Lines changed: 103 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -32,30 +32,6 @@ module mainBoard(height=12){
3232
}
3333
}
3434

35-
//bottomShell
36-
module bottomShell(){
37-
length=64;
38-
width=38;
39-
$fn=100;
40-
difference(){
41-
translate([1,1,0]) hull(){
42-
cylinder(1,1,1);
43-
translate([width-2,0,0]) cylinder(1,1,1);
44-
translate([0,length-2,0]) cylinder(1,1,1);
45-
translate([width-2,length-2,0]) cylinder(1,1,1);
46-
}
47-
translate([9,length-42.65,-0.1]) cube([20,10,1.2]);
48-
49-
//screw holes
50-
translate([2.05,length-2.05,-0.3]) cylinder(1.4,1.1,2);
51-
translate([2.05,2.05,-0.3]) cylinder(1.4,1.1,2);
52-
translate([width-2.05,2.05,-0.3]) cylinder(1.4,1.1,2);
53-
translate([width-2.05,length-2.05,-0.3]) cylinder(1.4,1.1,2);
54-
}
55-
56-
translate([width/2,length-42.65,1]) moduleConnection();
57-
}
58-
5935
module moduleSlot(){
6036
cube([5,40.65,2]);
6137
//outerbarrier
@@ -92,16 +68,67 @@ module moduleConnection(){
9268
translate([10,0,0]) moduleSlot();
9369
}
9470

71+
//roundedCubeEdge
72+
module roundedCubeEdge(r=2){
73+
$fn=100;
74+
difference(){
75+
sphere(r);
76+
translate([-r-0.1,-r-0.1,-r-0.1]) cube([2*r+0.2,2*r+0.2,r+0.1]);
77+
translate([-r-0.1,-r-0.1,-0.1]) cube([r+0.1,2*r+0.2,r+0.2]);
78+
translate([-r-0.1,-r-0.1,-0.1]) cube([2*r+0.2,r+0.1,r+0.2]);
79+
}
80+
}
81+
82+
//bottomShell
83+
module bottomShell(){
84+
length=64;
85+
width=38;
86+
$fn=100;
87+
difference(){
88+
translate([1,1,0]) hull(){
89+
cylinder(1,1,1);
90+
translate([width-2,0,0]) cylinder(1,1,1);
91+
translate([0,length-2,0]) cylinder(1,1,1);
92+
translate([width-2,length-2,0]) cylinder(1,1,1);
93+
}
94+
//connector cutout
95+
translate([9,length-42.65,-0.1]) cube([20,10,1.2]);
96+
97+
//screw holes
98+
translate([2.05,length-2.05,-0.3]) cylinder(1.4,1.1,2);
99+
translate([2.05,2.05,-0.3]) cylinder(1.4,1.1,2);
100+
translate([width-2.05,2.05,-0.3]) cylinder(1.4,1.1,2);
101+
translate([width-2.05,length-2.05,-0.3]) cylinder(1.4,1.1,2);
102+
}
103+
104+
translate([width/2,length-42.65,1]) moduleConnection();
105+
}
106+
95107
//carrierShell
96108
module carrierShell(){
97109
length=64;
98110
width=38;
99111
$fn=100;
100-
translate([1,1,0]) hull(){
101-
cylinder(1,1,1);
102-
translate([width-2,0,0]) cylinder(1,1,1);
103-
translate([0,length-2,0]) cylinder(1,1,1);
104-
translate([width-2,length-2,0]) cylinder(1,1,1);
112+
difference(){
113+
translate([1,1,0]) hull(){
114+
cylinder(1,1,1);
115+
translate([width-2,0,0]) cylinder(1,1,1);
116+
translate([0,length-2,0]) cylinder(1,1,1);
117+
translate([width-2,length-2,0]) cylinder(1,1,1);
118+
}
119+
120+
//connector cutout
121+
translate([9,length-42.65,-0.1]) cube([20,10,1.2]);
122+
123+
//main screw holes
124+
translate([2.05,length-2.05,-1.1]) cylinder(1.4,2,1.1);
125+
translate([2.05,length-2.05,0.2])cylinder(0.9,1.1,1.1);
126+
translate([2.05,2.05,-1.1]) cylinder(1.4,2,1.1);
127+
translate([2.05,2.05,0.2])cylinder(0.9,1.1,1.1);
128+
translate([width-2.05,2.05,-1.1]) cylinder(1.4,2,1.1);
129+
translate([width-2.05,2.05,0.2])cylinder(0.9,1.1,1.1);
130+
translate([width-2.05,length-2.05,-1.1]) cylinder(1.4,2,1.1);
131+
translate([width-2.05,length-2.05,0.2])cylinder(0.9,1.1,1.1);
105132
}
106133
}
107134

@@ -110,46 +137,63 @@ module topShell(height=25){
110137
length=66;
111138
width=40;
112139
$fn=100;
140+
113141
difference(){
114-
//outerskin
115-
translate([2,2,0]) hull(){
116-
cylinder(height-2,2,2);
117-
translate([0,0,height-2]) rotate([0,0,180]) roundedCubeEdge();
118-
translate([width-4,0,0]) cylinder(height-2,2,2);
119-
translate([width-4,0,height-2]) rotate([0,0,270]) roundedCubeEdge();
120-
translate([0,length-4,0]) cylinder(height-2,2,2);
121-
translate([0,length-4,height-2]) rotate([0,0,90]) roundedCubeEdge();
122-
translate([width-4,length-4,0]) cylinder(height-2,2,2);
123-
translate([width-4,length-4,height-2]) rotate([0,0,0]) roundedCubeEdge();
124-
}
125-
//innerskin
126-
translate([2,2,-0.2]) cube([width-4,length-4,height-2.2]);
127-
128-
//inner edge for the bottom shell and the carrier shell
129-
translate([2,2,-0.2]) hull(){
130-
cylinder(2.2,1.2,1.2);
131-
translate([width-4,0,0]) cylinder(2.2,1.2,1.2);
132-
translate([0,length-4,0]) cylinder(2.2,1.2,1.2);
133-
translate([width-4,length-4,0]) cylinder(2.2,1.2,1.2);
142+
union(){
143+
difference(){
144+
//outerskin
145+
translate([2,2,0]) hull(){
146+
cylinder(height-2,2,2);
147+
translate([0,0,height-2]) rotate([0,0,180]) roundedCubeEdge();
148+
translate([width-4,0,0]) cylinder(height-2,2,2);
149+
translate([width-4,0,height-2]) rotate([0,0,270]) roundedCubeEdge();
150+
translate([0,length-4,0]) cylinder(height-2,2,2);
151+
translate([0,length-4,height-2]) rotate([0,0,90]) roundedCubeEdge();
152+
translate([width-4,length-4,0]) cylinder(height-2,2,2);
153+
translate([width-4,length-4,height-2]) rotate([0,0,0]) roundedCubeEdge();
154+
}
155+
//innerskin
156+
translate([2,2,-0.2]) cube([width-4,length-4,height-2.2]);
157+
158+
//inner edge for the bottom shell and the carrier shell
159+
translate([2,2,-0.2]) hull(){
160+
cylinder(2.2,1.2,1.2);
161+
translate([width-4,0,0]) cylinder(2.2,1.2,1.2);
162+
translate([0,length-4,0]) cylinder(2.2,1.2,1.2);
163+
translate([width-4,length-4,0]) cylinder(2.2,1.2,1.2);
164+
}
165+
}
166+
167+
//main screw mount body
168+
translate([3,3,2]) cylinder(5,3,3);
169+
translate([3,3,7]) rotate([0,0,45]) cylinder45Cut();
170+
translate([width-3,3,2]) cylinder(5,3,3);
171+
translate([width-3,3,7]) rotate([0,0,135]) cylinder45Cut();
172+
translate([3,length-3,2]) cylinder(5,3,3);
173+
translate([3,length-3,7]) rotate([0,0,315]) cylinder45Cut();
174+
translate([width-3,length-3,2]) cylinder(5,3,3);
175+
translate([width-3,length-3,7]) rotate([0,0,225]) cylinder45Cut();
134176
}
177+
//main screw mount holes
178+
translate([3,3,1.9]) cylinder(5,1.6,1.6);
179+
translate([width-3,3,1.9]) cylinder(5,1.6,1.6);
180+
translate([3,length-3,1.9]) cylinder(5,1.6,1.6);
181+
translate([width-3,length-3,1.9]) cylinder(5,1.6,1.6);
135182
}
136183
}
137184

138-
//roundedCubeEdge
139-
module roundedCubeEdge(r=2){
185+
module cylinder45Cut(r=3){
140186
$fn=100;
187+
boxHeight= sqrt(8*r*r);
141188
difference(){
142-
sphere(r);
143-
translate([-r-0.1,-r-0.1,-r-0.1]) cube([2*r+0.2,2*r+0.2,r+0.1]);
144-
translate([-r-0.1,-r-0.1,-0.1]) cube([r+0.1,2*r+0.2,r+0.2]);
145-
translate([-r-0.1,-r-0.1,-0.1]) cube([2*r+0.2,r+0.1,r+0.2]);
189+
cylinder(2*r,r,r);
190+
translate([r,-r,0]) rotate([0,315,0]) cube([2*r,2*r,boxHeight]);
146191
}
147192
}
148193

149194
//translate([2.5,7,17]) ioBoard();
150195
//translate([2.5,12,5]) mainBoard();
151196
//translate([2.5,2,2]) connectorBoard();
152-
//translate([1,1,1]) carrierShell();
153-
//%topShell();
154-
mirror([0,0,1]);
155-
bottomShell();
197+
//bottomShell();
198+
//%translate([1,1,1]) carrierShell();
199+
topShell();

0 commit comments

Comments
 (0)