include <nuts_and_bolts.scad>
w=60;
d=12;
h=28;
$fn=50;
rect_l = 18;
rect_w = 5.1;
difference(){
// Forme principale
cube([w,d,h]);
// Trous rectangulaires côtés
translate([0,-0.5,h/2-rect_w/2]) cube([rect_l,d+1,rect_w]);
translate([w-rect_l,-0.5,h/2-rect_w/2]) cube([rect_l,d+1,rect_w]);
// Axe central - entrainement
translate([w/2,0,h/2])
rotate([-90,0,0])
cylinder(h=d+1,r=4.1);
// hex_nut (height, thread_d, size, tolerance, quality, thread, pitch);
translate([w/2,-0.5,h/2])
rotate([-90,0,0])
hex_nut (7.5, 7, 13, 0, 0, 0, "metric");
// Axes porteurs
translate([17.5,-0.5,6])
rotate([-90,0,0])
cylinder(h=d+1,r=4);
translate([w-17.5,-0.5,6])
rotate([-90,0,0])
cylinder(h=d+1,r=4);
translate([17.5,-0.5,6])
rotate([-90,0,0])
cylinder(h=2+0.5,r=6.1);
translate([w-17.5,-0.5,6])
rotate([-90,0,0])
cylinder(h=2+0.5,r=6.1);
// Axes 4mm
axe3_x = 9;
translate([axe3_x,d/2,-0.5]) cylinder(h=h+1,r=2.05);
translate([w-axe3_x,d/2,-0.5]) cylinder(h=h+1,r=2.05);
translate([axe3_x,d/2,-0.5]) cylinder(h=3.1,r=3.4);
translate([w-axe3_x,d/2,-0.5]) cylinder(h=3.1,r=3.4);
translate([axe3_x,d/2,h-2.9])
hex_nut (3.1, 3.5, 7, 0, 0, 0, "metric");
translate([w-axe3_x,d/2,h-2.9])
hex_nut (3.1, 3.5, 7, 0, 0, 0, "metric");
}