// allviews cuve plaque plomberie include module cuve(){ } len=1590; len2=len-2*100; width=370; height1=360; height2=330; thick=4; lenattach=40; angle1=$t < 0.33 ? 90*$t*3 : 90; angle2=$t < 0.66 ? 0 : 90*($t-0.66)*3; angle3=$t < 0.33 ? 0 : ($t < 0.66 ? 90*($t-0.33)*3 : 90); module attach(){ difference(){ cube([height1,lenattach,thick]); for (x=[1:4]){ translate([x*height1/5,lenattach/2,-1]) cylinder(r=4,h=thick+2,$fn=40); } } } module cote(){ cube([height1,width,thick]); translate([0,0,0]) rotate([180+angle3,0,0]) attach(); translate([0,width,0]) rotate([-angle3,0,0]) attach(); } module face(){ difference(){ cube([len,height1,thick]); for (pos=[lenattach/2,len-lenattach/2]){ for (x=[1:4]){ translate([pos,x*height1/5,-1]) cylinder(r=4,h=thick+2,$fn=40); } } } } module plaque(){ cube([len,width,thick]); // Face translate([0,0,0]) rotate([180-angle1,0,0]) face(); // Arrière translate([0,width,0]) rotate([angle1,0,0]){ difference(){ face(); off=(len-len2)/2; translate([off,height2,-1]) cube([len2,height1-height2+1,thick+2]); } } // Coté translate([0,0,0]) rotate([0,180+angle2,0]){ cote(); } translate([len,width,0]) rotate([180,-angle2,0]){ cote(); } } module plomberie(){ echangeur(); pompe(); } module main_view(view){ if (view=="cuve"){ cuve(); }else if (view=="plaque"){ plaque(); }else if (view=="plomberie"){ plomberie(); } }