r = 0.5;
R = 2;
z = 1;

Point(10) = {0,0,0};

Point(11) = {0,r,0};
Point(12) = {0,-r,0};

Point(13) = {0,R,0};
Point(14) = {0,-R,0};

Circle(20) = {11,10,12};
Circle(21) = {12,10,11};

Circle(22) = {13,10,14};
Circle(23) = {14,10,13};

Line(24) = {11,13};
Line(25) = {12,14};

Line Loop(26) = {-25,-20,24,22};
Line Loop(27) = {25,23,-24,-21};

Ruled Surface(30) = {26};
Ruled Surface(31) = {27};

Transfinite Line{20:25} = 6;
Transfinite Surface{30};
Transfinite Surface{31};

Recombine Surface{30,31};

Extrude{0,0,z}{Surface{30}; Layers{4,1} ; Recombine;}
Extrude{0,0,z}{Surface{31}; Layers{4,1} ; Recombine;}