
SetFactory("Built-in"); //OpenCASCADE

Point(1) = {0, 0, 0, 0.1};
Point(2) = {0.1,0.1, 0, 0.1};
Point(3) = {-0.1, 0.1, 0, 0.1};
Point(4) = {-0.1, -0.1, 0, 0.1};
Point(5) = {0.1, -0.1, 0, 0.1};

Point(6) = {0.11, 0.11, 0, 0.1};
Point(7) = {-0.11, 0.11, 0, 0.1};
Point(8) = {-0.11, -0.11, 0, 0.1};
Point(9) = {0.11, -0.11, 0, 0.1};

Point(10) = {0.4, 0.4, 0, 0.1};
Point(11) = {-0.4, 0.4, 0, 0.1};
Point(12) = {-0.4, -0.4, 0, 0.1};
Point(13) = {0.4, -0.4, 0, 0.1};

Point(14) = {4.8, 3.2, 0, 1};
Point(15) = {-4.8, 3.2, 0, 1};
Point(16) = {-4.8, -3.2, 0, 1};
Point(17) = {4.8, -3.2, 0, 1};

Circle(1) = {2, 1, 3};
Circle(2) = {3, 1, 4};
Circle(3) = {4, 1, 5};
Circle(4) = {5, 1, 2};

Circle(5) = {6, 1, 7};
Circle(6) = {7, 1, 8};
Circle(7) = {8, 1, 9};
Circle(8) = {9, 1, 6};

Circle(9) = {10, 1, 11};
Circle(10) = {11, 1, 12};
Circle(11) = {12, 1, 13};
Circle(12) = {13, 1, 10};

Line(13) = {14, 15};
Line(14) = {15, 16};
Line(15) = {16, 17};
Line(16) = {17, 14};
Line(17) = {14, 10};
Line(18) = {15, 11};
Line(19) = {16, 12};
Line(20) = {17, 13};
Line(21) = {10, 6};
Line(22) = {11, 7};
Line(23) = {12, 8};
Line(24) = {13, 9};
Line(25) = {6, 2};
Line(26) = {7, 3};
Line(27) = {8, 4};
Line(28) = {9, 5};



Line Loop(1) = {13, 18, -9, -17};
Plane Surface(1) = {1};
Line Loop(2) = {14, 19, -10, -18};
Plane Surface(2) = {2};
Line Loop(3) = {15, 20, -11, -19};
Plane Surface(3) = {3};
Line Loop(4) = {16, 17, -12, -20};
Plane Surface(4) = {4};
Line Loop(5) = {9,  22,  -5,  -21};
Plane Surface(5) = {5};
Line Loop(6) = {10, 23, -6,  -22};
Plane Surface(6) = {6};
Line Loop(7) = {11, 24, -7, - 23};
Plane Surface(7) = {7};
Line Loop(8) = {12, 21, -8, -24};
Plane Surface(8) = {8};
Line Loop(9) = {5,26, -1, -25};
Plane Surface(9) = {9};
Line Loop(10) = {6, 27, -2, -26};
Plane Surface(10) = {10};
Line Loop(11) = {7, 28, -3, -27};
Plane Surface(11) = {11};
Line Loop(12) = {8, 25, -4, -28};
Plane Surface(12) = {12};

Extrude {0, 0, 0.1} {
  Surface{1}; Surface{2}; Surface{3}; Surface{4}; Surface{5}; Surface{6}; Surface{7}; Surface{8}; 
}
Extrude {0, 0, 0.1} {
  Surface{9}; Surface{10}; Surface{11}; Surface{12}; 
}


Transfinite Line {1, 5, 9, 4, 8, 12, 3, 7, 11, 2, 6, 10, 13, 16, 15, 14} = 100 Using Progression 1;
Transfinite Line {208,120,32,230,142,54,252,164,76,274,186,98,30,52,74,96} = 100 Using Progression 1;

Transfinite Line {17, 20, 19, 18} = 131 Using Progression 0.985;
Transfinite Line {31,33,53,75} = 131 Using Progression 0.985;

Transfinite Line {21, 24, 23, 22} = 101 Using Progression 0.983;
Transfinite Line {119,121,141,163} = 101 Using Progression 0.983;

Transfinite Line {25, 28, 27, 26} = 13 Using Progression 0.95;
Transfinite Line {207,209,229,251} = 13 Using Progression 0.95;

Transfinite Surface {1,2,3,4,5,6,7,8,9,10,11,12}; Recombine Surface {1,2,3,4,5,6,7,8,9,10,11,12};
Transfinite Surface {50,72,94,116,138,160,182,204,226,248,270,292}; Recombine Surface {50,72,94,116,138,160,182,204,226,248,270,292};



