//show_bars = 1; //show_battery = 1; show_main = 1; show_top = 1; show_bot = 1; //show_adp = 1; show_kkb = 1; bar_thick=15.5; wall_thick=3; plate_thick=3; if (show_main){ top_barmount(bar_thick,wall_thick,plate_thick); } if (show_bot){ bot_barmount(bar_thick,wall_thick,plate_thick); } if (show_top){ translate([0,0,10]) brd_plate(bar_thick,wall_thick,plate_thick); } if (show_adp){ translate([0,0,23]) ardupilot(); } if (show_kkb){ translate([0,0,23]) kk_board(); } if (show_bars){ translate([158,0,0]) bar(300,bar_thick); translate([-158,0,0]) bar(300,bar_thick); rotate([0,0,90]) translate([-158,0,0]) bar(300,bar_thick); rotate([0,0,90]) translate([158,0,0]) bar(300,bar_thick); } //batt_out = 59; if (show_battery){ // rotate([0,0,45]) translate([0,batt_out,0]) battery(); // rotate([0,0,225]) translate([0,batt_out,0]) battery(); rotate([90,0,45]) translate([0,-21,-20]) battery(); rotate([90,0,45]) translate([0,-21,20]) battery(); } module channel (h,bt,wt){ rotate([0,90,0]) difference(){ cube([bt+(wt*2),bt+(wt*2),h], center=true); #cube([bt,bt,h], center=true); } } module top_barmount(bt,wt,pt){ rotate([0,0,0]) difference(){ union(){ #rotate([0,0,45]) translate([0,0,((bt/2)+(wt/2))]) cube([90,90,pt], center=true); channel(100,bt,wt); rotate([0,0,90]) channel(100,bt,wt); } translate([0,0,-8]) cube([130,130,20], center=true); //cut translate([0,65,0]) cube([bt+(wt*2),bt+(wt*2),bt+(wt*2)+2], center=true); //edge translate([0,-65,0]) cube([bt+(wt*2),bt+(wt*2),bt+(wt*2)+2], center=true); translate([65,0,0]) cube([bt+(wt*2),bt+(wt*2),bt+(wt*2)+2], center=true); translate([-65,0,0]) cube([bt+(wt*2),bt+(wt*2),bt+(wt*2)+2], center=true); translate([35,0,-20]) rotate([0,0,90]) #cylinder(r=1.75, h=40, $fn=10); // body screw translate([-35,0,-20]) rotate([0,0,90]) #cylinder(r=1.75, h=40, $fn=10); translate([0,35,-20]) rotate([0,0,90]) #cylinder(r=1.75, h=40, $fn=10); translate([0,-35,-20]) rotate([0,0,90]) #cylinder(r=1.75, h=40, $fn=10); translate([35,0,9.6]) rotate([0,0,90]) #cylinder(r=4.5, h=3, $fn=6); // nut trap translate([-35,0,9.6]) rotate([0,0,90]) #cylinder(r=4.5, h=3, $fn=6); translate([0,35,9.6]) rotate([0,0,90]) #cylinder(r=4.5, h=3, $fn=6); translate([0,-35,9.6]) rotate([0,0,90]) #cylinder(r=4.5, h=3, $fn=6); translate([22,22,0]) rotate([0,0,90]) #cylinder(r=1.75, h=20, $fn=10); // top plate screw translate([-22,22,0]) rotate([0,0,90]) #cylinder(r=1.75, h=20, $fn=10); translate([22,-22,0]) rotate([0,0,90]) #cylinder(r=1.75, h=20, $fn=10); translate([-22,-22,0]) rotate([0,0,90]) #cylinder(r=1.75, h=20, $fn=10); /* rotate([0,0,45]) translate([42,0,10]) #cube([2,18,10], center=true); //velcro slots rotate([0,0,225]) translate([42,0,10]) #cube([2,18,10], center=true); rotate([0,0,135]) translate([42,0,10]) #cube([2,18,10], center=true); rotate([0,0,315]) translate([42,0,10]) #cube([2,18,10], center=true); */ } } module bot_barmount(bt,wt,pt){ rotate([0,180,0]) difference(){ union(){ #rotate([0,0,45]) translate([0,0,((bt/2)+(wt/2))]) cube([90,90,pt], center=true); channel(100,bt,wt); rotate([0,0,90]) channel(100,bt,wt); } translate([0,0,-10]) cube([130,130,20], center=true); //cut translate([0,65,0]) cube([bt+(wt*2),bt+(wt*2),bt+(wt*2)], center=true); //edge translate([0,-65,0]) cube([bt+(wt*2),bt+(wt*2),bt+(wt*2)], center=true); translate([65,0,0]) cube([bt+(wt*2),bt+(wt*2),bt+(wt*2)], center=true); translate([-65,0,0]) cube([bt+(wt*2),bt+(wt*2),bt+(wt*2)], center=true); translate([35,0,-20]) rotate([0,0,90]) #cylinder(r=1.75, h=40, $fn=10); // body screw translate([-35,0,-20]) rotate([0,0,90]) #cylinder(r=1.75, h=40, $fn=10); translate([0,35,-20]) rotate([0,0,90]) #cylinder(r=1.75, h=40, $fn=10); translate([0,-35,-20]) rotate([0,0,90]) #cylinder(r=1.75, h=40, $fn=10); rotate([0,0,45]) translate([40,0,10]) #cube([2,18,10], center=true); //velcro slots rotate([0,0,225]) translate([40,0,10]) #cube([2,18,10], center=true); rotate([0,0,135]) translate([40,0,10]) #cube([2,18,10], center=true); rotate([0,0,315]) translate([40,0,10]) #cube([2,18,10], center=true); } } module brd_plate (bt,wt,pt){ difference(){ union(){ rotate([0,0,45]) translate([0,0,((bt/2)+(wt/2))]) cube([80,80,pt-1], center=true); translate([22,22,-2]) cylinder(r=5, h=10, $fn=20); translate([-22,22,-2]) cylinder(r=5, h=10, $fn=20); translate([22,-22,-2]) cylinder(r=5, h=10, $fn=20); translate([-22,-22,-2]) cylinder(r=5, h=10, $fn=20); } translate([0,0,-10]) cube([130,130,20], center=true); //cut translate([0,50,0]) cube([bt+(wt*8),bt+(wt*2),bt+(wt*2)], center=true); //edge translate([0,-50,0]) cube([bt+(wt*8),bt+(wt*2),bt+(wt*2)], center=true); translate([50,0,0]) cube([bt+(wt*2),bt+(wt*8),bt+(wt*2)], center=true); translate([-50,0,0]) cube([bt+(wt*2),bt+(wt*8),bt+(wt*2)], center=true); // translate([25,25,0]) rotate([0,0,90]) #cylinder(r=1.75, h=20, $fn=10); // top plate screw // translate([-25,25,0]) rotate([0,0,90]) #cylinder(r=1.75, h=20, $fn=10); // translate([25,-25,0]) rotate([0,0,90]) #cylinder(r=1.75, h=20, $fn=10); // translate([-25,-25,0]) rotate([0,0,90]) #cylinder(r=1.75, h=20, $fn=10); // rotate([0,0,45]){ // translate([17.655,30.545,0]) rotate([0,0,90]) cylinder(r=1.15, h=20, $fn=10); //adp holes // translate([-17.655,30.545,0]) rotate([0,0,90]) cylinder(r=1.15, h=20, $fn=10); // translate([17.655,-30.545,0]) rotate([0,0,90]) cylinder(r=1.15, h=20, $fn=10); // translate([-17.655,-30.545,0]) rotate([0,0,90]) cylinder(r=1.15, h=20, $fn=10); // } translate([22,22,0]) rotate([0,0,90]) cylinder(r=1.15, h=20, $fn=10); //KK holes translate([-22,22,0]) rotate([0,0,90]) cylinder(r=1.15, h=20, $fn=10); translate([22,-22,0]) rotate([0,0,90]) cylinder(r=1.15, h=20, $fn=10); translate([-22,-22,0]) rotate([0,0,90]) cylinder(r=1.15, h=20, $fn=10); } } module ardupilot(){ //v2.5 rotate([0,0,45]) difference(){ color("purple") cube([40.64,66.42,1], center=true); translate([17.655,30.545,0]) rotate([0,0,90]) cylinder(r=1.15, h=4, $fn=10); translate([-17.655,30.545,0]) rotate([0,0,90]) cylinder(r=1.15, h=4, $fn=10); translate([17.655,-30.545,0]) rotate([0,0,90]) cylinder(r=1.15, h=4, $fn=10); translate([-17.655,-30.545,0]) rotate([0,0,90]) cylinder(r=1.15, h=4, $fn=10); } } module kk_board(){ difference(){ color("green") cube([50,50,1], center=true); translate([22,22,0]) rotate([0,0,90]) cylinder(r=1.15, h=4, $fn=10); translate([-22,22,0]) rotate([0,0,90]) cylinder(r=1.15, h=4, $fn=10); translate([22,-22,0]) rotate([0,0,90]) cylinder(r=1.15, h=4, $fn=10); translate([-22,-22,0]) rotate([0,0,90]) cylinder(r=1.15, h=4, $fn=10); } } module bar(l,bt){ rotate([0,90,0]) color("silver") cube([bt,bt,l], center=true); } module battery(){ color("blue") cube([76,19,36], center=true); }