cl1=120;

//tc épaisseur de la cuve
tc=25;
//rc rayon de la cuve
rc=2940/2+tc;
//tb épaisseur du bac
tb=25;
//rb rayon du bac
rb=3220/2+tc;
//rf rayon du fond
rf=3400/2;
//rh rayon du th
rh=400/2;
//hb hauteur du bac
hb=3600;
//hc hauteur de la cuve
hc=4525;
//hh hauteur du th
hh1=hc+(rc-rh)*Tan(10.0/180*Pi);
hh2=hc+400;
//hauteur oreille
hh3=hc+370*Tan(10.0/180*Pi);




Point(10) = {0, 0, 0, cl1};
Point(11) = {rc, 0, 0, cl1};
Point(12) = {rb, 0, 0, cl1};
Point(13) = {rf, 0, 0, cl1};
Point(111) = {rc, 0, hb, cl1};
Point(121) = {rc, 0, hc-500, cl1};
Point(112) = {rb, 0, hb, cl1};
Point(211) = {rc, 0, hc, cl1};
Point(221) = {rc-370, 0, hh3, cl1};
Point(311) = {rh, 0, hh1, cl1};
Point(410) = {0, 0, hh2, cl1};
Point(411) = {rh, 0, hh2, cl1};

Point(501) = {rc+120, 0, hc-500+600, cl1};
Point(502) = {rc+120, 0, hc-500+600-60, cl1};
Point(503) = {rc+120+60*0.867, 0, hc-500+600+30, cl1};
Point(504) = {rc+120-60*0.867, 0, hc-500+600+30, cl1};
Point(505) = {rc+45, 0, hc-500, cl1};
Point(506) = {rc+240, 0, hc-500+600, cl1};
Point(507) = {rc+120, 0, hc-500+600+120, cl1};

//Point(612) = {rb*Cos(Pi/3), rb*Sin(Pi/3), hb-10, cl1};
//Point(605) = {rb*Cos(Pi/3), rb*Sin(Pi/3), hb-720, cl1};







Line(11) = {10, 11};
Line(12) = {11, 12};
Line(13) = {12, 13};

Line(111) = {11, 111};
Line(112) = {12, 112};
Line(151) = {111, 112};
Line(211) = {111, 121};
Line(212) = {121, 211};
Line(311) = {211, 221};
Line(312) = {221, 311};
Line(410) = {410, 411};
Line(411) = {311, 411};

Line(505) = {121, 505};
Line(506) = {505, 506};
Circle(507) = {506, 501, 507};
Line(508) = {507, 221};
Circle(502) = {502, 501, 503};
Circle(503) = {503, 501, 504};
Circle(504) = {504, 501, 502};
Line Loop(501) = {212, 311, -508, -507, -506, -505};
Line Loop(502) = {502, 503, 504};
Plane Surface(503) = {501, 502};
oreilc[]={503};
suspc[]={503};

//Line(605) = {605, 612};





fondc1[]={Extrude {{0, 0, 1}, {0, 0, 0}, 2/3*Pi} {Line{-11};} };
fondb1[]={Extrude {{0, 0, 1}, {0, 0, 0}, 2/3*Pi} {Line{-12, -13};} };
virb1[]={Extrude {{0, 0, 1}, {0, 0, 0}, 2/3*Pi} {Line{-112};} };
virc1[]={Extrude {{0, 0, 1}, {0, 0, 0}, 2/3*Pi} {Line{-111, -211, -212};} };
col1[]={Extrude {{0, 0, 1}, {0, 0, 0}, 2/3*Pi} {Line{151};} };
toit1[]={Extrude {{0, 0, 1}, {0, 0, 0}, 2/3*Pi} {Line{-311, -312};} };
virth1[]={Extrude {{0, 0, 1}, {0, 0, 0}, 2/3*Pi} {Line{-411};} };
couvth1[]={Extrude {{0, 0, 1}, {0, 0, 0}, 2/3*Pi} {Line{410};} };

//Point{605} In Surface{620};
//Line{605} In Surface{fondc1[]};


suspc[]+={Rotate {{0, 0, 1}, {0, 0, 0}, 2*Pi/3} {Duplicata { Surface{suspc[]}; } } };
oreilc[]+={Rotate {{0, 0, 1}, {0, 0, 0}, 2*Pi/3} {Duplicata { Surface{oreilc[]}; } } };
fondc2[]={Rotate {{0, 0, 1}, {0, 0, 0}, 2*Pi/3} {Duplicata { Surface{fondc1[]}; } } };
fondb2[]={Rotate {{0, 0, 1}, {0, 0, 0}, 2*Pi/3} {Duplicata { Surface{fondb1[]}; } } };
virb2[]={Rotate {{0, 0, 1}, {0, 0, 0}, 2*Pi/3} {Duplicata { Surface{virb1[]}; } } };
virc2[]={Rotate {{0, 0, 1}, {0, 0, 0}, 2*Pi/3} {Duplicata { Surface{virc1[]}; } } };
col2[]={Rotate {{0, 0, 1}, {0, 0, 0}, 2*Pi/3} {Duplicata { Surface{col1[]}; } } };
toit2[]={Rotate {{0, 0, 1}, {0, 0, 0}, 2*Pi/3} {Duplicata { Surface{toit1[]}; } } };
virth2[]={Rotate {{0, 0, 1}, {0, 0, 0}, 2*Pi/3} {Duplicata { Surface{virth1[]}; } } };
couvth2[]={Rotate {{0, 0, 1}, {0, 0, 0}, 2*Pi/3} {Duplicata { Surface{couvth1[]}; } } };

suspc[]+={Rotate {{0, 0, 1}, {0, 0, 0}, -2*Pi/3} {Duplicata { Surface{suspc[]}; } } };
oreilc[]+={Rotate {{0, 0, 1}, {0, 0, 0}, -2*Pi/3} {Duplicata { Surface{oreilc[]}; } } };
fondc3[]={Rotate {{0, 0, 1}, {0, 0, 0}, -2*Pi/3} {Duplicata { Surface{fondc1[]}; } } };
fondb3[]={Rotate {{0, 0, 1}, {0, 0, 0}, -2*Pi/3} {Duplicata { Surface{fondb1[]}; } } };
virb3[]={Rotate {{0, 0, 1}, {0, 0, 0}, -2*Pi/3} {Duplicata { Surface{virb1[]}; } } };
virc3[]={Rotate {{0, 0, 1}, {0, 0, 0}, -2*Pi/3} {Duplicata { Surface{virc1[]}; } } };
col3[]={Rotate {{0, 0, 1}, {0, 0, 0}, -2*Pi/3} {Duplicata { Surface{col1[]}; } } };
toit3[]={Rotate {{0, 0, 1}, {0, 0, 0}, -2*Pi/3} {Duplicata { Surface{toit1[]}; } } };
virth3[]={Rotate {{0, 0, 1}, {0, 0, 0}, -2*Pi/3} {Duplicata { Surface{virth1[]}; } } };
couvth3[]={Rotate {{0, 0, 1}, {0, 0, 0}, -2*Pi/3} {Duplicata { Surface{couvth1[]}; } } };


fondc[]={fondc1[],fondc2[],fondc3[]};
fondb[]={fondb1[],fondb2[],fondb3[]};
virb[]={virb1[],virb2[],virb3[]};
virc[]={virc1[],virc2[],virc3[]};
col[]={col1[],col2[],col3[]};
toit[]={toit1[],toit2[],toit3[]};
virth[]={virth1[],virth2[],virth3[]};
couvth[]={couvth1[],couvth2[],couvth3[]};

Physical Line("suspc") = {suspc[]};
Physical Surface("oreilc") = {oreilc[]};
Physical Surface("fondc") = {fondc[]};
Physical Surface("fondb") = {fondb[]};
Physical Surface("virb") = {virb[]};
Physical Surface("virc") = {virc[]};
Physical Surface("col") = {col[]};
Physical Surface("toit") = {toit[]};
Physical Surface("virth") = {virth[]};
Physical Surface("couvth") = {couvth[]};











//Line Loop(661) = {212, 311, -508, -507, -506, -505};
//Line Loop(662) = {502, 503, 504};
//Plane Surface(663) = {661, 662};
