// Gmsh project created on Sat Apr 15 19:34:37 2017
SetFactory("OpenCASCADE");
Point(1) = {0, 0, 0, 1.0};
Point(2) = {0.5, 0, 0, 1.0};
Point(3) = {0.5, 0.5, 0, 1.0};
Point(4) = {0, 0.5, 0, 1.0};
Point(5) = {-0.1, 0.1, 0, 1.0};
Point(6) = {0.1, 0.1, 0, 1.0};
Point(7) = {0.1, 0.3, 0, 1.0};
Point(8) = {-0.1, 0.3, 0, 1.0};
Point(9) = {0.4, 0.1, 0, 1.0};
Point(10) = {0.6, 0.1, 0, 1.0};
Point(11) = {0.6, 0.3, 0, 1.0};
Point(12) = {0.4, 0.3, 0, 1.0};
Point(13) = {0.1, 0.4, 0, 1.0};
Point(14) = {0.4, 0.4, 0, 1.0};
Point(15) = {0.4, 0.6, 0, 1.0};
Point(16) = {0.1, 0.6, 0, 1.0};
Line(1) = {1, 2};
Line(2) = {2, 3};
Line(3) = {3, 4};
Line(4) = {4, 1};
Line(5) = {5, 6};
Line(6) = {6, 7};
Line(7) = {7, 8};
Line(8) = {8, 5};
Line(9) = {9, 10};
Line(10) = {10, 11};
Line(11) = {11, 12};
Line(12) = {12, 9};
Line(13) = {14, 15};
Line(14) = {15, 16};
Line(15) = {16, 13};
Line(16) = {13, 14};
Line Loop(1) = {4, 1, 2, 3};
Plane Surface(1) = {1};
Line Loop(2) = {7, 8, 5, 6};
Plane Surface(2) = {2};
Line Loop(3) = {15, 16, 13, 14};
Plane Surface(3) = {3};
Line Loop(4) = {11, 12, 9, 10};
Plane Surface(4) = {4};

b1[]=Extrude {0, 0, 0.1} {
  Surface{1}; 
};

b2[]=Extrude {0, 0, 0.1} {
  Surface{3}; 
};

b3[]=Extrude {0, 0, 0.1} {
  Surface{4}; 
};

b4[]=Extrude {0, 0, 0.1} {
  Surface{2}; 
};

Boundary{ Volume{b1[1]};}

Physical Surface("out")=b1[2];
Physical Surface("inside")=b2[3];
BooleanDifference{ Volume{b1[1]}; Delete;}{ Volume{b2[1]}; Volume{b3[1]}; Volume{b4[1]}; Delete; }
SyncModel;
