rsi = 3*1e-8;
rse = 4*1e-8;
lcube = 20*1e-8;
msi = 0.4*1e-8;
mse = 0.5*1e-8;
mc = 3*1e-8;

// Sfera interioara
Point(1) = {0, 0, 0, msi};
Point(2) = {rsi, 0, 0, msi};
Point(3) = {0, rsi, 0, msi};
Point(4) = {-rsi, 0, 0, msi};
Point(5) = {0, -rsi, 0, msi};
Point(6) = {0, 0, -rsi, msi};
Point(7) = {0, 0, rsi, msi};

Circle (1) = {2, 1, 3};
Circle (2) = {3, 1, 4};
Circle (3) = {4, 1, 5};
Circle (4) = {5, 1, 2};
Circle (5) = {3, 1, 6};
Circle (6) = {6, 1, 5};
Circle (7) = {5, 1, 7};
Circle (8) = {7, 1, 3};
Circle (9) = {2, 1, 7};
Circle (10) = {7, 1, 4};
Circle (11) = {4, 1, 6};
Circle (12) = {6, 1, 2};

Line Loop (1000014) = {2, -10, 8};
Ruled Surface (14) = {1000014};
Line Loop (1000016) = {10, 3, 7};
Ruled Surface (16) = {1000016};
Line Loop (1000018) = {-8, -9, 1};
Ruled Surface (18) = {1000018};
Line Loop (1000020) = {-11, -2, 5};
Ruled Surface (20) = {1000020};
Line Loop (1000022) = {-5, -1, -12};
Ruled Surface (22) = {1000022};
Line Loop (1000024) = {-3, 11, 6};
Ruled Surface (24) = {1000024};
Line Loop (1000026) = {-7, 4, 9};
Ruled Surface (26) = {1000026};
Line Loop (1000028) = {-4, -6, 12};
Ruled Surface (28) = {1000028};

Surface Loop (1000030) = {28, 26, 16, 14, 20, 24, 22, 18};
Volume (30) = {1000030};
Coherence;
Show "*";

// Sfera exterioara
Point(16) = {rse, 0, 0, mse};
Point(17) = {0, rse, 0, mse};
Point(18) = {-rse, 0, 0, mse};
Point(19) = {0, -rse, 0, mse};
Point(20) = {0, 0, -rse, mse};
Point(21) = {0, 0, rse, mse};

Circle (13) = {16, 1, 17};
Circle (14) = {17, 1, 18};
Circle (15) = {18, 1, 19};
Circle (16) = {19, 1, 16};
Circle (17) = {17, 1, 20};
Circle (18) = {20, 1, 19};
Circle (19) = {19, 1, 21};
Circle (20) = {21, 1, 17};
Circle (21) = {16, 1, 21};
Circle (22) = {21, 1, 18};
Circle (23) = {18, 1, 20};
Circle (24) = {20, 1, 16};

Line Loop (1000064) = {14, -22, 20};
Ruled Surface (64) = {1000064};
Line Loop (1000066) = {22, 15, 19};
Ruled Surface (66) = {1000066};
Line Loop (1000068) = {-20, -21, 13};
Ruled Surface (68) = {1000068};
Line Loop (1000070) = {-23, -14, 17};
Ruled Surface (70) = {1000070};
Line Loop (1000072) = {-17, -13, -24};
Ruled Surface (72) = {1000072};
Line Loop (1000074) = {-15, 23, 18};
Ruled Surface (74) = {1000074};
Line Loop (1000076) = {-19, 16, 21};
Ruled Surface (76) = {1000076};
Line Loop (1000078) = {-16, -18, 24};
Ruled Surface (78) = {1000078};

Surface Loop (1000080) = {78, 76, 66, 64, 70, 74, 72, 68};
Volume (80) = {1000080,1000030};
Coherence;
Show "*";

// Cub
Point(8) = {-lcube/2, -lcube/2, -lcube/2, mc};
Point(9) = {-lcube/2, -lcube/2, lcube/2, mc};
Point(10) = {-lcube/2, lcube/2, -lcube/2, mc};
Point(11) = {-lcube/2, lcube/2, lcube/2, mc};
Point(12) = {lcube/2, lcube/2, -lcube/2, mc};
Point(13) = {lcube/2, lcube/2, lcube/2, mc};
Point(14) = {lcube/2, -lcube/2, -lcube/2, mc};
Point(15) = {lcube/2, -lcube/2, lcube/2, mc};

Line(1000032) = {11,13};
Line(1000033) = {13,15};
Line(1000034) = {15,9};
Line(1000035) = {11,9};
Line(1000036) = {9,8};
Line(1000037) = {8,10};
Line(1000038) = {11,10};
Line(1000039) = {8,14};
Line(1000040) = {15,14};
Line(1000041) = {12,10};
Line(1000042) = {12,14};
Line(1000043) = {12,13};

Line Loop(1000044) = {1000040,-1000042,1000043,1000033};
Plane Surface(1000045) = {1000044};
Line Loop(1000046) = {1000034,-1000035,1000032,1000033};
Plane Surface(1000047) = {1000046};
Line Loop(1000048) = {1000036,1000037,-1000038,1000035};
Plane Surface(1000049) = {1000048};
Line Loop(1000050) = {1000041,-1000038,1000032,-1000043};
Plane Surface(1000051) = {1000050};
Line Loop(1000052) = {1000036,1000039,-1000040,1000034};
Plane Surface(1000053) = {1000052};
Line Loop(1000054) = {1000037,-1000041,1000042,-1000039};
Plane Surface(1000055) = {1000054};

Surface Loop(1000056) = {1000051,-1000055,-1000049,-1000053,1000045,1000047};
Volume(1000058) = {1000080,1000056};
Show "*";

Physical Surface(1000059) = {1000051};
Physical Surface(1000060) = {1000053};
Physical Surface(1000061) = {1000049,1000055,1000045,1000047};
Physical Volume(1000062) = {30}; 				// sfera interioara 
Physical Volume(1000063) = {80}; 				// sfera exterioara minus cea interioara 
Physical Volume(1000064) = {1000058};			// cub minus sfera exterioara 

/*
Transfinite Line {1000038,1000037,1000041,1000036,1000039,1000042,1000043,1000040,1000033,1000034,1000032,1000035,2,5,11,10,8,3,7,6,12,4,1,9} = 10 Using Progression 1;
Transfinite Line {1000037,1000038,1000041,1000043,1000042,1000039,1000040,1000032,1000033,1000034,1000035,1000036,1,12,9,4,7,8,3,10,11,2,6,5} = 11 Using Progression 1;
Transfinite Surface {1000049} = {8,10,11,9};
Transfinite Surface {1000055} = {14,8,10,12};
Transfinite Surface {1000045} = {15,14,12,13};
Transfinite Surface {1000053} = {15,9,8,14};
Transfinite Surface {1000047} = {11,13,15,9};
Transfinite Volume{30} = {6,2,7,4,5,3};
Transfinite Volume{30} = {14,12,10,8,9,15,13,11};
Show "*";
*/Show "*";
