SetFactory("OpenCASCADE");

Prec=0.5;
Mesh.CharacteristicLengthMin = Prec;
Mesh.CharacteristicLengthMax = Prec;

// Définition géométrique
L=10.;
Rs=L/3.;

// Définition maillage
N=1+(L/Prec)%100000;

V1=newv;Box(V1) = {0., 0., 0., L, L, L};
V2=newv;Sphere(V2) = {L/2., L/2., 0., Rs};

s() = Abs(Boundary{ Volume{V1}; });
l() = Unique(Abs(Boundary{ Surface{s()}; }));

Transfinite Line {l()} = N;
Transfinite Surface{s()};
Transfinite Volume{V1};
Recombine Surface {s()};

Physical Volume(1) = {V1};
Physical Volume(2) = {V2};

//For i In {0 : # s[] - 1}
//  Printf("s[%g] is %g", i, s[i]);
//EndFor









