1- // TODO: speaker holders should end at cutLine
2- // increase underPCBs by 2.5
31
42use < roundedsquare.scad> ;
53use < certamenbutton.scad> ;
@@ -10,7 +8,7 @@ TOP = 1;
108BOTTOM = 2 ;
119WASHERS = 3 ;
1210
13- mode = DEMO ;
11+ mode = WASHERS ;
1412
1513screwLength = 9.61 ;
1614
@@ -37,13 +35,13 @@ megaPCBThickness = 1.66;
3735megaFrontCutouts = [ [7 , megaPCBThickness, 12.23 , 10.82 ],
3836 [ 37.78 , megaPCBThickness, 9.04 , 11 ] ];
3937cbWidth = 54.9 ;
40- cbLength = 99.06 ; // between edges of RJ-45 breakout board
38+ cbLength = 93 ; // 99.06 between edges of RJ-45 breakout board
4139cbPCBThickness = 1.7 ;
4240cbFrontCutouts = [
4341 [5.88 ,5.45 ,15.15 ,11.56 ] /* B */ ,
4442 [cbWidth- 5.58 - 15.15 ,5.45 ,15.15 ,11.56 ] /* A */ ];
4543cbBackCutouts = [[cbWidth- 5.58 - 15.15 ,5.45 ,15.15 ,11.56 ] /* C */ ];
46- cbHoles = [[4.04 ,7.5 ],[cbWidth- 4.04 ,7.5 ],[4.04 ,84.6 + 7.5 ],[cbWidth- 4.04 ,84.6 + 7.5 ]];
44+ cbHoles = [[4.04 ,4.19 ],[cbWidth- 4.04 ,4.19 ],[4.04 ,84.6 + 4.19 ],[cbWidth- 4.04 ,84.6 + 4.19 ]];
4745
4846pcbThickness = max (cbPCBThickness,megaPCBThickness);
4947
@@ -107,7 +105,7 @@ labelX = (screenX - screenHeight/2)*0.5-labelSize/2;
107105labelY = insideLength/2 ;
108106
109107cbX = fitTolerance;
110- cbY = fitTolerance ;
108+ cbY = insideLength/ 2 - cbLength/ 2 ;
111109megaX = 3 * fitTolerance+ cbWidth+ boardDivider;
112110megaY = fitTolerance;
113111topZ = boxHeight- topThickness- bottomThickness;
@@ -155,14 +153,14 @@ module contents(visualize=true) {
155153 cutoutLength = visualize?10 :100 ;
156154 extraCutout = visualize?0 :cutoutTolerance;
157155 color ("blue" ) {
158- translate ( [megaX,fitTolerance ,underPCBs] ) cube ([megaWidth, megaLength, megaPCBThickness]);
159- translate ([megaX,fitTolerance - cutoutLength,underPCBs]) cutouts(megaFrontCutouts, cutoutLength,extraCutout);
156+ translate ( [megaX,megaY ,underPCBs] ) cube ([megaWidth, megaLength, megaPCBThickness]);
157+ translate ([megaX,megaY - cutoutLength,underPCBs]) cutouts(megaFrontCutouts, cutoutLength,extraCutout);
160158 }
161159 color ("red" ) {
162- translate ( [cbX,fitTolerance ,underPCBs])
160+ translate ( [cbX,cbY ,underPCBs])
163161 cube ([cbWidth, cbLength, cbPCBThickness]);
164- translate ([cbX,fitTolerance - cutoutLength,underPCBs]) cutouts(cbFrontCutouts, cutoutLength,extraCutout);
165- translate ([cbX,fitTolerance + cbLength,underPCBs]) cutouts(cbBackCutouts, cutoutLength,extraCutout);
162+ translate ([cbX,cbY - cutoutLength,underPCBs]) cutouts(cbFrontCutouts, cutoutLength,extraCutout);
163+ translate ([cbX,cbY + cbLength,underPCBs]) cutouts(cbBackCutouts, cutoutLength,extraCutout);
166164 }
167165 color ([0 ,.4 ,0 ]) {
168166 translate ([screenX- screenHeight/2 - extraCutout,screenY- screenWidth/2 - extraCutout,topZ- 5 ]) cube ([screenHeight+ 2 * extraCutout,screenWidth+ 2 * extraCutout,cutoutLength+ 5 ]);
@@ -185,7 +183,8 @@ module boardMounts() {
185183 translate ([cbX- fitTolerance- pcbHolderThickness,0 ,0 ]) cube ([pcbHolderThickness,insideLength,pcbHolderHeight]);
186184 translate ([cbX+ cbWidth+ fitTolerance,0 ,0 ]) cube ([pcbHolderThickness,insideLength,pcbHolderHeight]);
187185 translate ([megaX+ megaWidth+ fitTolerance,0 ,0 ]) cube ([pcbHolderThickness,insideLength,pcbHolderHeight]);
188- translate ([0 ,insideLength- (megaLength- cbLength),0 ]) cube ([2 * fitTolerance+ cbWidth, megaLength- cbLength, pcbHolderHeight]);
186+ translate ([0 ,insideLength- (megaLength- cbLength)/2 ,0 ]) cube ([2 * fitTolerance+ cbWidth, pcbHolderThickness, underPCBs+ pcbThickness+ 1 ]);
187+ translate ([0 ,(megaLength- cbLength)/2 - pcbHolderThickness,0 ]) cube ([2 * fitTolerance+ cbWidth, pcbHolderThickness, underPCBs+ pcbThickness+ 1 ]);
189188 }
190189 box();
191190 }
@@ -258,13 +257,13 @@ module shell() {
258257}
259258
260259module speakerMount() {
261- height = nudge + topZ- speakerZ + 10 ;
260+ height = topZ- cutLine ;
262261 module strip() {
263262 cube ([speakerMountXStickout+ speakerMountThickness,speakerMountThickness,height]);
264263 translate ([speakerMountXStickout,0 ,0 ])
265264 cube ([speakerMountThickness,speakerMountYStickout+ speakerMountThickness,height]);
266265 }
267- translate ([speakerX+ nudge,speakerY,0 ])
266+ translate ([speakerX+ nudge,speakerY,nudge ])
268267 rotate ([0 ,0 ,180 ]) {
269268 translate ([0 ,0 ,topZ- height]) {
270269 translate ([0 ,- speakerDiameter1/2 - speakerMountThickness,0 ]) strip();
@@ -399,8 +398,19 @@ module screenWasher() {
399398 }
400399}
401400
401+ module pcbWasher() {
402+ pillarSize= screwHeadSize+ 2 * fitTolerance;
403+ length = 2 ;
404+ render (convexity= 2 )
405+ difference () {
406+ cylinder (d= pillarSize, h= length, $ fn= 16 );
407+ translate ([0 ,0 ,- nudge]) cylinder (d= screwHoleSize1+ 1 , h= length+ 2 * nudge, $ fn= 16 );
408+ }
409+ }
410+
402411module washers() {
403- for (i= [0 :3 ]) translate ([15 * i,0 ,0 ]) screenWasher();
412+ // for(i=[0:3]) translate([15*i,0,0]) screenWasher();
413+ for (i= [0 :3 ]) translate ([15 * i,15 ,0 ]) pcbWasher();
404414}
405415
406416module demo() {
0 commit comments