lc = 0.1;
z1 = 1.615509;
z2 = 1.915004;
z3 = 2.306236;
z4 = 2.313197;
scale = 0.4;

h0 = 0;
h1 = 0.1;
h2 = 0.14;
h3 = 0.5;
h4 = 0.7;



Point(1) = {-2.192623*scale, -0.224960*scale, h1, lc};
Point(2) = {-2.192744*scale, 3.952129*scale, h1, lc};
Point(3) = {-2.165201*scale, 4.072591*scale, h1, lc};
Point(4) = {-2.115160*scale, 4.162947*scale, h1, lc};
Point(5) = {-2.039963*scale, 4.240984*scale, h1, lc};
Point(6) = {-1.930178*scale, 4.299061*scale, h1, lc};
Point(7) = {-1.787066*scale, 4.333845*scale, h1, lc};
Point(8) = {-1.619639*scale, 4.356722*scale, h1, lc};
Point(9) = {-1.367411*scale, 4.374237*scale, h1, lc};
Point(10) = {-1.099213*scale, 4.363103*scale, h1, lc};
Point(11) = {-0.874330*scale, 4.332633*scale, h1, lc};
Point(12) = {-0.684454*scale, 4.294462*scale, h1, lc};
Point(13) = {-0.491430*scale, 4.228745*scale, h1, lc};
Point(14) = {-0.319474*scale, 4.135108*scale, h1, lc};
Point(15) = {-0.177153*scale, 4.025034*scale, h1, lc};
Point(16) = {-0.060924*scale, 3.887879*scale, h1, lc};
Point(17) = {0.033326*scale, 3.726725*scale, h1, lc};
Point(18) = {0.133505*scale, 3.491868*scale, h1, lc};
Point(19) = {0.222407*scale, 3.173920*scale, h1, lc};
Point(20) = {0.297110*scale, 2.809084*scale, h1, lc};
Point(21) = {0.405109*scale, 2.424352*scale, h1, lc};
Point(22) = {0.485455*scale, 2.224501*scale, h1, lc};
Point(23) = {0.558954*scale, 2.086448*scale, h1, lc};
Point(24) = {0.639709*scale, 1.969660*scale, h1, lc};
Point(25) = {0.730407*scale, 1.863658*scale, h1, lc};
Point(26) = {0.835361*scale, 1.773279*scale, h1, lc};
Point(27) = {0.956200*scale, 1.692440*scale, h1, lc};
Point(28) = {1.162050*scale, 1.579390*scale, h1, lc};
Point(29) = {1.360853*scale, 1.471775*scale, h1, lc};
Point(30) = {1.441270*scale, 1.411705*scale, h1, lc};
Point(31) = {1.505530*scale, 1.340076*scale, h1, lc};
Point(32) = {1.554942*scale, 1.254387*scale, h1, lc};
Point(33) = {1.582296*scale, 1.170461*scale, h1, lc};
Point(34) = {1.593581*scale, 1.083720*scale, h1, lc};
Point(35) = {1.597141*scale, 0.992711*scale, h1, lc};
Point(36) = {1.597141*scale, -0.224960*scale, h1, lc};
  
Spline(1) = {2:35};
Line(2) = {35,36};
Line(3) = {36,1};
Line(4) = {1,2};

Point(40) = {-2.119513*scale, -0.112886*scale, h2, lc};
Point(41) = {-2.119599*scale, 3.943874*scale, h2, lc};
Point(42) = {-2.096202*scale, 4.046204*scale, h2, lc};
Point(43) = {-2.055826*scale, 4.119108*scale, h2, lc};
Point(44) = {-1.995414*scale, 4.181801*scale, h2, lc};
Point(45) = {-1.904038*scale, 4.230140*scale, h2, lc};
Point(46) = {-1.773442*scale, 4.261881*scale, h2, lc};
Point(47) = {-1.612146*scale, 4.283921*scale, h2, lc};
Point(48) = {-1.366391*scale, 4.300986*scale, h2, lc};
Point(49) = {-1.105654*scale, 4.290161*scale, h2, lc};
Point(50) = {-0.886461*scale, 4.260462*scale, h2, lc};
Point(51) = {-0.703529*scale, 4.223688*scale, h2, lc};
Point(52) = {-0.520921*scale, 4.161518*scale, h2, lc};
Point(53) = {-0.359595*scale, 4.073668*scale, h2, lc};
Point(54) = {-0.227985*scale, 3.971879*scale, h2, lc};
Point(55) = {-0.120847*scale, 3.845451*scale, h2, lc};
Point(56) = {-0.032144*scale, 3.693781*scale, h2, lc};
Point(57) = {0.064349*scale, 3.467567*scale, h2, lc};
Point(58) = {0.151267*scale, 3.156713*scale, h2, lc};
Point(59) = {0.225985*scale, 2.791807*scale, h2, lc};
Point(60) = {0.336178*scale, 2.399392*scale, h2, lc};
Point(61) = {0.420663*scale, 2.190285*scale, h2, lc};
Point(62) = {0.494207*scale, 2.052276*scale, h2, lc};
Point(63) = {0.579174*scale, 1.927884*scale, h2, lc};
Point(64) = {0.675190*scale, 1.815587*scale, h2, lc};
Point(65) = {0.787469*scale, 1.717353*scale, h2, lc};
Point(66) = {0.918081*scale, 1.629666*scale, h2, lc};
Point(67) = {1.128065*scale, 1.514424*scale, h2, lc};
Point(68) = {1.318655*scale, 1.411202*scale, h2, lc};
Point(69) = {1.389644*scale, 1.359334*scale, h2, lc};
Point(70) = {1.444299*scale, 1.298362*scale, h2, lc};
Point(71) = {1.487170*scale, 1.224715*scale, h2, lc};
Point(72) = {1.509763*scale, 1.156198*scale, h2, lc};
Point(73) = {1.520512*scale, 1.078593*scale, h2, lc};
Point(74) = {1.523996*scale, 0.989954*scale, h2, lc};
Point(75) = {1.523997*scale, -0.112886*scale, h2, lc};


Spline(5) = {41:74};
Line(6) = {74,75};
Line(7) = {75,40};
Line(8) = {40,41};

Line Loop(1) = {1,2,3,4};
Line Loop(2) = {5,6,7,8};

Plane Surface(1) = {1};
Plane Surface(2) = {2};

Extrude {0, 0, h3-h1}{Line{1}; Line{2}; Line{3}; Line{4}; }
Extrude {0, 0, h3-h2}{Line{5}; Line{6}; Line{7}; Line{8}; }



Line Loop(41) = {3,19,-17,-15};
Plane Surface(42) = {41};
Line Loop(43) = {4,10,-21,-19};
Plane Surface(44) = {43};
Line Loop(45) = {8,26,-37,-35};
Plane Surface(46) = {45};
Line Loop(47) = {11,13,-15,-2};
Plane Surface(48) = {47};
Line Loop(49) = {31,-29,-27,6};
Plane Surface(50) = {49};
Line Loop(51) = {7,35,-33,-31};
Plane Surface(52) = {51};
Line Loop(53) = {13,17,21,9};
Line Loop(54) = {29,33,37,25};
Plane Surface(54) = {53,54};
Line Loop(55) = {1,11,-9,-10};
Ruled Surface(56) = {55};
Line Loop(57) = {5,27,-25,-26};
Ruled Surface(58) = {57};

Physical Surface(1) = {1, 2, 42, 44, 46, 48, 50, 52, 54, 56, 58};

xmin = -1.0;
xmax = 1.0;
ymin = -0.5;
ymax = 2.0;
zmin = h0;
zmax = h4;

// eight points of the cube
Point(301) = {xmin, ymin, zmin, lc};
Point(302) = {xmin, ymin, zmax, lc} ;
Point(303) = {xmin, ymax, zmin, lc} ;
Point(304) = {xmin, ymax, zmax, lc} ;
Point(305) = {xmax, ymin, zmin, lc} ;
Point(306) = {xmax, ymin, zmax, lc} ;
Point(307) = {xmax, ymax, zmin, lc} ;
Point(308) = {xmax, ymax, zmax, lc} ;

// Lines (12 edges)

Line(301) = {301,302} ;
Line(302) = {301,303} ;
Line(303) = {302,304} ;
Line(304) = {303,304} ;
Line(305) = {305,306} ;
Line(306) = {305,307} ;
Line(307) = {306,308} ;
Line(308) = {307,308} ;
Line(309) = {301,305} ;
Line(310) = {302,306} ;
Line(311) = {303,307} ;
Line(312) = {304,308} ;

Line Loop(302) = {301,303,-304,-302} ;
Line Loop(303) = {304,312,-308,-311} ;
Line Loop(304) = {302,311,-306,-309} ;
Line Loop(305) = {309,305,-310,-301} ;
Line Loop(306) = {310,307,-312,-303} ;
Line Loop(307) = {306,308,-307,-305} ;

Plane Surface(302) = {302} ;
Plane Surface(303) = {303} ;
Plane Surface(304) = {304} ;
Plane Surface(305) = {305} ;
Plane Surface(306) = {306} ;
Plane Surface(307) = {307} ;

Physical Surface(2) = {302, 303, 304, 305, 306, 307};

Surface Loop(2) = {302, 303, 304, 305, 306, 307};
Surface Loop(1) = {1, 2, 42, 44, 46, 48, 50, 52, 54, 56, 58};

Volume(1) = {2, 1};
Physical Volume(1) = {1};

Mesh.SecondOrderIncomplete = 0;