//Wifi radio box $fn=50; wall = 0.1*25.4; //wall thickness post = 0.3*25.4; //0.3" mounting post PCB = 41.275/2; //Define PCB size in millimeters Height = 14.8/2; //total package height mount = 33.655/2; //PCB mounting holes clearance = 4/2; //PCB clearance module post(){ difference(){ translate([-post/2,-post/2,0]) minkowski(){ //Post cube([post,post,clearance]); cylinder(r=2,h=clearance); } translate([0,0,-0.1]) cylinder(r=1.5,h=10); //Drill shaft } } //Located at 1.125"x1.375" from lower left corner module LED(){ translate([(41.275-1.125*25.4),-(41.275-1.375*25.4),0]) cube([2,3,Height*4],center = true); } module USB(){ translate([0,30,4/2+clearance*2+3+0.8]) rotate([90,0,0]) cube([10,4,30],center = true); } module body(){ translate([mount ,mount ,(3+clearance*2+0.8)])post(); //Back right translate([-mount ,mount,(3+clearance*2+0.8)])post(); //Back left translate([mount ,-mount,(3+clearance*2+0.8)])post(); //Front right translate([-mount ,-mount,(3+clearance*2+0.8)])post(); //Front left difference(){ translate([-(PCB+wall),-(PCB+wall),0]) minkowski(){ //Body cube([2*(PCB+wall),2*(PCB+wall),Height]); cylinder(r=2,h=Height); } translate([-PCB,-PCB,(Height*2)-1]) minkowski(){ //Detent cube([2*PCB,2*PCB,Height]); cylinder(r=2,h=Height); } translate([-PCB,-PCB,-3]) minkowski(){ //Inner cavity cube([2*PCB,2*PCB,Height]); cylinder(r=2,h=Height); } LED(); //LED hole USB(); //USB hole } } body();