angle = 30;

a = 10/6;
b = 10/2;

Point(1) = {0, 0, 0, 1.0};
Point(2) = {10, 0, 0, 1.0};
Point(3) = {10, 10, 0, 1.0};
Point(4) = {0, 10, 0, 1.0};

Point(11) = {2, 5, 0, 1.0};
Point(21) = {5, 2, 0, 1.0};
Point(31) = {8, 5, 0, 1.0};
Point(41) = {5, 8, 0, 1.0};

Point(100) = {a,10,0, 1.0};
Point(101) = {10-b,10,0, 1.0};
Point(102) = {b,0,0, 1.0};
Point(103) = {10-a,0,0, 1.0};

Point(104) = {0,a,0, 1.0};
Point(105) = {0,10-b,0, 1.0};
Point(106) = {10,b,0, 1.0};
Point(107) = {10,10-a,0, 1.0};
Line(1) = {4,100};
Line(2) = {100,101};
Line(3) = {101,3};
Line(4) = {3,107};
Line(5) = {107,106};
Line(6) = {106,2};
Line(7) = {2,103};
Line(8) = {103,102};
Line(9) = {102,1};
Line(10) = {1,104};
Line(11) = {104,105};
Line(12) = {105,4};
Line(13) = {11,41};
Line(14) = {41,31};
Line(15) = {31,21};
Line(16) = {21,11};
Line(17) = {104,21};
Line(18) = {21,102};
Line(19) = {31,103};
Line(20) = {31,106};
Line(21) = {41,107};
Line(22) = {101,41};
Line(23) = {11,100};
Line(24) = {105,11};

Line Loop(25) = {1,-23,-24,12};
Plane Surface(26) = {25};
Line Loop(27) = {23,2,22,-13};
Plane Surface(28) = {27};
Line Loop(29) = {22,21,-4,-3};
Plane Surface(30) = {29};
Line Loop(31) = {21,5,-20,-14};
Plane Surface(32) = {31};
Line Loop(33) = {20,6,7,-19};
Plane Surface(34) = {33};
Line Loop(35) = {15,18,-8,-19};
Plane Surface(36) = {35};
Line Loop(37) = {17,18,9,10};
Plane Surface(38) = {37};
Line Loop(39) = {17,16,-24,-11};
Plane Surface(40) = {39};
Line Loop(41) = {16,13,14,15};
Plane Surface(42) = {41};


Transfinite Line{1:24} = 10;
Transfinite Surface {26} = {4,100,11,105};
Transfinite Surface {28} = {100,101,41,11};
Transfinite Surface {30} = {41,107,3,101};
Transfinite Surface {32} = {41,107,106,31};
Transfinite Surface {34} = {31,106,2,103};
Transfinite Surface {36} = {102,103,31,21};
Transfinite Surface {38} = {104,21,102,1};
Transfinite Surface {40} = {104,21,11,105};
Transfinite Surface {42} = {11,41,31,21};

Recombine Surface{26:42:2};

// rotate the center square
Rotate { {0.0,0,1},{5,5,0.0}, -Pi/4 + angle * Pi/180} { 
  Surface{42};
}
