
// maillage d'une plaque rectangulaire

// Definition de quelques quantites utiles

unit = 1.0;

bas      = -30*unit; 
haut     =   0*unit;
droite   = 100*unit;
gauche   =   0*unit;
devant   =   0*unit;
derriere = 100*unit;

taille   = 30*unit;

Point( 9) = {droite, devant  , bas , taille};
Point(10) = {droite, devant  , haut, taille};
Point(11) = {droite, derriere, bas , taille};
Point(12) = {droite, derriere, haut, taille};

Point(13) = {gauche, devant  , bas , taille} ;
Point(14) = {gauche, devant  , haut, taille} ;
Point(15) = {gauche, derriere, bas , taille} ;
Point(16) = {gauche, derriere, haut, taille} ;

Line(1) = {13, 9}; Line( 2) = { 9,11}; Line( 3) = {11,15}; Line( 4) = {14,10};
Line(5) = {10,12}; Line( 6) = {12,16}; Line( 7) = { 9,10}; Line( 8) = {11,12};
Line(9) = {14,13}; Line(10) = {13,15}; Line(11) = {15,16}; Line(12) = {16,14};

Line Loop(1) = { -7,  2,  8, -5} ; Plane Surface(1) = {1} ;
Line Loop(2) = {  1,  7, -4,  9} ; Plane Surface(2) = {2} ;
Line Loop(3) = { -6, -8,  3, 11} ; Plane Surface(3) = {3} ;
Line Loop(4) = {  4,  5,  6, 12} ; Plane Surface(4) = {4} ;
Line Loop(5) = { -1, 10, -3, -2} ; Plane Surface(5) = {5} ;
Line Loop(6) = {-12,-11,-10, -9} ; Plane Surface(6) = {6} ;

Surface Loop(1) = {1,2,3,4,5,6}; Volume(1) = {1};

// Rajout d'une bande de meme epaisseur
// On le fait "manuellement" plutot que par extrusion

h = 75*unit;
t[] = Translate {0, -h, 0} { Duplicata{ Point{9,10,13,14}; } } ;

Line(13) = {t[0],t[1]}; Line(14) = {t[1],t[3]}; Line(15) = {t[3],t[2]}; Line(16) = {t[2],t[0]};
Line(17) = {t[0], 9  }; Line(18) = {t[1],10  }; Line(19) = {t[2],13  }; Line(20) = {t[3],14  };

Line Loop( 7) = { 13, 14, 15, 16}; Plane Surface( 7) = { 7} ;
Line Loop( 8) = {-18,-13, 17,  7}; Plane Surface( 8) = { 8} ;
Line Loop( 9) = {-19,-15, 20,  9}; Plane Surface( 9) = { 9} ;
Line Loop(10) = { 18, -4,-20,-14}; Plane Surface(10) = {10} ;
Line Loop(11) = {-19, 16, 17, -1}; Plane Surface(11) = {11} ;

Surface Loop(2) = {7,8,9,10,11,-1}; Volume(2) = {2};
