// Gmsh project created on Fri Jan 04 21:08:42 2019
SetFactory("OpenCASCADE");
//+
l = DefineNumber[ 1, Name "Parameters/l" ];
//+
b = DefineNumber[ 1, Name "Parameters/b" ];
//+
h = DefineNumber[ 1, Name "Parameters/h" ];
//+
Point(1) = {-1, 0.5, 0, 1.0};
//+
Extrude {0, -h, 0} {
  Point{1}; 
}
//+
Extrude {l, 0, 0} {
  Curve{1}; 
}
//+
Curve Loop(2) = {1, 3, -4, -2};
//+
Plane Surface(2) = {2};
//+
Extrude {0, 0, b} {
  Surface{1}; 
}
//+
Sphere(2) = {-0.6, 0, 0.5, 10, -Pi/2, Pi/2, 2*Pi};
//+
Sphere(3) = {-0.5, -0.1, 0.5, 20, -Pi/2, Pi/2, 2*Pi};
//+
BooleanFragments{ Volume{2}; Delete; }{ Volume{1}; Delete; }
//+
BooleanFragments{ Volume{3}; Delete; }{ Volume{1}; Delete; }
//+
BooleanFragments{ Volume{5}; Delete; }{ Volume{4}; Delete; }
//+
Physical Volume("leiter",1000) = {1};
//+
Physical Volume("luft",2000) = {10};
//+
Physical Volume("luft_grenze",3000) = {11};
//+
Physical Surface("links",4000) = {5};
//+
Physical Surface("rechts",5000) = {6};
