/* Blimp construction kit v4 Gian Pablo Villamil August 2011 */ $fn = 64; hull_res = 64; numengines = 2; enginespan = 50; name = "Makerbot"; use ; module thetext() { rotate([0,0,270]) union() { translate([26,5,-20]) // left side: + to move back scale([1.5,0.4,0.4]) rotate([90,270,90]) Orbitron_Bold(name); translate([-26,5,105]) // right side: + to move back scale([1.5,0.4,0.4]) rotate([90,90,270]) Orbitron_Bold(name); } windows(); } module half_sphere(rad) { difference() { sphere(rad); translate([-rad,-rad,-rad]) cube([rad*2,rad*2,rad]); } } module quarter_sphere(rad) { difference() { sphere(rad); translate([-rad,-rad,-rad]) cube([rad*2,rad*2,rad]); translate([-rad,-rad,0]) cube([rad,rad*2,rad]); } } module dome(rad, height) { difference() { scale([1,1,height/rad]) sphere(rad); translate([0,0,-height/2]) cube([rad*2,rad*2,height],center=true); } } module hollow_dome(rad,height,thickness){ difference() { dome(rad,height); dome(rad-thickness,height-thickness); } } module half_torus(outerradius,height,thickness) { innerradius = outerradius - thickness; scale([1,1,height/thickness]) difference() { rotate_extrude(convexity = 10 , $fn = hull_res ) translate([innerradius, 0, 0]) circle(r = thickness, $fn = 32); translate([-outerradius,-outerradius,-thickness]) cube([outerradius*2,outerradius*2,thickness]); } } module fan(radius,numblades) { intersection() { for(i = [0:numblades-1]){ rotate([90,0,(360/numblades)*i]) translate([0,0,0]) linear_extrude(height=radius+2) polygon(points=[[0,1],[8,-1],[0,-1]]); } cylinder(r=radius-1,h=10); } } module engine_intake(radius,height) { half_torus(radius,height,2,$fn=48); translate([0,0,height-5]) fan(radius,16); dome(3,height,$fn=48); cylinder(r=radius-2,h=height-5); } module wing(root_chord, tip_chord, length, thickness) { rotate([0,90,0]) scale([thickness/root_chord,1,1]) cylinder(r1=root_chord, r2=tip_chord, h=length); } module fuselage(rad, length, taper_pc) { hull_length=length*(1-taper_pc); rotate([-90,0,0]) cylinder(r1=rad,r2=rad,h=hull_length); translate([0,hull_length,0]) rotate([-90,0,0]) scale([1,1,(length-hull_length)/rad]) half_sphere(rad); rotate([90,90,0]) scale([1,1,2.5]) quarter_sphere(rad); rotate([90,-90,0]) scale([1,1,1.2]) quarter_sphere(rad); rotate([90,-90,0]) scale([0.5,1,2.5]) quarter_sphere(rad); } module fin(span, sweep, root, tip){ intersection() { scale([0.3,1,1]) rotate([sweep+90,0,0]) cylinder(r1=root/2,r2=tip/2,h=span); cylinder(r=span,h=80,center=true); } } module tailfin(span, sweep, root, tip){ intersection() { scale([0.2,1,1]) rotate([sweep+90,0,0]) cylinder(r1=root/2,r2=tip/2,h=span); cylinder(r=span-10,h=80,center=true); } } module gondola(span, sweep, root, tip){ intersection() { scale([0.4,1,1]) rotate([sweep+90,0,0]) cylinder(r1=root/2,r2=tip/2,h=span); translate([-span/2,-(span-10),-root/2]) cube([span,span/2,root],center=false); } } module engine_fin(angle) { rotate([0,0,angle]){ translate([0,0,25]) fin(enginespan,0,20,15); translate([0,-enginespan,25]) union() { engine_intake(10,15); translate([0,0,1]) rotate([180,0,0]) engine_intake(10,15);} } } module windows() { for (i = [2:5]){ translate([34,0,i*10]) rotate([90,0,0]) cylinder(r=4, h =30, center = true) ; } translate([34,0,5]) rotate([90,0,0]) scale([1,2,1]) cylinder(r=4,h=30,center=true); } module assembly() { translate([0,0,40]) dome(30,140); translate([0,0,40]) rotate([0,180,0]) dome(30,100); // engines translate([0,0,20]) { engine_fin(-210); engine_fin(30); } // tailfins translate([0,0,140]){ rotate([0,0,0]) tailfin(50,-15,60,20); rotate([0,0,90]) tailfin(50,-15,60,20); rotate([0,0,180]) tailfin(50,-15,60,20); rotate([0,0,270]) tailfin(50,-15,60,20); } // gondola translate([0,0,30]) rotate([0,0,90]) gondola(50,0,80,40); } module hull() { difference() { assembly(); thetext(); } } module deco() { intersection() { assembly(); thetext(); } } module hull_emboss() { union() { difference() { assembly(); thetext(); } translate([0,0,40]) dome(29,139); translate([0,0,40]) rotate([0,180,0]) dome(29,99); translate([0,0,29.5]) rotate([0,0,90]) gondola(48,0,80,38); } } module top_half(cutpoint) { intersection() { translate([0,0,-cutpoint]) assembly(); translate([0,0,90]) cube([140,140,180],center=true); } } module bottom_half(cutpoint) { intersection() { translate([0,0,-cutpoint]) assembly(); translate([0,0,-90]) cube([140,140,180],center=true); } } module hull_back(cutpoint) { intersection() { translate([0,0,-cutpoint]) hull(); translate([0,0,90]) cube([140,140,180],center=true); } } module hull_front(cutpoint) { intersection() { translate([0,0,-cutpoint]) hull(); translate([0,0,-90]) cube([140,140,180],center=true); } } module hull_e_back(cutpoint) { intersection() { translate([0,0,-cutpoint]) hull_emboss(); translate([0,0,90]) cube([140,140,180],center=true); } } module hull_e_front(cutpoint) { intersection() { translate([0,0,-cutpoint]) hull_emboss(); translate([0,0,-90]) cube([140,140,180],center=true); } } module deco_back(cutpoint) { intersection() { translate([0,0,-cutpoint]) deco(); translate([0,0,90]) cube([140,140,180],center=true); } } module deco_front(cutpoint) { intersection() { translate([0,0,-cutpoint]) deco(); translate([0,0,-90]) cube([140,140,180],center=true); } } // plain ship // rotate([0,90,0]) translate([0,0,-44]) // union() {%assembly(); thetext();} //top_half(45); //rotate([0,180,0]) bottom_half(45); // dualstrusion ship //rotate([0,0,270]) hull_back(45); //rotate([0,180,90])hull_front(45); //rotate([0,0,270]) deco_back(45); //rotate([0,180,90]) deco_front(45); // deco(); // hull(); // embossed ship //rotate([0,0,270]) hull_e_back(45); //rotate([0,180,90])hull_e_front(45); //rotate([0,90,0]) translate([0,0,-44]) //hull_emboss(); //%cube([100,100,1],center=true);