Mesh.Algorithm3D = 4 ;

lc = .2 ;
x = .0;                                  
Point(1) = {0,0,0,lc};                                          
Point(2) = {1,0,0,lc};                                          
Point(3) = {1,1,0,lc};                                          
Point(4) = {0,1,0,lc};                                          
Line(1) = {4,3};                                          
Line(2) = {3,2};                                          
Line(3) = {2,1};                                          
Line(4) = {1,4};                                          

Line Loop(5) = {2,3,4,1};                                          
Plane Surface(6) = {5};                                          
ndiv = 10 ; Transfinite Line{1:4} = ndiv ;
Transfinite Surface{6};

Extrude {0,0.0,1}{ Surface{6}; Layers {ndiv};
 //Recombine;
}

Dilate {{.5, .5, .5}, 2} {
  Duplicata{Surface{6};}
}

Extrude {0,0.0,2}{ Surface{29};}
Delete{Volume{2};}

Surface Loop(56) = {55, 42, 29, 46, 50, 54};
Surface Loop(57) = {28, 15, 6, 19, 23, 27};
Volume(58) = {56, 57};
