// allviews drapeau base test testbase assemble include len=100; width=25; thick=2.5; thick2=4.5; ray=6; wlen=60-ray; module drapeau(){ difference(){ union(){ // Arrondie a la base du drapeau translate([0,width/2,0]) cylinder(r=width/2,h=thick,$fn=40); cube([len,width,thick]); translate([len-width,0,0]) cube([width,wlen,thick]); // Arrondie en haut du drapeau translate([len,ray,0]) cylinder(r=ray,h=thick,$fn=40); // Arrondie au bout du drapeau translate([len-ray,wlen,0]) cylinder(r=ray,h=thick,$fn=40); translate([len-width+ray,wlen,0]) cylinder(r=ray,h=thick ,$fn=40); translate([len-width+ray,0,0]) cube([width-2*ray,wlen+ray ,thick]); // Augmente l'epaisseur a la base translate([0,width/2,0]) cylinder(r=25/2,h=thick2,$fn=40); } translate([0,width/2,-1]) cylinder(r=7,h=thick2+2,$fn=40); } } module base(){ difference(){ union(){ difference(){ union(){ cube([61,35,7]); } union(){ translate([2,2,2]) cube([61,31,7]); translate([30,30,2]) cube([32,10,10]); } } translate([10,35/2,0]) cylinder(r=6,h=7,$fn=40); translate([10+29+7,35/2,0]) cylinder(r=6,h=7,$fn=40); } union(){ translate([10,35/2,-1]) cylinder(r=3.5,h=9,$fn=40); translate([10+29+7,35/2,-1]) cylinder(r=3.5,h=9,$fn=40); } } } module test(){ intersection(){ drapeau(); translate([-width/2,0,0]) cube([width,width,thick]); } } module testbase(){ intersection(){ base(); translate([0,10,0]) cube([55,14,1]); } } module main_view(view){ if (view=="drapeau"){ drapeau(); }else if (view=="test"){ test(); }else if (view=="base"){ base(); }else if (view=="testbase"){ testbase(); }else if (view=="assemble"){ base(); translate([10+29+7,5,3]) drapeau(); } }