/* CUBE CREUX 50 avec 7 cylindres en creux BOUCLE FOR BERNARD Début le 24 AVRIL 2020 F6 = 6mn 53s */ // Variables Ray=4; Ray1=1.5; H=6; PasDec=2.7; CoefDec=1.06; PasRay=3; CoefRay=1.05; nb=20; // --- Programme --- ///difference() { // Pour Coupe /////rotate([45,0,0]) { rotate([0,45,0]) { // OPTION Mise sur une pointe //#cube(5.73, center=true); echo ("Décale:",PasDec,"",CoefDec," Rayon=",PasRay,"",CoefRay); difference() { cube(Ray*12+2, center=true); Cu=Ray*12+2; Dcentr=Ray1; echo ("Cube: ",Cu,"Centre: ",Ray1*2); //cylinder(r=Ray1, h=H, $fn=nb); // Trou central for (i=[0:3]) { // Rotation axe Y rotate ([0,90*i,0]) { for (j=[1:7]) { // Boucle 7 cylindres cylinder(r=Ray1, h=H, $fn=nb); // Trou central translate([0,0,j*CoefDec*PasDec]){ cylinder(r=j*PasRay*CoefRay,h=H,$fn=nb*j);} Dec1=j*PasDec*CoefDec; Dia1=j*PasRay*CoefRay; echo (i,"/",j,"éme Décalage",Dec1,"Rayon",Dia1); } } } for (i=[1:3]) { // Rotation axe X rotate ([90*i,0,0]) { for (j=[1:7]) { // Boucle 7 cylindres cylinder(r=Ray1, h=H, $fn=nb); // Trou central translate([0,0,j*PasDec*CoefDec ]){ cylinder(r=j*PasRay*CoefRay,h=H,$fn=nb*j);} } } } } // Fin diff1 /////} } // FIN Mise sur une pointe Rotate 2 fois 45 degrés ///rotate([0,0,45]){translate([0,0,-30]){cube (60);}} // Pour coupe ///} // FIN COUPE