// allviews rack // testviews testrack include height=15; width=50; len1=10; module pyramide(l,w,h){ off=5; hull(){ translate([0,0,0]) cube([l,w,1]); translate([-off,-off,h]) cube([l+off*2,w+off*2,1]); } } module rack(nb){ len10=len1*(nb+1); difference(){ //cube([len10,width,height]); pyramide(len10,width,height); union(){ //translate([1,1,1]) cube([len10-2,width-2,height]); translate([0.5,0.5,1]) pyramide(len10-1,width-1,height); h3=height-3; for (i=[1:nb]){ translate([i*len1,-10,-1]){ translate([1,0,h3]) rotate([-90,0,0]) cylinder(r=1,h=width+2,$fn=20); cube([2,width+20,h3]); } } } } intersection(){ pyramide(len10,width,height); for (i=[0:nb]){ translate([i*len1+len1/2,-10,0]){ cube([1,width+20,3]); } } } } module testrack(){ } module main_view(view){ if (view=="rack"){ rotate([0,0,90]) rack(10); }else if (view=="testrack"){ rack(2); } }