//* ALL DIMENSION ARE IN MILLIMETERS*// include; /* MODULE */ module pi3() { // PCB color("DarkGreen") difference() { hull() { translate([-(85-6)/2,-(56-6)/2,0]) cylinder(r=3, h=1.4 ); translate([-(85-6)/2, (56-6)/2,0]) cylinder(r=3, h=1.4 ); translate([ (85-6)/2,-(56-6)/2,0]) cylinder(r=3, h=1.4 ); translate([ (85-6)/2, (56-6)/2,0]) cylinder(r=3, h=1.4 ); } translate([-85/2+3.5,-49/2,-1]) cylinder(d=2.75, h=3); translate([-85/2+3.5, 49/2,-1]) cylinder(d=2.75, h=3); translate([58-85/2+3.5,-49/2,-1]) cylinder(d=2.75, h=3); translate([58-85/2+3.5, 49/2,-1]) cylinder(d=2.75, h=3); } // Header translate([3.5-85/2+29-10*2.54,49/2-2.54,1.4]) header(20,2); translate([-85/2,-56/2,1.4]) { color("LightGrey") { // Ethernet translate([85-19,11.5-16/2,0]) cube([21,16,13.8]); // USB translate([85-15, 29-13/2,0]) cube([17,13,15.5]); translate([85-15, 47-13/2,0]) cube([17,13,15.5]); // micro USB translate([10.6-8/2,-1.5,0]) cube([8,6,2.6]); // HDMI translate([32-15/2,-1.5,0]) cube([15,11.5,6.6]); } color("DarkSlateGray") { // Audio translate([53.5-7/2,-2,0]) { translate([0,2,0]) cube([7,13,5.6]); translate([7/2,0,5.6/2])rotate([-90,0,0]) cylinder(d=5.6,h=2); } // Display translate([1.1,(49-22)/2,0]) cube([4,22,5.5]); // Camera translate([45-4/2,1.1,0]) cube([4,22,5.5]); } // Micro SD Card color("LightGrey") translate([0,22,-2.9]) cube([13,14,1.5]); color("Red") translate([-2.4,23.5,-2.65]) cube([2.4,11,1]); } } module header(pins, rows) { color("darkgrey") cube([2.54*pins,2.54*rows,1.27]); for(x=[0:pins-1],y=[0:rows-1]) translate([x*2.54+(1.27+.6)/2,y*2.54+(1.27+.6)/2,-3.5]) cube([0.6,0.6,11.5]); } module navio2(){ translate([0,0,13.4]) { // PCB color("Black",1) difference(){ translate([(65-85)/2,0,0]) hull(){ translate([-(65-6)/2,-(56-6)/2,0]) cylinder(r=3, h=1.4 ); translate([-(65-6)/2, (56-6)/2,0]) cylinder(r=3, h=1.4 ); translate([ (65-6)/2,-(56-6)/2,0]) cylinder(r=3, h=1.4 ); translate([ (65-6)/2, (56-6)/2,0]) cylinder(r=3, h=1.4 ); } translate([-85/2+3.5,-49/2,-1]) cylinder(d=2.75, h=3); translate([-85/2+3.5, 49/2,-1]) cylinder(d=2.75, h=3); translate([58-85/2+3.5,-49/2,-1]) cylinder(d=2.75, h=3); translate([58-85/2+3.5, 49/2,-1]) cylinder(d=2.75, h=3); } // Header down translate([3.5-85/2+29-10*2.54,49/2-2.54,-8]) color("darkgrey",0.8) cube([2.54*20,5.08,8]); // Header up translate([3.5-85/2+29-10*2.54,49/2-2.54,1]) color("darkgrey") cube([2.54*20,5.08,3]); // Pin rack translate([-37.5,0,2]) rotate([0,0,180]) angle_header(rows=15,cols=3,pitch=2); // GPS antenna plug translate([10,-5,5]) color("Gold") union(){ cylinder(h=5,r=2,center=true); translate([0,0,-3]) cube([6,6,4],center=true); } //Thing 1 color("darkgrey",1) translate([8,10,3]) cube([13,8,3],center=true); //Arrow translate([0,0,3]) rotate([0,0,-90]) color("White") polygon( points=[[0,0],[1,1],[2,0],[1,3]] ); //UART translate([5,-25,5]) color("White") cube([9,4,3],center=true); //I2C translate([-9,-25,5]) color("White") cube([4.5,4,3],center=true); //ADC translate([-18,-25,5]) color("White") cube([9,4,3],center=true); //Power translate([-30,-25,5]) color("White") cube([9,4,3],center=true); } } module angle_header(rows,cols,pitch){ offsety=((cols+1)*pitch)-((cols+1)*pitch)/2; offsetx=-1*((rows-1)/2*pitch); rotate([0,90,0]) translate([0,offsetx,offsety]) union(){ for(j=[0:1:cols-1]){ translate([-1*pitch*j,0,0]) for(i=[0:1:rows-1]){ translate([0,pitch*i,0])angle_pin(pitch,j); } } } } module angle_pin(pitch=2.54,col=0){ rotate([90,0,0])corner(r=pitch, s=pitch, p=pitch,column=col); translate([-pitch,0,0])h_pin(p=pitch); } module corner(r=1,s=1,p=2.54,column=0){ s=p/4+0.005; w=(r<1)?1:r*2; h=p*4-0.5; d=s/2; if(column==0){ translate([0,-1*(p+d),d])rotate([0,90,0])cube([s,s,p],center=false); translate([p,-p,0])rotate([0,-90,0])mirror([0,0,d]) rotate([0,0,45])cylinder($fn=4,r1=sqrt(2*pow(d,2)),r2=0,h=d,center=false); difference(){ rotate_extrude($fn=100,angle=90)translate([r,0,0])square(s,center=true); translate([0,0,-0.1]) union(){ translate([0,0,-1])cube([w+0.1,w+0.1,w]); translate([0,-w,-1])cube([w+0.1,w+0.1,w]); translate([-w,0,-1])cube([w+0.1,w+0.1,w]); } } translate([0,-1*(p+d),d])rotate([0,90,0])cube([s,s,p],center=false); translate([p,-p,0]) rotate([0,-90,0]) mirror([0,0,d]) rotate([0,0,45])cylinder($fn=4,r1=sqrt(2*pow(d,2)),r2=0,h=d,center=false); }else{ translate([-1*(p+d),0,-d])rotate([90,0,0])cube([s,s,p*column],center=false); translate([0,-column*p,0]) difference(){ rotate_extrude($fn=100,angle=90)translate([r,0,0])square(s,center=true); translate([0,0,-0.1]) union(){ translate([0,0,-1])cube([w+0.1,w+0.1,w]); translate([0,-w,-1])cube([w+0.1,w+0.1,w]); translate([-w,0,-1])cube([w+0.1,w+0.1,w]); } } translate([0,-1*(column+1)*p-d,d])rotate([0,90,0]) cube([s,s,(column+1)*p],center=false); translate([(column+1)*p,-1*(column+1)*p,0]) rotate([0,-90,0])mirror([0,0,d])rotate([0,0,45]) cylinder($fn=4,r1=sqrt(2*pow(d,2)),r2=0,h=d,center=false); } } module h_pin(p=2.54){ s=p/4+0.005; h=p*4-0.5; base=h/3; d=s/2; union(){ color("gold")union(){ translate([0,0,h])rotate([0,0,45]) cylinder($fn=4,r1=sqrt(2*pow(d,2)),r2=0,h=d,center=false); translate([-d,-d,0])cube([s,s,h],center=false); } color("Dimgray")difference(){ translate([0,0,base+d])cube([p,p,p],center=true); union(){ translate([1.9*s,1.9*s,base+d])rotate([0,0,45]) cylinder($fn=3,r=2*d,h=p+1,center=true); translate([1.9*s,-1.9*s,base+d-0.15])rotate([0,0,-45]) cylinder($fn=3,r=2*d,h=p+1,center=true); translate([-1.9*s,-1.9*s,base+d-0.3])rotate([0,0,180+45]) cylinder($fn=3,r=2*d,h=p+1,center=true); translate([-1.9*s,1.9*s,base+d-0.3])rotate([0,0,180-45]) cylinder($fn=3,r=2*d,h=p+1,center=true); } } } } translate([0,0,0]) rotate([0,0,90]) pi3(); translate([0,0,-2.5]) rotate([0,0,90]) navio2();