
// affect values to variables
r1 = 1.5;
c1 = (1.75*1.75-2*r1*r1)/(2*r1-2*1.75); 
n1 = 10;
Printf("Center: '%g'", c1);

//Points
Point(2) = {c1,0,c1};
Point(3) = {-c1,0,c1};
Point(4) = {0,c1,c1};
Point(5) = {0,-c1,c1};
Point(112) = {r1,r1,-r1};
Point(113) = {-r1,r1,-r1};
Point(114) = {-r1,-r1,-r1};
Point(115) = {r1,-r1,-r1};    
Point(122) = {r1,r1,-2.5};
Point(123) = {-r1,r1,-2.5};
Point(124) = {-r1,-r1,-2.5};
Point(125) = {r1,-r1,-2.5};
   
// Spherical surface
Circle(220) = {113,5,112};
Circle(221) = {112,3,115};
Circle(222) = {115,4,114};
Circle(223) = {114,2,113};     
Line Loop(310) = {220,221,222,223};                         
Ruled Surface(410) = {310};         
Transfinite Line {220,221,222,223} = n1; 

// Planar surface     
Line(240) = {123,122};
Line(241) = {122,125};
Line(242) = {125,124};
Line(243) = {124,123};              
Line Loop(320) = {240,241,242,243};  
Plane Surface(420) = {320};         
Transfinite Line {240,241,242,243} = n1; 

// Sides
Line(250) = {113,123};             
Line(251) = {112,122};  
Line(252) = {115,125};  
Line(253) = {114,124};             
Line Loop(321) = {220,251,-240,-250};       
Line Loop(322) = {221,252,-241,-251};       
Line Loop(323) = {222,253,-242,-252};       
Line Loop(324) = {223,250,-243,-253}; 
Plane Surface(421) = {321};
Plane Surface(422) = {322};
Plane Surface(423) = {323};
Plane Surface(424) = {324};         
Transfinite Line {250,251,252,253} = n1; 

Surface Loop(502) = {410, 420, 421, 422, 423, 424};
Volume(502) = {502};

Transfinite Surface {410, 420, 421, 422, 423, 424};   
Recombine Surface {410, 420, 421, 422, 423, 424};
Transfinite Volume {502};
Recombine Volume {502};                              