// use use use use use use use use use bottomPlate = 0; wall = 2; $fn = 100; //50 200 // rounding resolution <--------------- CHANGE IT BEFORE EXPORT error = 0.4; // 0.4; helmetRadius = 300; topShift = 2.5; // 2 // height shift of top part clipRotateShift = 20; // turn angle of perimeter clip holders busStopperShift = 0; busStopperWidth = 0.6; // ----------------------- battery holder wall ------------- module batteryWall( width, height, radius, depth ){ // translate([-height/2,-width/2,-depth/2]) //difference (){ translate([radius,radius,0]) hull() { translate([0, 0, 0]) cylinder(depth, radius, radius); translate([height-radius*2, 0, 0]) cylinder(depth, radius, radius); translate([0, width-radius*2, 0]) cylinder(depth, radius, radius); translate([height-radius*2, width-radius*2, 0]) cylinder(depth, radius, radius); } //} // translate([0, width-radius, 0]) cube ([height,radius,depth]); } module batteryWallComplex(){ batteryWall ( 14.5, 60, 5, 1 ); translate([0,0,1.5]) batteryWall ( 14.5, 60, 5, 1 ); translate([20,-1,0]) rotate([0,0,90]) cube([1,10,1]); translate([50,-1,0]) rotate([0,0,90]) cube([1,10,1]); } // translate([0,0,-10]) batteryWallComplex(); // ----------------------- speaker hole -------------------- module roundHole ( length, radius, depth ) { difference(){ translate ([length/2, 0, -depth/2]) hull() { translate([-length, 0, 0]) cylinder(depth, radius, radius); cylinder(depth, radius, radius); } } } // ----------------------- round stopper ------------------- module roundStopper ( length, radius ) { difference(){ depth = 1; translate ([length/2, 0, -depth/2]) hull() { translate([-length, 0, 0]) cylinder(depth, radius, radius); cylinder(depth, radius, radius); } } } // ---------------------- bolt holder ---------------------- module boltHolder( shift ){ length = 15 + shift; diameter = 2; bottomShift = 1.7; innerHoleLength = 12; difference(){ translate([ 0, 0, 1 - bottomShift]) color("red") cylinder(length, 3, 3); translate([ 0, 0, -1 - bottomShift]) color("red") cylinder(innerHoleLength, diameter/2, diameter/2 ); translate([ 0, 0, -1 - bottomShift]) color("red") cylinder(3, 2.5, diameter/2); } } // ---------------------- bolt holder bottom --------------- module boltHolderBottom( height ){ diameter = 2; difference(){ translate([ 0, 0, 0]) color("red") cylinder( height, 3, 3); translate([ 0, 0, -1]) color("red") cylinder( height + 2, diameter/2, diameter/2 ); } } // ---------------------- bolt hole ------------------------ module boltHole(){ translate([ 0, 0, -7.5]) color("red") cylinder(14, 2.7, 2.7); color("red") cylinder(14, 1.25, 1.25); translate([ 0, 0, -1]) color("red") cylinder(8, 8, 1); } // ---------------------- PCB round holder ----------------- module PCBRoundHolder(){ //difference(){ translate([ 0, -25, 11]) color("red") cylinder(5, 2, 2); //translate([ 0, 0, -1]) color("red") cylinder(5, 2, 2); //} } // ---------------------- PCB holder ----------------------- module PCBHolder(){ translate([ -0.5, -44, 11 + totalPCBShift]) difference(){ translate([0,1,-1]) cube([1,8,5]); // translate([ -5, 0, -1]) rotate([35,0,0]) cube([10,10,10]); translate([ -1, 0, 1]) rotate([28,0,0]) cube([15,15,15]); } } // color("red") translate ([0,0,30]) PCBHolder(); // --------------------- GPS holder ------------------------ module GPSHolder(){ difference () { translate([ 0, 29.5,9]) cube(size = [18,5,16], center = true); // 12 translate([ 0, 32,7.5]) cube(size = [15,7,17], center = true); // clip translate([ 0, 29.5,7.5]) cube(size = [16.2,2,17], center = true); // pass } // translate([ -5, 27.3, 10.5]) sphere(r=1); // translate([ 5, 27.3, 10.5]) sphere(r=1); // translate([ 0, -17,0]) rotate(180) PCBHolder(); translate([0, 26,13 + totalPCBShift]) color("red") cube([1,3,4 + 2],center=true); // PCB holder } // ---------------------- sound PCB hole ------------------- module soundPCBhole(){ translate([ 0, 37, -4]) color("green") cube([18, 10, 7], center=true); // center holder difference(){ slightShift = 0.2; translate([ 0, 15 + slightShift, 1]) color("green") cube([18 - 2, 15, 6], center=true); // translate([ 0, 8, 0]) color("green") cube([10, 2, 1], center=true); // translate([5,7.5,-0.5]) rotate([0,90,0]) cylinder(4,0.5,0.5); translate([-3,7.5 + slightShift,-0.5]) rotate([0,90,0]) cylinder(6,0.5,0.5); } // jack hole difference(){ rotate([90,0,0]) translate([ -5, -5, -55.5]) cylinder (14, 2.75, 2.75); // translate: 55 (open hole) rotate([90,0,0]) translate([ -5, -5, -43]) cylinder (0.5, 2.75, 2.75); // stopper } rotate([90,0,0]) translate([ -5, -5, -58]) cylinder (14, 4.25, 4.25); } // ---------------------- charger PCB hole ----------------- module chargerPCBhole(){ // inner quad place bottomShift = 3; translate([ 0, 37.5, -4 + bottomShift/2]) color("green") cube([17.1, 10, 7 - bottomShift], center=true); // center holder translate([ 0, 1, 0]) difference(){ translate([ 0, 22, 0]) color("green") cube([18, 15, 6], center=true); // translate([ 0, 8, 0]) color("green") cube([10, 2, 1], center=true); translate([6,14.5,-0.5 - 1]) rotate([0,90,0]) cylinder(3,0.6,0.6); // clip translate([3.5,14.5 + 1.5,-0.5 - 1]) rotate([0,90,0]) cylinder(3,0.6,0.6); // clip translate([2,14,-0.5]) cube([9,4,5], center=true); } // usb hole difference(){ translate([0,50,-3.3]) rotate([90,180,0]) microusb(10); // translate: 50 (open hole) translate([0,43.5,-3.3]) rotate([90,180,0]) microusb(0.5); // stopper } // translate([0,53,-3.3]) rotate([90,180,0]) microusb(10); // translate: 50 (open hole) translate([-1,74.5,-3.3]) rotate([90,0,0]) microusb_frame(30); // led // translate([-6,42,-3.3]) rotate([0,90,90]) cylinder(13,1,1); difference(){ translate([-6,42,-3.3]) rotate([0,90,90]) cylinder(13,1,1); translate([-6,42.7,-3.3]) rotate([0,90,90]) cylinder(0.5,2,2); // stopper } } // ---------------------- switcherhole --------------------- module switcherHole(){ translate([ 0, 37.5, -3.25]) color("green") cube([12, 10, 5], center=true); // button hole translate([0,43.5,-3.3]) rotate([90,180,0]) difference(){ roundHole ( 5, 1.2, 6 ); translate([0,0,0.5]) roundHole ( 5, 1.2, 0.5 ); // stopper } // outer frame translate([0,47,-3.3]) rotate([90,0,0]) roundHole ( 7, 2.3, 6 ); } // ---------------------- cross stand ---------------------- module crossStand(standLenght){ widthOfCross = 5; widhtOfSegment = 0.5; fixHoleRadius = 0.6; // intersection(){ translate([0,0,standLenght/2]) { // translate([0,(widthOfCross-widhtOfSegment)/2,0]) cube([widthOfCross, widhtOfSegment, standLenght]); // difference(){ cube([widthOfCross, widhtOfSegment, standLenght], center=true); // translate([widthOfCross/2, widhtOfSegment,standLenght - 5]) rotate([90,90,0]) cylinder(widhtOfSegment*2, fixHoleRadius, fixHoleRadius); // } rotate(90) cube([widthOfCross, widhtOfSegment, standLenght], center=true); } // cylinder(standLenght,standLenght * sin(45)/cos(45),1); //} } // crossStand(5); // ---------------------- segment with clip ---------------- module segment(depth, width, radius, angle){ difference(){ intersection (){ cylinder (depth , radius, radius); // cylinder (2 , 46 - wall + error + fixatorWidth, 46 - wall + error + fixatorWidth); intersection(){ cube([radius,radius,depth]); rotate([0,0,90 - angle]) cube([radius,radius,depth]); } } translate([0,0,-1]) cylinder (depth + 2 , radius - width, radius - width); } // rotate([0,0,25]) translate([43,0,0]) color("purple") cylinder(2,clipRadius,clipRadius); } module clipSegment(depth, width, radius, angle){ clipRadius = 1; // ounded holder swing clip radius angleOfStopper = 6; depthOfStopper = 5; translate([0,0,2]) segment(depth, width, radius, angle - angleOfStopper); // long segment rotate([0,0,-angle + angleOfStopper]) translate([0,0,-1.1]) segment(depthOfStopper, width , radius , angleOfStopper); // depth, width, radius, angle // short segment rotate([0,0,-angle + 100]) translate([radius-1.1,0,-0.1]) cylinder(2.5, clipRadius, clipRadius); // clip // rotate([0,0,180]) segment(depth, width, radius, angle); } // rotate([0,0,-20]) color("purple") clipSegment(2.3 - error, 2.5 - error/2, 44.5 - error/2, 43); module clipSegmentSimple(depth, width, radius, angle){ clipRadius = 0.8; // ounded holder swing clip radius angleOfStopper = 6; depthOfStopper = 5; translate([0,0,2]) segment(depth, width, radius, angle - angleOfStopper - 13.5); // long segment // rotate([0,0,-angle + angleOfStopper]) translate([0,0,-1.1]) segment(depthOfStopper, width , radius , angleOfStopper); // depth, width, radius, angle // short segment // rotate([0,0,-angle + 100]) translate([radius-1.1,0,-0.1]) cylinder(2.5, clipRadius, clipRadius); // clip // rotate([0,0,180]) segment(depth, width, radius, angle); } module clipCounterSegment(depth, width, radius, angle){ clipRadius = 1.05; // ounded holder swing clip radius angleOfStopper = 6; depthOfStopper = 5; difference(){ translate([0,0,0]) segment(depth, width-0.6, radius+1, angle - angleOfStopper); // long segment rotate([0,0,-angle + 100]) translate([radius-1.1,0,-0.1]) cylinder(2.5, clipRadius, clipRadius); // clip rotate([0,0,-angle-1]) translate([-0.2,35,-1]) rotate(45) cube([10,10,10]); // corner cut for clip } // rotate([0,0,-angle + angleOfStopper]) translate([0,0,-1.1]) segment(depthOfStopper, width , radius , angleOfStopper); // depth, width, radius, angle // short segment // rotate([0,0,180]) segment(depth, width, radius, angle); } // rotate([0,0,-20]) color("red") clipCounterSegment(2.3 - error, 2.5 - error/2, 44.5 - error/2, 43); // perimeterFixator(2); // ---------------------- perimeter bottom fixator -------- module perimeterFixator(bottomWall){ // cylinder perimeter fixator color ("green") rotate ([0,0,46.5]) { segment(4-0.1, bottomWall -0.5, 46 - wall -0.5, 90); rotate([0,0,180]) segment(4-0.1, bottomWall -0.5, 46 - wall -0.5, 90); additionalSegmentAngle = 30; rotate([0,0,additionalSegmentAngle]) segment(4-0.1, bottomWall -0.5, 46 - wall -0.5, additionalSegmentAngle); rotate([0,0,180 + additionalSegmentAngle]) segment(4-0.1, bottomWall -0.5, 46 - wall -0.5, additionalSegmentAngle); } /* color ("blue", 0.5) translate([ 0, 0, -1]) difference (){ translate([ 0, 0, -1.6]) cylinder (6.5 , 46 - wall - 0.5, 46 - wall - 0.5); // height of fixator translate([ 0, 0, -10]) cylinder (17, 46 - wall - bottomWall, 46 - wall - bottomWall ); // translate([ 0, 0, 3]) cube([120, 20, bottomPlate + 6], center=true); // bus hole // removed part for rubber bus wire // rotate([0,0,33]) translate([ 0, 0, 3]) cube([120, 20, bottomPlate + 6], center=true); // rotate([0,0,17]) translate([ 0, 0, 3]) cube([120, 20, bottomPlate + 6], center=true); } */ } // ----------------------- pcb clip ------------------------ module pcbClip( width ) { { length = 1; difference() { union(){ translate([0,0,length/2]) cube([1,width,6 + length],center=true); translate([-0.8,0,-2.25]) cube([1.2,width,1.4],center=true); } translate([-3.4,0,-2]) rotate([0,45,0]) cube([6,width+2,3],center=true); } } } // --------------- bus hole stopper ----------------- module busHoleStopper( substBoxShift ){ // -7 intersection(){ difference(){ translate([0,0,-9]) cylinder(5, 45 + busStopperShift, 45 + busStopperShift); translate([0,0,-10]) cylinder(7, 45 - busStopperWidth + busStopperShift, 45 - busStopperWidth + busStopperShift); translate([-50,-10,substBoxShift]) cube([10,20,10]); } translate([-45,0,-7 ]) rotate([90,0,90]) roundHole ( 13, 1.5, 6 ); } } // --------------------------------------------------------- // ---------------------- top part ------------------------ // --------------------------------------------------------- module topEarBody () { difference () { // main difference () { difference () { // top ear body intersection() { sphere(r = 46); translate([ 0, 0, -65 + topShift ]) sphere(r = 90); } // flat bottom translate([ -60, -60, bottomPlate-50 ]) cube([120,120,50]); } // sticker place translate([ 0, 0, 17 + topShift ]) color("green") cylinder(30, 35, 35); } // hole difference () { intersection() { sphere(r = 46 - wall); translate([ 0, 0, -65 + topShift]) sphere(r = 90 - wall); } // flat under the sticker place translate([ 0, 0, 17 - wall + topShift ]) cylinder(30, 40, 40); } // perimeter fixator hole translate([ 0, 0, error * 3 - 3]) cylinder (6 , 46 - wall + error, 46 - wall + error); // bus hole (moved to the bottom) rotate([0,0,90]) translate([ 0, 45, 0]) color("blue") rotate([90,0,0]) roundHole ( 13, 1.5, 6 ); rotate([0,0,90 - 180]) translate([ 0, 45, 0]) color("blue") rotate([90,0,0]) roundHole ( 13, 1.5, 6 ); // antenna hole translate([ 0, 0, 14]) color("red") cylinder(8, 3.3, 3.3); // translate([ 0, -5, 0]) cube([11,11,50]); // buttons and leds holes // holes(50); buttons(50); // im logo translate([0,12,17.3 + 0.3]) color("red") rotate([0,180,0]) scale(0.3) imlogo(2); // slight antenna recess // translate([0,0,16.9]) cylinder(ahHeight + 1, ahDiameter/2, ahDiameter/2, center = true, $fn=6); // scirts under buttons translate([0,-4.8,13]) color("blue", 0.5) underButtons(5); } // buss hole stopper translate([0,0,7]) busHoleStopper(-17); rotate(180) translate([0,0,7]) busHoleStopper(-17); // buss stripe holder // translate([-45,-5,2]) cube([10,10,1]); // translate([8,0,16]) difference(){ // translate([-47,0,-7.5]) rotate([90,90,0]) roundHole ( 15, 0.5, 6 ); // translate([-50,-10,-1 + topShift ]) cube([10,20,10]); // } // bolts holders //translate ([0,0,+ topShift]){ rotate (-20) translate([ -35.5, 0, 1]) boltHolder( topShift ); rotate (20) translate([ 35.5, 0, 1]) boltHolder( topShift ); rotate (-20) translate([ 35.5, 0, 1]) boltHolder( topShift ); rotate (20) translate([ -35.5, 0, 1]) boltHolder( topShift ); //} // PCB holders color("red") translate ([0,0, + topShift]){ PCBHolder(); rotate([0,0,70]) PCBHolder(); rotate([0,0,110]) PCBHolder(); rotate([0,0,-70]) PCBHolder(); rotate([0,0,-110]) PCBHolder(); // translate([ -0.5, 21, 10]) color("red") cube([1,2,5]); } // GPS holder color ("green") translate([ 0, 0, 0 + topShift]) GPSHolder(); // rounded holder swing for (a =[0:3]) rotate([0,0,clipRotateShift + 50 + 90*a]) color("red") clipCounterSegment(2.3 - error, 2.5 - error/2, 44.5 - error/2, 43); // pcb cross stands // for (a =[0:3]) rotate (a*90) translate([12,0,16]) crossStand(5); // pcb clips translate([39.9,0,14 - 1.6 + totalPCBShift]) color ("red") pcbClip(20); rotate(180) translate([39.9,0,14 - 1.6 + totalPCBShift]) color ("red") pcbClip(20); // antenna holder translate([0,0,17 - 2.9]) color ("red") { difference(){ // antenna parameters ahHeight = 7; ahDiameter = 9.3; // inner hole external dia of antenna ! ahWall = 1; cylinder(ahHeight, ahDiameter/2 + ahWall, ahDiameter/2 + ahWall, center = true, $fn=6); cylinder(ahHeight + 1, ahDiameter/2, ahDiameter/2, center = true, $fn=6); // translate([0,0,-4.3]) rotate([20,0,0]) cube([20,15,5], center=true); // bevel for AA batt // translate([0,0,-4.3]) rotate([-20,0,0]) cube([20,15,5], center=true); // bevel for AA batt // removable stands // shHeight = 5; translate([0,0,0.5]) for (a =[0:2]) rotate([0,0,30 + a*60]) cube([1,20,shHeight], center=true); } // antenna bolt clips for (a =[1:3]) rotate( 120 * a) translate([0,4.3,-2.5]) sphere(0.5); } } // ---------------------- new speaker pad holder ---------- module speakerPad () { } // --------------------------------------------------------- // ----------------------- bottom part --------------------- // --------------------------------------------------------- module bottomEarBody ( height ) { bottomShift = -2; speakerBottomWall = 2; difference () { // flat part union () { intersection() { sphere(r = 46); // translate([ -60, -60, 0]) cube([120, 120, bottomPlate]); translate([ -60, -60, -20]) difference () { cube([120, 120, 20 + bottomPlate ]); // helmet radius sphere translate([ 60, 60, -helmetRadius + 20 + bottomShift ]) sphere(r = helmetRadius); // $fn = 500 } } // translate([ -60, -200, -20]) translate([ 60, 60, -helmetRadius + 20]) sphere(r = helmetRadius); // speaker appendix translate([ 0, 0, bottomShift]) difference () { intersection() { translate([ 0, 0, 4 + bottomShift]) sphere(r = 46); translate([ 0, 40, -height-20-10]) cylinder (40, 40, 40); translate([ -60, -60, bottomPlate - height]) cube([120, 120, height]); } translate([ 0, 0, 0]) rotate ([-7.5, 0, 0]) { translate([0, 40, -10]) rotate_extrude(convexity = 10) translate([40, 0, 0]) circle(r = 10); } } // cylinder perimeter fixator perimeterFixator( speakerBottomWall ); } // speaker appendix hole qwe = 2; translate([ 0, 0, wall - 13]) intersection() { cylinder (14 , 48 - wall - speakerBottomWall - qwe , 48 - wall - speakerBottomWall -qwe ); translate([ 0, 41, bottomShift - 0]) difference(){ cylinder (14, 40 - wall - 11, 40 - wall + 1); translate([0,-33,4]) cube([60,10,20], center=true); } } // speaker holes speakerShift = -5; translate([ 0, 30 - speakerShift, -8 + bottomShift]) roundHole ( 10, 1, 6 ); translate([ 0, 25 - speakerShift, -8 + bottomShift]) roundHole ( 24, 1, 6 ); translate([ 0, 20 - speakerShift, -8 + bottomShift]) roundHole ( 24, 1, 6 ); translate([ 0, 15 - speakerShift, -8 + bottomShift]) roundHole ( 10, 1, 6); // sound pcb hole rotate([0,0,30]) soundPCBhole(); // USB charger pcb hole rotate([0,0,-30]) chargerPCBhole(); // translate([-6,4,-3.3]) rotate([0,90,90]) cylinder(13,1,1); // stopper // switcher hole switcherHole(); // bolts holes translate([0,0,-10]){ rotate (180 - 20) translate([ 35.5, 0, 1.5]) boltHole(); rotate (20) translate([ 35.5, 0, 1.5]) boltHole(); } // bus hole // roundHole( length, radius, depth ) rotate([0,0,90]) translate([ 0, 44, 0]) color("blue") rotate([90,0,0]) roundHole ( 13, 1.5, 6 ); rotate([0,0,90 - 180]) translate([ 0, 44, 0]) color("blue") rotate([90,0,0]) roundHole ( 13, 1.5, 6 ); // im logo translate([0,-35,-0.3]) color("red") rotate([180,180,0]) scale(0.3) imlogo(2); } // tiny stand under chargerPCBhole // rotate([0,0,-30]) translate([0,42,-5.25]) cube([6,2,1], center=true); // bus hole stopper translate([0,0,7]) busHoleStopper(-7); rotate(180) translate([0,0,7]) busHoleStopper(-7); // bolt hole bump (removed for battery holder movability) // rotate (180 - 20) translate([ 35.5, 0, 0]) boltHolderBottom( 1.8 ); // rotate (20) translate([ 35.5, 0, 0]) boltHolderBottom( 1.8 ); // switcher holder rotate(90) translate([39.2 + 1.2,0,-3]) color ("blue"){ translate([0,-6.3,0]) rotate([-90,0,-90]) pcbClip(3.7); translate([0,6.3,0]) rotate([-90,180,-90]) pcbClip(3.7); } /* translate([0,39.5,-3]) difference(){ cube([14,5.5,5], center=true); color ("red") translate([0,0.5,0]) cube([12,5,7], center=true); color ("red") translate([0,-1,0]) cube([10,5,7], center=true); color ("red") translate([0,-1,2]) cube([12,5,2], center=true); } */ // speaker holder translate([0,27.5,-11]) color("red") speaker(1); translate([-11.5,19.5,-11.5]){ length = 4; radius = 1; translate([0,0,0]) cylinder(length,radius,radius); translate([0,16.3,0]) cylinder(length,radius,radius); translate([22.8,16.3,0]) cylinder(length,radius,radius); translate([22.8,0,0]) cylinder(length,radius,radius); } // velcro place difference(){ translate([0,-25,-7]) rotate([0,0,180]) velcro(5); translate([ 0, 0, -20.5 -helmetRadius + 20 + bottomShift ]) color("blue",0.5) sphere(r = helmetRadius); } // pcb cross stands (moved on top) // translate([20,-10,6]) crossStand(13); // translate([-20,-10,6]) crossStand(13); // rounded holder swing clip segment rotate([0,0,-clipRotateShift]) color("purple") clipSegmentSimple(2.3 - error, 2.5 - error/2, 44.5 - error/2, 43); // depth, width, radius, angle rotate([0,0,90 - clipRotateShift]) color("purple") clipSegment(2.3 - error, 2.5 - error/2, 44.5 - error/2, 43); rotate([0,0,180 - clipRotateShift]) color("purple") clipSegmentSimple(2.3 - error, 2.5 - error/2, 44.5 - error/2, 43); rotate([0,0,180 + 90 - clipRotateShift]) color("purple") clipSegment(2.3 - error, 2.5 - error/2, 44.5 - error/2, 43); // im logo // translate([0,-35,-0.3]) color("red") rotate([180,180,0]) scale(0.3) imlogo(2); } /////////////////////////////////////////////////////////////////// // testing parameters rotateTop = 0; horizontalCutAngle = -90; // 20 -- bolt holes, 37 -- clip totalPCBShift = 0.5; topCompOn = 0; difference () { rotate (180 + rotateTop) translate([ 0, 0, 0]) topEarBody (); // rotate([0,0,horizontalCutAngle ]) translate([ 0, 80, -10]) cube(size = [160,160,160], center = true); // testing half cut // translate([0,0,26]) cube ([100,100,50], center=true); } // color("red", 0.5) cube ([92,92,10], center=true); /* difference () { translate([ 0, 0, -0]) bottomEarBody ( height=10 ); // rotate([0,0,horizontalCutAngle ]) translate([ 0, 80, -10]) cube(size = [160,160,160], center = true); // testing half cut // translate([0,0,26]) cube ([100,100,50], center=true); // -50 -- for perimener clip test } */ // rotate(20) translate([35.5,0,-4]) bolt(); // bolt if ( topCompOn ) { buttonLen = 4.5; // 7, 4.5 rotate([0,0,-18]) translate([-3,18.5,12.5 + totalPCBShift]){ cube([6,6,4]); translate([2.9,2.9,0]) color("gray") cylinder( buttonLen,3.4/2,3.4/2); } // move 0.3, cap skirt 0.5 // button // projection() translate([0,0,-1.6 + totalPCBShift]) color("green", 0.5) pcb(1.6, 41); // pcb translate([0,0,12 - 0.2]) cylinder(5.7,9/2,9/2,$fn=6); // anntenna bolts ~5.3mm thin // led translate([0,-21.7,16]) color ("blue") cylinder (5,3/2,3/2); translate([0,0,-1.6 + totalPCBShift]){ // omega2 rotate ([0,0,+rotateTop]) translate([ 0, +21,7.5]) color("purple", 0.5) cube(size = [42,26,10], center = true); translate([-13, -13, 3.5]){ translate([-26/2,0,0]) color("grey") cube([26 * 2,5,8.9]); // module connecctor headers translate([-26/2,2.5,-2]) color("purple") cube([26,10,1.6]); // pcb module // DAC translate([26/2 + 3,2.5,-1]) color("green") cube([22,15,5.7]); // pcb module // power supply translate([26/2 + 3 + 12,2.5 - 0.2 - 10,-1]) color("green") cube([10,10,0.5]); // pcb module // small power supply } rotate(180) translate([ 0, 32,9.5]) color("purple", 0.5) cube(size = [16,7,16], center = true); // GPS PA6C } } // power switcher // 4.6 x 4.7 x 11.5 // wide, white // translate([0,40,-3.3]) color("purple") powerSwitcher(); // power switcher // 3.7 x 3.5 x 8.5 // travel 2mm // black, cheap // translate([0,40.7,-3.3]) powerSwitcher2(); // color ("green", 0.5) translate([0,40,-23]) cube([12,5,5], center=true); // switcher // translate([ 0, 27.5, -28]) color("green", 0.5) cube([27,20,6], center=true); // speaker // translate([ 0, 27.5, -5]) color("green", 0.5) cube([27,20,12], center=true); // big speaker // rotate([0,0,-120]) translate([ -28.5, 0, -21.5]) color("green", 0.5) cube([27.7, 17.2, 1.2], center=true); // charger // rotate([0,0,-60]) translate([ -25, 0, -21.5]) color("green", 0.5) cube([34, 17.5, 6.5 - 5.5], center=true); // sound pcb // translate([ 0, -3, 6]) color ("green", 0.5) cube(size = [55,55,11], center = true); // 55x55x11 battery // translate([ 0, 0, 7.5]) color("green", 0.5) cube(size = [55,55,15], center = true); // 60x60x15 battery // translate([ 0, 0, 0]) color("green", 0.5) cylinder(15,32,32); // cylinder battery // rotate([0,0,90]) translate([ 0, 0, 8.5]) color("green", 0.5) cube(size = [63,58,17], center = true); // 4xAA battery // translate([ 0, 0, 8.5]) rotate([90,0,0]) color("green", 0.5) roundHole(61-8*2,16/2,57); // 4xAA battery (rounded box) /* translate([ -29, -63/2, 0]) rotate([90,0,90]) color("green", 0.5) batteryWall(16.5,63,16.5/2,58); // battery translate([ 0.5, 1, 8.5 - 20 ]) rotate([0,90,0]) color("green", 0.5) translate ([0,3,0]){ translate([ 0, 0, 0]) battery(); translate([ 0, -15, 0]) rotate([0,180,0]) battery(); translate([ 0, -30, 0]) battery(); translate([ 0, 15, 0]) rotate([0,180,0])battery(); } */ // -------------------- helpers ----------------------------- module powerSwitcher2(){ cube([8.5,3.5,3.7],center=true); translate([0,3.2,0]) cube([1.5,3,1.5],center=true); } module powerSwitcher(){ cube([11.5,4.6,4.7],center=true); translate([0,4.3,0]) cube([2,4,2],center=true); } module bolt(){ cylinder(1.7,4.2/2,4.2/2); cylinder(10,2/2,2/2); } module battery(){ translate([ 0, 0, -24 - 0.5 ]) { // rotate([0,90,0]) cylinder (49,7.25,7.25); translate([ 0, 0, -1]) cylinder (1,2.7,2.7); } } module pcb( thickness, radius ){ difference (){ translate([ 0, 0,12 + 0.5]) cylinder(thickness, radius, radius); translate([ 0, 0,12 + 0.5 -1 ]) cylinder(3, 6, 6); // antenna translate([0,-36.5,15]) cube([70,20,10], center=true); rotate([0,0,90]) translate([0,-49.3,15]) cube([70,20,10], center=true); // side cut rotate([0,0,90 - 180]) translate([0,-49.3,15]) cube([70,20,10], center=true); // side cut rotate([0,0,-20]) translate([35.5,0,10]) cylinder(5,3.3,3.3); // hole around bolt rotate([0,0,180 + 20]) translate([35.5,0,10]) cylinder(5,3.3,3.3); // hole around bolt rotate([0,0,180-20]) translate([35.5,0,10]) cylinder(5,3.3,3.3); // hole around bolt rotate([0,0,20]) translate([35.5,0,10]) cylinder(5,3.3,3.3); // hole around bolt } }