// Gmsh project created on Fri Dec 28 22:15:11 2012
lc = 0.1;
// Half length of cubic edge
a = 1.0;
// Radius of sphere
r = 3.0;
// Center of sphere
Point(newp) = {0,0,0,lc};

Point(newp) = {-a,-a,a,lc};
Point(newp) = {a,-a,a,lc};
Point(newp) = {a,a,a,lc};
Point(newp) = {-a,a,a,lc};

Point(newp) = {-a,-a,-a,lc};
Point(newp) = {a,-a,-a,lc};
Point(newp) = {a,a,-a,lc};
Point(newp) = {-a,a,-a,lc};

rx = r/Sqrt(3);
rz = r/Sqrt(3);
Point(newp) = {-rx,-rx,rz,lc};
Point(newp) = {rx,-rx,rz,lc};
Point(newp) = {rx,rx,rz,lc};
Point(newp) = {-rx,rx,rz,lc};

Point(newp) = {-rx,-rx,-rz,lc};
Point(newp) = {rx,-rx,-rz,lc};
Point(newp) = {rx,rx,-rz,lc};
Point(newp) = {-rx,rx,-rz,lc};

Line(1) = {9, 5};
Line(2) = {9, 8};
Line(3) = {9, 6};
Line(4) = {3, 2};
Line(5) = {4, 3};
Line(6) = {3, 7};
Line(7) = {7, 8};
Line(8) = {8, 4};
Line(9) = {4, 5};
Line(10) = {5, 2};
Line(11) = {6, 2};
Line(12) = {6, 7};
Line(13) = {5, 13};
Line(14) = {17, 9};
Line(15) = {10, 2};
Line(16) = {14, 6};
Line(17) = {15, 7};
Line(18) = {11, 3};
Line(19) = {16, 8};
Line(20) = {12, 4};
Circle(21) = {16, 1, 12};
Circle(22) = {16, 1, 17};
Circle(23) = {17, 1, 14};
Circle(24) = {16, 1, 15};
Circle(25) = {15, 1, 14};
Circle(26) = {15, 1, 11};
Circle(27) = {11, 1, 12};
Circle(28) = {11, 1, 10};
Circle(29) = {10, 1, 13};
Circle(30) = {14, 1, 10};
Circle(31) = {17, 1, 13};
Circle(32) = {13, 1, 12};
Line Loop(33) = {7, 8, 5, 6};
Plane Surface(34) = {33};
Line Loop(35) = {4, -10, -9, 5};
Plane Surface(36) = {35};
Line Loop(37) = {6, -12, 11, -4};
Plane Surface(38) = {37};
Line Loop(39) = {10, -11, -3, 1};
Plane Surface(40) = {39};
Line Loop(41) = {2, -7, -12, -3};
Plane Surface(42) = {41};
Line Loop(43) = {8, 9, -1, 2};
Plane Surface(44) = {43};
Line Loop(45) = {18, -5, -20, -27};
Plane Surface(46) = {45};
Line Loop(47) = {26, 18, 6, -17};
Plane Surface(48) = {47};
Line Loop(49) = {24, 17, 7, -19};
Plane Surface(50) = {49};
Line Loop(51) = {21, 20, -8, -19};
Plane Surface(52) = {51};
Line Loop(53) = {32, 20, 9, 13};
Plane Surface(54) = {53};
Line Loop(55) = {22, 14, 2, -19};
Plane Surface(56) = {55};
Line Loop(57) = {31, -13, -1, -14};
Plane Surface(58) = {57};
Line Loop(59) = {17, -12, -16, -25};
Plane Surface(60) = {59};
Line Loop(61) = {3, -16, -23, 14};
Plane Surface(62) = {61};
Line Loop(63) = {16, 11, -15, -30};
Plane Surface(64) = {63};
Line Loop(65) = {18, 4, -15, -28};
Plane Surface(66) = {65};
Line Loop(67) = {10, -15, 29, -13};
Plane Surface(68) = {67};
Line Loop(69) = {21, -32, -31, -22};
Ruled Surface(70) = {69};
Line Loop(71) = {25, 30, -28, -26};
Ruled Surface(72) = {71};
Line Loop(73) = {24, 25, -23, -22};
Ruled Surface(74) = {73};
Line Loop(75) = {24, 26, 27, -21};
Ruled Surface(76) = {75};
Line Loop(77) = {27, -32, -29, -28};
Ruled Surface(78) = {77};
Line Loop(79) = {29, -31, 23, 30};
Ruled Surface(80) = {79};

Surface Loop(81) = {58, 54, 44, 52, 56, 70};
Volume(82) = {81};
Surface Loop(83) = {36, 78, 68, 66, 46, 54};
Volume(84) = {83};
Surface Loop(85) = {66, 72, 64, 38, 48, 60};
Volume(86) = {85};
Surface Loop(87) = {60, 50, 62, 74, 42, 56};
Volume(88) = {87};
Surface Loop(89) = {76, 50, 52, 34, 46, 48};
Volume(90) = {89};
Surface Loop(91) = {80, 68, 58, 64, 40, 62};
Volume(92) = {91};

Physical Volume(93) = {82, 84, 92, 86, 90, 88};
Transfinite Line{1:32} = 9;

Transfinite Surface {34} = {4, 8, 7, 3} ;
Transfinite Surface {36} = {5, 4, 2, 3} ;
Transfinite Surface {38} = {2, 3, 7, 6} ;
Transfinite Surface {42} = {6, 9, 8, 7} ;
Transfinite Surface {40} = {5, 2, 6, 9} ;
Transfinite Surface {44} = {5, 9, 8, 4} ;
Transfinite Surface {46} = {4, 3, 11, 12} ;
Transfinite Surface {48} = {7, 3, 11, 15} ;
Transfinite Surface {50} = {7, 8, 16, 15} ;
Transfinite Surface {52} = {8, 4, 12, 16} ;
Transfinite Surface {54} = {5, 4, 12, 13} ;
Transfinite Surface {56} = {16, 8, 9, 17} ;
Transfinite Surface {58} = {9, 17, 13, 5} ;
Transfinite Surface {60} = {6, 7, 15, 14} ;
Transfinite Surface {62} = {9, 6, 14, 17} ;
Transfinite Surface {64} = {2, 6, 14, 10} ;
Transfinite Surface {66} = {2, 3, 11, 10} ;
Transfinite Surface {68} = {2, 5, 13, 10} ;
Transfinite Surface {70} = {13, 17, 16, 12} ;
Transfinite Surface {72} = {15, 11, 10, 14} ;
Transfinite Surface {74} = {15, 14, 17, 16} ;
Transfinite Surface {76} = {11, 15, 16, 12} ;
Transfinite Surface {78} = {11, 10, 13, 12} ;
Transfinite Surface {80} = {13, 10, 14, 17} ;

Transfinite Volume{84} = {2, 3, 4, 5, 10, 11, 12, 13};
Transfinite Volume{88} = {7, 8, 9, 6, 15, 16, 17, 14};
Transfinite Volume{92} = {6, 2, 5, 9, 14, 10, 13, 17};
Transfinite Volume{86} = {2, 6, 7, 3, 10, 14, 15, 11};
Transfinite Volume{82} = {4, 5, 9, 8, 12, 13, 17, 16}; 
Transfinite Volume{90} = {7, 8, 4, 3, 15, 16, 12, 11};

Recombine Surface{34:80:2};


