// definition des différents points utilisés  

// r=0.15
// fraction volumique = 0.2121
 
lcar3 = 0.0211;  
// the bottom edge of the square coord2   
p1 = newp; Point(p1) = { 0 ,0 ,0 ,lcar3 };
p2 = newp; Point(p2) = { 0.322613  , 0  , 0  , 0.0211  }; 
p3 = newp; Point(p3) = { 0.465537  , 0.0455268  , 0  , 0.0211  }; 
p4 = newp; Point(p4) = { 0.465537  , 0.195527  , 0  , 0.0211  }; 
p5 = newp; Point(p5) = { 0.608461  , 0  , 0  , 0.0211  }; 
// the right side  edge of the square coord3  
p6 = newp; Point(p6) = { 1 ,0 ,0 ,lcar3 };
p7 = newp; Point(p7) = { 1  , 0.390053  , 0  , 0.0211  }; 
p8 = newp; Point(p8) = { 1.08572  , 0.513145  , 0  , 0.0211  }; 
p9 = newp; Point(p9) = { 0.935723  , 0.513145  , 0  , 0.0211  }; 
p10 = newp; Point(p10) = { 1  , 0.636237  , 0  , 0.0211  }; 
//  the top edge of the square coord1 
p11 = newp; Point(p11) = { 1 ,1 ,0 ,lcar3 };
p12 = newp; Point(p12) = { 0.608461  , 1  , 0  , 0.0211  }; 
p13 = newp; Point(p13) = { 0.465537  , 0.895527  , 0  , 0.0211  }; 
p14 = newp; Point(p14) = { 0.465537  , 1.04553  , 0  , 0.0211  }; 
p15 = newp; Point(p15) = { 0.322613  , 1  , 0  , 0.0211  }; 
// the top edge of the square coord4 
p16 = newp; Point(p16) = { 0 ,1 ,0 ,lcar3 };
p17 = newp; Point(p17) = { 0  , 0.636237  , 0  , 0.0211  }; 
p18 = newp; Point(p18) = { 0.235723  , 0.513145  , 0  , 0.0211  }; 
p19 = newp; Point(p19) = { 0.0857225  , 0.513145  , 0  , 0.0211  }; 
p20 = newp; Point(p20) = { 0  , 0.390053  , 0  , 0.0211  }; 
p21 = newp; Point(p21) = { 0 ,0 ,0 ,lcar3 };
// the body of the square coord9 
p22 = newp; Point(p22) = { 0.5  , 0.5  , 0  , 0.0241  }; 
p23 = newp; Point(p23) = { 0.65  , 0.5  , 0  , 0.0241  }; 
p24 = newp; Point(p24) = { 0.5  , 0.65  , 0  , 0.0241  }; 
p25 = newp; Point(p25) = { 0.35  , 0.5  , 0  , 0.0241  }; 
p26 = newp; Point(p26) = { 0.5  , 0.35  , 0  , 0.0241  }; 
l1=newreg;Line(l1)={p1,p2};
C2=newreg;Circle(C2)={p2,p3,p4};
C3=newreg;Circle(C3)={p4,p3,p5};
l4=newreg;Line(l4)={p5,p6};
l5=newreg;Line(l5)={p6,p7};
C7=newreg;Circle(C7)={p7,p8,p9};
C8=newreg;Circle(C8)={p9,p8,p10};
l9=newreg;Line(l9)={p10,p11};
l10=newreg;Line(l10)={p11,p12};
C9=newreg;Circle(C9)={p12,p14,p13};
C10=newreg;Circle(C10)={p13,p14,p15};
l11=newreg;Line(l11)={p15,p16};
l12=newreg;Line(l12)={p16,p17};
C11=newreg;Circle(C11)={p17,p19,p18};
C12=newreg;Circle(C12)={p18,p19,p20};
l13=newreg;Line(l13)={p20,p21};
l14=newreg;Line(l14)={p20,p1};
C17=newreg;Circle(C17)={p23,p22,p24};
C18=newreg;Circle(C18)={p24,p22,p25};
C19=newreg;Circle(C19)={p25,p22,p26};
C20=newreg;Circle(C20)={p26,p22,p23};
Line Loop(1)={C17,C18,C19,C20};
//Plane Surface(2)={1};
Line Loop(2000)={l1,C2,C3,l4,l5,C7,C8,l9,l10,C9,C10,l11,l12,C11,C12,l14};
Plane Surface(2001)={2000,1};

h = 0.3;

Extrude Surface { 2001, {0,0,h} } { 
 //Layers { {8,4,2,1}, {9000:9003}, {0.25,0.5,0.75,1} }; 
  Recombine; Layers { 1, 9000, 1 }; 
};