// allviews baseroulette baseglisse // testviews assemblage // viewsopts h2 solid brim10mm include len=55; width=18; thick=2; thick2=1.29; height=17; // Hauteur glisse tiroir height2=25; // Hauteur support roulette module base(){ difference(){ union(){ cube([len,width,thick]); cube([width,len,thick]); } union(){ w2=width/2; ray=2.5; translate([w2,w2,-1]) cylinder(r=ray,h=thick*2,$fn=40); translate([len-w2,w2,-1]) cylinder(r=ray,h=thick*2,$fn=40); translate([w2,len-w2,-1]) cylinder(r=ray,h=thick*2,$fn=40); } } } module baseroulette(){ base(); len2=len/2+3; espace=15; // Espace entre les support a roulette espace2=espace/2; holeh=17; holeray=3.40; height3=holeh+2; difference(){ union(){ translate([len2-thick-espace2,0,0]) cube([thick,width,height2]); translate([len2+espace2,0,0]) cube([thick,width,height3]); } translate([len2-espace2-thick-1,width/2,holeh]) rotate([0,90,0]) cylinder(r=holeray,h=espace+2*thick+2,$fn=40); } difference(){ union(){ translate([0,len2-thick-espace2,0]) cube([width,thick,height2]); translate([0,len2+espace2,0]) cube([width,thick,height3]); } translate([width/2,len2-espace2-thick-1,holeh]) rotate([-90,0,0]) cylinder(r=holeray,h=espace+2*thick+2,$fn=40); } } module baseglisse(){ base(); translate([width-thick2,width-thick2,0]) cube([len-width+thick2,thick2,height]); translate([width-thick2,width,0]) cube([thick2,len-width,height]); } module main_view(view){ if (view=="baseroulette"){ baseroulette(); }else if (view=="baseglisse"){ baseglisse(); }else if (view=="assemblage"){ baseroulette(); translate([0,0,-3]) rotate([180,0,90]) baseglisse(); } }