module poteau(solX, solY){
rotate([0, -90, 0])
    linear_extrude(height = 0.5, true, 10, twist=0)
    polygon([[solX, solY], [solX, solY+10], [solX+2, solY+10], [solX+20, solY+2], [solX+20, solY]]);
    
}

module filet(solX, solY, largeur){
    difference(){
rotate([0, -90, 0])
    linear_extrude(height=largeur, true, 10, twist=0)
        polygon([[solX+2, solY+10], [solX+20, solY+2], [solX+18, solY+2], [solX+2, solY+8]]);
for( j = [0:2]){
    for( i = [0:12] ){
        translate([solX-38+3*i, solY+2, 0+7*j])
            rotate([-45, 0, 0])
                cylinder(15, 1, 1);
}
}
for( j = [0:1]){
    for( i = [0:11] ){
        translate([solX-36.5+3*i, solY+2, 3.5+7*j])
            rotate([-45, 0, 0])
                cylinder(15, 1, 1);
    }
}
}
}


module cadre(solX, solY, largeur){
    poteau(solX, solY);
        translate([-largeur, 0, 0])
            poteau(solX, solY);

    translate([-largeur, solY+8, solX])
        cube([largeur, 2, 2]);

    translate([solX, solY, solX+18])
        rotate([0, -90, 0])
            linear_extrude(height=largeur, true, 10, twist=0)
                polygon([[0, 0], [2, 0], [2, 2], [0, 2.88]]);
}

module cages(solX, solY, largeur){
    cadre(solX, solY, largeur);
    filet(solX, solY, largeur);
}

//NE PAS CHANGER LES VALEURS
cages(0, -40, 40);