/* This is the landing gear support. You need one at the front an another at the back */ // allviews print view="print"; //view="landing"; width=110; // Width of the copter frame height=60; // Height of the landing gear depth=20; // plate size angle=20; // Angle of the legs module base(printpad){ //cube([width,4,10]); translate([0,0,0]) cube([10,depth,10]); translate([width-10,0,0]) cube([10,depth,10]); difference(){ cube([width,20,4]); { width2=width/2; translate([width2-36,10,0]) cylinder(r=3/2,h=100); translate([width2+36,10,0]) cylinder(r=3/2,h=100); } } if (printpad){ translate([-10,0,-10]) rotate([180,-90,90]) cube ([20,15,0.5]); translate([width-5,0,-10]) rotate([180,-90,90]) cube ([20,15,0.5]); } } module leg(printpad){ len=height/cos(angle); if(true){ difference(){ union(){ translate([0,depth/2,0]) cylinder (r=5,h=len); rotate([0,-90,0]) cube([len,depth,2]); if (printpad){ translate([-5,0,len-15]) rotate([180,-90,90]) cube ([20,10,0.5]); } } translate([0,40,len-5]) rotate([90,0,0]){ cylinder(r=5/2,h=100); } } }else{ cylinder(r=5,h=len); translate([-5,-5,len-10]) rotate([180,-90,90]) cube ([20,10,0.5]); } } module legs(printpad){ translate([5,0,2]) rotate ([0,-angle,0]) leg(printpad); translate([width-5,0,2]) rotate ([0,angle,0]) leg(printpad); } module landing_print(printpad){ base(printpad); legs(printpad); } module landing(){ rotate([180,0,90]) translate([-width/2,0,0]){ landing_print(false); } } if (view=="print"){ rotate([90,0,0]){ landing_print(true); } }else if (view=="landing"){ landing(); }