// allviews wingpart_left wingpart_right // allviews wing_fin_start-right wing_fin_end-right // allviews wing_fin_start-left wing_fin_end-left // allviews wing-fin tail-fin short-finpin long-finpin motorhook // allviews front body1 body2 // Tail parts // tail // allviews tail-arm-fin // Connects the servo to the tail fin // allviews tail-arm-rudder // Connects the servo to the rudder // allviews rudder // allviews rudder_hold // connect rudder to tail // allviews tail_servo_hold // Support for the two tail servos // allviews landing_gear-right landing_gear-left large-wheel small-wheel // viewsopts brim5mm // viewopts body1 brim10mm // viewopts short-finpin,long-finpin,motorhook,tail-arm.* h2 // viewopts wingpart_left,wingpart_right,wing_fin_.*,fin-.* h3 // testviews test-body1 test-body1-with-parts test-body1-with-largebatt // test-body2 test-wing-start test-wing-end // testviews test-fin all wingholder test-wingholder // testviews test-tail // Show the tail with fin and rudder // testviews test-tail-radius // Make sure the servo are getting in // testviews servo include include <../cadlib.h> wingpart_len=100; // the wing is assembled using 100 mm parts wingwidth=60; wingthick=11; wingthick_insert=0.75; // Reduction in height so the wingparts may attach wingwidth_insert=4; // Reduction in width so the wingparts may attach tonglen=10; // Length of the insert conelen=40; // Cone length of the front frontlen=conelen+tonglen+tonglen+1; screwr=1.8; // Hole for mounting screws threadr=1.6; // Radius for self threading hole (m3 screw) front_wheel_radius=25; back_wheel_radius=15; // The wing has a simple shape. The difficulty is to have a shape // with a smaller insert. So for now, we do a flat bottom with a curved top // Hope it will fly! module wingshape(wthick,width,len,hollow){ ray=(4*wthick*wthick+width*width)/(8*wthick); difference(){ translate([0,0,-ray+wthick]) rotate([0,90,0]) difference(){ cylinder(r=ray,h=len,$fn=40); if(hollow) cylinder(r=ray-0.5,h=len,$fn=40); } translate([-1,-1000/2,-1000]) cube([200,1000,1000]); } if (hollow)translate([0,-width/2,0]) cube([len,width,0.5]); } module wingpart(right){ width=wingwidth; len=wingpart_len; wthick=wingthick; // Thickness of the wing in the center t_insert=wingthick_insert; w_insert=wingwidth_insert; difference(){ union(){ translate([right?tonglen:0,0,0]) wingshape(wthick,width,len-tonglen,true); difference(){ union(){ // Make the start of the wing solid so it glue to .. translate([right?tonglen:len-tonglen-5,0,0]) wingshape(wthick,width,5,false); // this part translate([right?0:len-tonglen-5,0,0.5]) wingshape(wthick-2*t_insert,width-w_insert,tonglen+5,false); } // Hole to pass wires or save weight translate([right?-5:len-tonglen-6,0,1]) wingshape(wthick-3,width-10,30,false); } // Hole to support the longpin from the servo to the fin translate([right?0:len-1,0,1]) intersection(){ difference(){ translate([0,-9.5,0]) cube([1,8,10]); translate([0,-wingthick/2,wingthick/2-2]) rotate([0,90,0]) cylinder(r=3,h=2,$fn=20); } difference(){ wingshape(wthick-3,width-10,30,false); } } } union(){ // Two holes to attach the wingpart together translate([tonglen/2,5,0]) cylinder(r=screwr,h=wthick,$fn=20); translate([len-tonglen/2,5,0]) cylinder(r=screwr,h=wthick,$fn=20); } } } // Part of the wing holding the fin // The fin is installed between wing_fin_start and wing_fin_end module wing_fin_start(right){ wingcenter=wingpart_len/2; difference(){ union(){ wingpart(right); translate([wingcenter-2,0,0]) difference(){ wingshape(wingthick,wingwidth,2,false); translate([0,-wingthick/2,wingthick/2]) rotate([0,90,0]) cylinder(r=3,h=20,$fn=20); } translate([right?wingcenter-2:tonglen,0,0]) cube([wingcenter-tonglen,2,wingthick]); } union(){ translate([right?wingcenter:-1,-wingwidth/2,0]) cube([wingpart_len/2,wingwidth/2,20]); // Extra hole to secure wing_fin_end // There is already one hole made by wingpart translate([right?wingpart_len-tonglen/2:tonglen/2,wingwidth/2-10,0]) cylinder(r=screwr,h=wingthick,$fn=20); } } } // Just to complete the end of the wing (wing_fin_start) and secure the fin module wing_fin_end(right){ wingcenter=wingpart_len/2; difference(){ union(){ //wingpart(right); wingshape(wingthick-2*wingthick_insert,wingwidth-wingwidth_insert ,tonglen,false); } union(){ translate([right?0:2,-wingwidth/2,0]) cube([tonglen-2,wingwidth/2,20]); translate([tonglen/2,5,0]) cylinder(r=screwr,h=wingthick,$fn=20); translate([tonglen/2,wingwidth/2-10,0]) cylinder(r=screwr,h=wingthick,$fn=20); translate([-1,-wingthick/2,wingthick/2-1]) rotate([0,90,0]) cylinder(r=2.75,h=tonglen+1,$fn=20); } } } module wing_fin_end_old(right){ wingcenter=wingpart_len/2; difference(){ union(){ wingpart(right); // End the wing translate([right?wingpart_len-2:0,0,0]) wingshape(wingthick,wingwidth,2,false); // Put some strength in the middle translate([right?wingcenter:wingcenter-2,0,0]) difference(){ wingshape(wingthick,wingwidth,2,false); translate([0,-wingthick/2,wingthick/2]) rotate([0,90,0]) cylinder(r=3,h=20,$fn=20); } // Cover inside translate([right?0:wingpart_len-tonglen,0,1]) cube([tonglen,2,wingthick-2]); translate([right?tonglen:wingcenter,0,0]) cube([wingcenter-tonglen,2,wingthick]); } translate([right?0:wingcenter,-wingwidth/2,0]) cube([wingcenter,wingwidth/2,20]); } } module fin(len){ w2=wingthick/2; difference(){ difference(){ union(){ wingshape(wingthick,wingwidth,len,true); translate([len,0,0]) wingshape(wingthick,wingwidth,2,false); translate([0,0,0]) wingshape(wingthick,wingwidth,2,false); // Add some material so the pin hole is stronger translate([0,-9,2]) cube([8,7,7]); translate([len-8,-9,2]) cube([8,7,7]); } union(){ translate([-1,0,0]) cube([len+3,wingwidth,wingthick]); translate([len/2,-5,5]) rotate([45,0,0]) cube([len+10,3,3],center=true); } } translate([-1,-w2-1,w2]) rotate([0,90,0]) 3darc(20,20-w2,len+3,0,180,20); } translate([0,-w2-0.5,w2]) rotate([0,90,0]) 3darc(w2,0.5,len+2,0,164,40); } module wing_fin(){ fin (45); } // motorhook is used to connect the pin to the servo // pinhook is used to connect the pin to another pin // stopper is used to prevent the pin from moving out of the fin pw=2.4; pwlen=9; // Small pin length module finpin(len, pin, stopper, pinhook){ width=5; hole=3; diff=width-pw; start = pin ? pwlen : 0; if (pin){ translate([width/2,pwlen/2,width/2]) rotate([0,45,0]) cube([pw,pwlen,pw],center=true); // Add the support to help the print. Just cut it at the end thinw=vs_nozzle_diameter; translate([width/2-thinw/2,0,0]) cube([thinw,pwlen,3]); } if (stopper){ translate([-1,pwlen,0]) cube([7,1,pw]); } translate([width/2,start,width/2]) rotate([-90,0,0]) cylinder(r=width/2,h=len,$fn=20); if (pinhook){ // This is a hook so multiple pins may be connected together translate([0,start+len-5,0]) difference(){ translate([0,0,0]) cube([width,15,width]); diffh=width/2; translate([diffh,5+5,diffh]) rotate([0,45,0]) cube([hole,10,hole],center=true); } } } module motorhook(){ difference(){ union(){ translate([-1,0,0]) cube([1,45,4]); translate([5,0,0]) cube([1,45,4]); translate([0,0,0]) cube([5,45,1]); translate([0,35,0]) cube([5,10,6]); cube([6,5,1.1]); // Put the connecting pin translate([2.5,49,3]) rotate([0,45,0]) cube([pw,pwlen,pw],center=true); // Put a thin support under it translate([2.25,44,0]) cube([0.5,pwlen+0.5,3]); // Put the hook to the servo translate([2.5,0,3.5]) rotate([-90,0,0]){ cylinder(r=3.5,h=5,$fn=20); } } union(){ translate([2.5,0,3.5]) rotate([-90,0,0]){ translate([0,0,-1]) cylinder(r1=5.25/2,r2=5/2,h=5,$fn=20); cylinder(r=1,h=6,$fn=20); } } } } module front(){ ray=30; insert=0.75; difference(){ union(){ translate([0,0,tonglen]) difference(){ cylinder(r=ray,h=tonglen,$fn=40); cylinder(r=ray-insert,h=tonglen,$fn=40); } translate([0,0,2*tonglen]) difference(){ cylinder(r1=ray,r2=13,h=conelen,$fn=40); cylinder(r1=ray-insert,r2=13-insert,h=conelen,$fn=40); } translate([0,0,tonglen+tonglen+conelen-2]) cylinder(r=13,h=3); difference(){ cylinder(r=ray-insert,h=tonglen+5,$fn=40); cylinder(r=ray-2,h=tonglen+5,$fn=40); } } union(){ // Mounting holes for the motor translate([0,0,tonglen+tonglen+conelen-2]) rotate([0,0,45]){ cylinder(r=3,h=4,$fn=20); larger=8; smallr=6; //5.5; translate([larger,0,0]) cylinder(r=screwr,h=4,$fn=20); translate([-larger,0,0]) cylinder(r=screwr,h=4,$fn=20); translate([0,smallr,0]) cylinder(r=screwr,h=4,$fn=20); translate([0,-smallr,0]) cylinder(r=screwr,h=4,$fn=20); } // Hole for wires translate([0,0,tonglen+conelen]){ rotate([90,0,0]) cylinder(r=5,h=40,$fn=20); } // Holes to attache to the body translate([0,-ray-1,tonglen/2]) rotate([-90,0,0]) cylinder(r=threadr,h=2*ray+2,$fn=20); } } } module landing_gear(right){ radius=3.75; len=50; //translate([1,-10,7.5]) rotate([0,-30,-30])difference(){ translate([len-3,0,0]) rotate([0,90-30,right ? 30 : -30])difference(){ cylinder(r=radius,h=15,$fn=20); translate([radius,0,15/2+2]) rotate([0,-90,0]) cylinder(r=screwr,h=radius*2,$fn=20); } rotate([0,90,0]) cylinder(r=radius,h=len,$fn=20); } module wheel(dia){ difference(){ union(){ difference(){ cylinder(r=dia,h=10,$fn=80); translate([0,0,2]) cylinder(r=dia-1,h=10,$fn=80); } cylinder(r=5,h=14,$fn=20); } cylinder(r=screwr,h=14,$fn=20); } } servothick1=18; servoheight=12; servolen=23; module servo(arm_angle){ translate([-5,0,0]) cube([servothick1+5,servolen,servoheight]); translate([0,-(32-servolen)/2,0]) cube([2.5,32,servoheight]); translate([-10,0,0]) cube([10,servolen/2,servoheight]); translate([-15,servolen/4,servoheight/2]){ rotate([0,90,0]) cylinder(r=7/2,h=5); rotate([arm_angle,0,0]) translate([0,-7/2,-7/2]) cube([1,15,7]); } } wingholder_length=80; wingholder_baseradius=12; module wingholder(showmotor){ lenbase=wingholder_length; lentop=60; height=tonglen+15; servo_len=23; servo_width=13; servo_thick=19; // Area outside the wingholder difference(){ union(){ hull($fn=40){ translate([lenbase/2,9,-height]) cylinder(r=wingholder_baseradius*2,h=1); translate([-lenbase/2,9,-height]) cylinder(r=wingholder_baseradius*2,h=1); translate([0,0,height]){ translate([lentop/2,0,0]) cylinder(r=5,h=1); translate([-lentop/2,0,0]) cylinder(r=5,h=1); } } } union(){ // Remove the shape of body1 translate([-75,15,-30]) rotate([0,90,0]) cylinder(r=30,h=150,$fn=40); // Hole to connect the wings translate([0,-5,height+1]) rotate([0,90,90]){ wingshape(wingthick-2*wingthick_insert,wingwidth-wingwidth_insert ,height,false); *wingshape(wingthick,wingwidth,height,false); } holeh=height-tonglen/2; // Hole to screw the wing wingpos=5; translate([wingpos,20,holeh]) rotate([90,0,0]) cylinder(r=screwr,h=30,$fn=20); // Largers holes so the screw and nut are leveled translate([wingpos,9,holeh]) rotate([90,0,0]) cylinder(r=3,h=3,$fn=20); translate([wingpos,-9,holeh]) rotate([-90,0,0]) cylinder(r=3,h=3,$fn=20); // Hole for the landing gear translate([lenbase/2,4,5]) rotate([90-30,30,0]){ cylinder(r=4,h=30,$fn=20); // Hole to screw the landing gear translate([0,0,4]) rotate([-90,0,0]) cylinder(r=screwr,h=30,$fn=20); } // Big hole for the servo translate([-servo_len/2,-servo_width/2,-20]){ translate([-30,-2,0]) cube([servo_len+60,servo_width+10,20]); cube([servo_len,servo_width,36]); } // Two small holes to screw the servo translate([-servo_len/2-2.5,0,0]) cylinder(r=1.5,h=3,$fn=20); translate([servo_len/2+2.5,0,0]) cylinder(r=1.5,h=3,$fn=20); // Bigger hole behind the servo to remove some material h=11; translate([0,0,2+h/2]) cube([lentop,15,h],center=true); translate([lentop/2,15/2,2+h/2]) rotate([90,0,0]) cylinder(r=h/2,h=15); translate([-lentop/2,15/2,2+h/2]) rotate([90,0,0]) cylinder(r=h/2,h=15); } } // Put some support for the batterie, just on top of the servo *translate([0,servo_width/2+1,0]){ translate([-30,0,0]) rotate ([90,0,0]) cylinder (r=10,h=2); translate([30,0,0]) rotate ([90,0,0]) cylinder (r=10,h=2); } if (showmotor){ translate([-servo_len/2,-servo_width/2,-servo_thick]) cube([servo_len,servo_width,servo_thick+1]); } } // batterytype: 0=no battery, 1=small 2200mah battery, 2=large 4000mah module body1(showmotor,batterytype){ ray=30; insert=0.75; len1=140; difference(){ union(){ translate([0,0,10]) difference(){ cylinder(r=ray,h=len1,$fn=40); cylinder(r=ray-insert,h=len1,$fn=40); } difference(){ cylinder(r=ray-insert,h=15,$fn=40); cylinder(r=ray-2,h=15,$fn=40); } // Hooks to attache the battery hookl=25; translate([-2.5,ray-6,len1-10-hookl]) difference(){ union(){ cube([5,6,hookl]); translate([5,6,0]) rotate([180,90,0]) triangle_rectangle(5,6,5); } translate([-1,2,2]) cube([7,2,hookl-4]); } translate([-2.5,ray-6,tonglen+25]) difference(){ union(){ cube([5,6,hookl]); translate([5,6,0]) rotate([180,90,0]) triangle_rectangle(5,6,5); } translate([-1,2,2]) cube([7,2,hookl-4]); } } union(){ // Cover to insert the battery translate([0,-ray/2,len1/2+5]) rotate([90,0,0]){ hull($fn=40){ translate([0,40,0]) cylinder(r=22,h=ray,$fn=20); translate([0,-40,0]) cylinder(r=22,h=ray,$fn=20); } } // Holes to attach to the body translate([0,-ray-1,tonglen/2]) rotate([-90,0,0]) cylinder(r=threadr,h=2*ray+2,$fn=20); translate([0,-ray-1,len1+tonglen/2]) rotate([-90,0,0]) cylinder(r=screwr,h=2*ray+2,$fn=20); // Hole for the wings th=13; // Thicker than the wing, large enough for the servo translate([-50,-th/2+13,len1/2-wingwidth/2+15]) cube([100,th,wingwidth]); } } translate([ray,15,80]) rotate([180,-90,0]) wingholder(showmotor); translate([-ray,15,80]) rotate([0,-90,0]) mirror([0,1,0]) wingholder(showmotor); if (batterytype==1){ battw=35; batth=27; battl=105; translate([-battw/2,-batth/2-7,(len1-battl)/2+5]) cube([battw,batth,battl]); }else if (batterytype==2){ battw=35; batth=40; battl=112; translate([-battw/2,-batth/2-7,(len1-battl)/2]) cube([battw,batth,battl]); } } module body2(){ ray1=30; ray2=20; difference(){ union(){ // First it connects to body1 translate([0,0,100]) difference(){ cylinder(r=ray1,h=10,$fn=40); cylinder(r=ray1-0.5,h=10,$fn=40); } // A long hollow cone translate([0,0,10]) difference(){ cylinder(r1=ray2,r2=ray1,h=90,$fn=40); cylinder(r1=ray2-0.5,r2=ray1-0.5,h=90,$fn=40); } // A short hollow cone, stronger ray3=ray2+(ray1-ray2)*5/90; translate([0,0,10]) difference(){ cylinder(r1=ray2,r2=ray3,h=5,$fn=40); cylinder(r1=ray2-2,r2=ray3-5,h=5,$fn=40); } difference(){ cylinder(r=ray2-0.5,h=15,$fn=40); cylinder(r=ray2-2,h=15,$fn=40); } } union(){ // Holes to attach to the other parts of the body translate([0,-ray1-1,tonglen/2]) rotate([-90,0,0]) cylinder(r=threadr,h=2*ray1+2,$fn=20); translate([0,-ray1-1,100+tonglen/2]) rotate([-90,0,0]) cylinder(r=screwr,h=2*ray1+2,$fn=20); } } } tail_width=150; module tail(){ ray=20; difference(){ union(){ // First it connects to body2 translate([0,0,0]) difference(){ cylinder(r=ray,h=60,$fn=40); union(){ cylinder(r=ray-0.5,h=60,$fn=40); // Holes to attach to body2 translate([0,-ray-1,60-tonglen/2]) rotate([-90,0,0]) cylinder(r=screwr,h=2*ray+2,$fn=20); } } // This is the wing controling the pitch translate([-tail_width/2,ray,0]) rotate([90,0,0]) union(){ difference(){ wingshape(wingthick,wingwidth,tail_width,true); union(){ translate([-1,-wingwidth/2,0]) cube([tail_width+2,wingwidth/2,wingthick]); // Four holes to attach the wing_fin_ends translate([tonglen/2,5,0]) cylinder(r=screwr,h=wingthick,$fn=20); translate([tail_width-tonglen/2,5,0]) cylinder(r=screwr,h=wingthick,$fn=20); translate([tail_width-tonglen/2,wingwidth/2-10,0]) cylinder(r=screwr,h=wingthick,$fn=20); translate([tonglen/2,wingwidth/2-10,0]) cylinder(r=screwr,h=wingthick,$fn=20); } } translate([tonglen,0,0]) cube([tail_width-tonglen*2,1,wingthick]); } // This is the head supporting the rudder baselen=60; translate([0,-5,0]){ rotate([90,0,0]) difference(){ height=95; hull($fn=40){ linear_extrude(1) resize([2,baselen]) circle(10); translate([0,0,height]) linear_extrude(1) resize([2,baselen/2]) circle(10); } union(){ // We remove half of it translate([-1,-baselen/2,-1]) cube([2,baselen/2,height+2]); // We remove some material inside the cockpit translate([-1,baselen/4,-1]) cube([2,baselen/2,15]); // We put two holes to fix the tail_fin_end translate([-5,baselen/8,height-tonglen/2])rotate([0,90,0]) cylinder(r=screwr,h=100,$fn=20); translate([-5,baselen/8,tonglen/2])rotate([0,90,0]) cylinder(r=screwr,h=100,$fn=20); } } } // Put some force to support the head translate([0,0,0]) difference(){ cylinder(r=ray,h=baselen/2,$fn=40); translate([-ray,-ray+2,0]) cube([ray*2,ray*2,baselen/2]); } // Put a base to hold the tail-motor-plate translate([0,0,60-25-tonglen]){ difference(){ cylinder(r=ray,h=25,$fn=40); translate([-ray,-ray-2,0]) cube([ray*2,ray*2,baselen/2]); } // Small notch to help alignment translate([-1,ray-4,0]) cube([2,2,25]); } } // Hole to attach the tail-motor-plate translate([4,ray+2,20+60-25-tonglen]) rotate([90,0,0]) cylinder(r=screwr,h=100,$fn=20); } } module tail_fin(){ fin (tail_width-6); // handle to control the pitch // We want this handle long enough (so it helps the servo) // but it has to clear the rudder off=18; translate([tail_width/2-off++0.75,-2.5,4.5]) cube([0.5,2,23.5]); translate([tail_width/2-off,-8,0]) difference(){ height=28; cube([2,6,height]); union(){ translate([0,3,height-3]) rotate([0,90,0]) cylinder(r=1.8,h=3,$fn=20); // Remove the bottom of the handle so it matches the fin translate([0,8,-0.1]) rotate([0,90,0]) quarter_concave(wingthick/2+1,10,20,1); } } } module rudder(){ height=95; baselen=40; w=5; difference(){ union(){ hull($fn=40){ linear_extrude(1) resize([2,baselen]) circle(10); translate([0,0,height]) linear_extrude(1) resize([2,baselen]) circle(10); } // Add 2 cubes to screw the rudder to the rudder_hook translate([-w/2,-w,0]){ cube([w,w,10]); translate([0,0,height-9]) cube([w,w,10]); } } union(){ translate([-1,0,-1]) cube([2,baselen/2,height+2]); // Add 2 holes in the cubes translate([0,-w/2,0]){ cylinder(r=threadr,h=8,$fn=20); translate([0,0,height-9+2]) cylinder(r=threadr,h=8,$fn=20); } } } translate([-w/2,-w,0]){ difference(){ cube([w,w,10]); translate([w/2,w/2,0]) cylinder(r=threadr,h=8,$fn=20); } } // Handle to hook the servo difference(){ l=17; translate([2,-5,0]) cube([l-2,5,2]); translate([l-2.5,-2.5,0]) cylinder(r=screwr,h=2,$fn=20); } } // Attach the tail to the rudder, at the top and inside the tail module rudder_hold(){ tail_len=30; rudder_len=5; space=2.5; width=6; difference(){ union(){ off=15; translate([0,off,0]){ cube([width,tail_len+space+rudder_len-off+1,2.5]); cube([width,tail_len-off,tonglen+3]); } } union(){ translate([width/2,tail_len,3]) linear_extrude(11) resize([2.25,tail_len*2]) circle(10); translate ([-1,3*tail_len/4,tonglen/2+3]) rotate ([0,90,0]) cylinder(r=screwr,h=width+2,$fn=20); translate ([width/2,tail_len+space+rudder_len/2,-1]) rotate ([0,0,0]) cylinder(r=screwr,h=3+2,$fn=20); } } } module tail_connect(support){ difference(){ cube([15,5,5]); union(){ translate([5,1,-1]) cube([11,3,7]); translate([10,6,2.5]) rotate([90,0,0]) cylinder(r=screwr,h=7,$fn=20); } } if (support){ translate([5,0,0]) cube([10,5,vs_nozzle_diameter]); translate([5,0,5-vs_nozzle_diameter]) cube([10,5,vs_nozzle_diameter]); } } // A general purpose connect link between a servo and tail part // It is either straight with two tail_connect alike, or one // which is rotated module tail_arm(len,rotation){ cube([len,5,5]); translate([0,0,5]) rotate([0,180,0]) tail_connect(false); if (rotation){ rotate([90,0,0]) translate([len,0,-5]) tail_connect(true); }else{ translate([len,0,0]) tail_connect(false); } } module servo_hold(){ difference(){ cube([servolen+10,1,10+servoheight+3]); union(){ translate([5,-1,10]) cube([servolen,3,servoheight]); // Two holes for screws translate([5-2.5,-1,10+servoheight/2]) rotate([-90,0,0]) cylinder(r=1.5,h=3,$fn=20); translate([5+servolen+2.5,-1,10+servoheight/2]) rotate([-90,0,0]) cylinder(r=1.5,h=3,$fn=20); } } } // This is the plate to attach the two servos controlling the tail-fin // and the rudder. This plate is inserted into the tail and screw there. module tail_servo_hold(){ // The floor with a notch for proper alignment in the tail difference(){ len=5+servolen+5+servolen+5; cube ([len,20,2]); translate([0,10-1,-1]) cube([len,2,2]); } // A center plate. The motors are simply screwed on each side translate([0,5,0]) servo_hold(); translate([servolen+5,15,0]) servo_hold(); } module main_view(view){ if (view=="wingpart_left"){ if (vs_printing){ rotate([0,-90,0]) wingpart(false); }else{ wingpart(false); } }else if (view=="wingpart_right"){ if (vs_printing){ translate([0,0,0]) rotate([0,-90,0]) wingpart(true); }else{ wingpart(true); } }else if (view=="landing_gear-right"){ landing_gear(true); }else if (view=="landing_gear-left"){ landing_gear(false); }else if (view=="large-wheel"){ wheel(front_wheel_radius); }else if (view=="small-wheel"){ wheel(back_wheel_radius); }else if (view=="wing_fin_start-right"){ if (vs_printing){ translate([0,0,0]) rotate([0,-90,0]) wing_fin_start(true); }else{ wing_fin_start(true); } }else if (view=="wing_fin_end-right"){ if (vs_printing){ translate([0,0,tonglen]) rotate([0,90,0]) wing_fin_end(true); }else{ wing_fin_end(true); } }else if (view=="wing_fin_start-left"){ wing_fin_start(false); }else if (view=="wing_fin_end-left"){ wing_fin_end(false); }else if (view=="wing-fin"){ if (vs_printing){ translate([0,0,0]) rotate([0,-90,0]) wing_fin(); }else{ wing_fin(); } }else if (view=="tail-fin"){ if (vs_printing){ translate([0,0,-0.5]) rotate([-90,0,0]) tail_fin(); }else{ tail_fin(); } }else if (view=="test-fin"){ intersection(){ translate([-15,-90,0]) cube([20,wingpart_len,10]); translate([0,0,0]) rotate([0,-90,0]) fin(); } }else if (view=="short-finpin"){ finpin(20,true,true,false); }else if (view=="long-finpin"){ finpin(80,true,false,true); }else if (view=="motorhook"){ motorhook(); }else if (view=="wingholder"){ if (vs_printing){ translate([-20,-15,0]) cube([30,30,1]); translate([-10,-6,1]) cube([10,12,3]); translate([0,0,wingholder_length/2+wingholder_baseradius]) rotate([0,-90,0]) wingholder(false); }else{ wingholder(false); } }else if (view=="test-wingholder"){ translate([-20,-15,0]) cube([30,30,vs_first_layer_height]); //translate([-10,-6,1]) cube([10,12,3]); intersection(){ translate([-30,-12,0]) cube([35,25,35]); translate([0,0,wingholder_length/2+wingholder_baseradius-wingwidth/2-4]) rotate([0,-90,0]) wingholder(false); } }else if (view=="front"){ if (vs_printing){ translate([0,0,frontlen]) rotate([0,-180,0]) front(); }else{ front(); } }else if (view=="body1"){ body1(false,0); }else if (view=="body2"){ body2(); }else if (view=="tail"){ tail(); }else if (view=="tail-arm-fin"){ tail_arm(10,false); }else if (view=="tail-arm-rudder"){ tail_arm(10,true); }else if (view=="rudder"){ if (vs_printing){ rotate([-90,0,0]) rudder(); }else{ rudder(); } }else if (view=="tail_servo_hold"){ tail_servo_hold(); }else if (view=="rudder_hold"){ rudder_hold(); }else if (view=="test-body1-with-parts"){ translate([0,0,30]) rotate([-90,0,0]) body1(true,1); }else if (view=="test-body1-with-largebatt"){ translate([0,0,30]) rotate([-90,0,0]) body1(true,2); }else if (view=="test-body1"){ translate([0,0,-5]){ intersection(){ translate([0,0,5]) cylinder (r=100,h=10); body1(false,0); } } }else if (view=="test-body2"){ translate([0,0,-95]){ intersection(){ translate([0,0,95]) cylinder (r=100,h=10); body2(); } } }else if (view=="test-wing-start"){ translate([0,0,-5]){ intersection(){ translate([0,0,5]) cylinder (r=100,h=10); rotate([0,-90,0]) wingpart(true); } } }else if (view=="test-wing-end"){ translate([0,0,-95]){ intersection(){ translate([0,0,95]) cylinder (r=100,h=10); rotate([0,-90,0]) wingpart(true); } } }else if (view=="test-tail"){ rotate([-90,0,0]) tail(); translate([-tail_width/2+2,-2,-20]) rotate([0,0,0]) tail_fin(); translate([0,-2,5]) rudder(); translate([-2,50,-10]) rotate([0,0,0]) servo(90); translate([0,110,-10]) rotate([0,0,180]) servo(90); translate([-3,30,110-6.5]) rotate([0,180,180]) rudder_hold(); translate([3,30,2]) rotate([0,0,180]) rudder_hold(); }else if (view=="test-tail-radius"){ intersection(){ translate([-50,-50,0]) cube([100,100,5]); translate([0,0,-35]) tail(); } }else if (view=="servo"){ servo(90); }else if (view=="all"){ translate ([0,155,0]) rotate([-90,0,0]) front(); rotate([-90,0,0]) body1(true,1); translate([0,-120,0]) rotate([-90,0,0]) body2(); translate([0,-190,0]) rotate([-90,0,0]) tail(); translate([40-2,123,-22]) rotate([180,90-30,30]) landing_gear(true); translate([-40+2,123,-22]) rotate([0,90+30,-30]) landing_gear(false); translate([-75,130,-75]) rotate([0,90,0]) wheel(front_wheel_radius); translate([75,130,-75]) rotate([0,-90,0]) wheel(front_wheel_radius); rwy=80; wh=-20; translate([60,rwy,wh]) wingpart(true); translate([160,rwy,wh]) wing_fin_start(true); translate([270,rwy,wh]) wing_fin_end(true); translate([215,rwy-5,wh]) wing_fin(); lwy=80; translate([-100-60,lwy,wh]) wingpart(false); translate([-100-160,lwy,wh]) wing_fin_start(false); translate([-100-175,lwy,wh]) wing_fin_end(false); translate([-100-162,lwy-5,wh]) wing_fin(); translate([-(tail_width-6)/2,-190,-20]) tail_fin(); translate([80,-190,-20]) wing_fin_end(true); translate([-83,-190,-20]) wing_fin_end(false); translate([0,-195,5]) rudder(); } }