Dear all,

I would like to generate a geometry where I have a bigger sphere (radius=3) and 
a smaller one inside it (radius=1). Then I want to generate a 3D mesh without 
the sphere inside (so there is a hole in the middle of the bigger sphere).

I am trying two different approaches, but none of them seem to work:

1) BooleanDifference - I want to take away the smaller sphere from the bigger 
one. This is the code:

Sphere(1) = {0, 0, 0, 1, -Pi/2, Pi/2, 2*Pi};
Sphere(2) = {0, 0, 0, 3, -Pi/2, Pi/2, 2*Pi};
BooleanDifference{ Volume{2}; Delete; }{ Volume{1}; Delete; }

but it does not do it. Could you explain why, please?

2) Extrude - I generate a half annulus (with the first Extrude), then I want to 
extrude it in rotation (2*Pi) to generate the same geometry, sphere in a 
sphere. This is the code:

Point(1) = {1, 0, 0, 1.0};
Point(2) = {2, 0, 0, 1.0};
Line(1) = {1, 2};
//+
Extrude {{0, 0, 1}, {0, 0, 0}, Pi} {
Line{1};Layers{8};Recombine;
}
//+
Extrude {{1, 0, 0}, {0, 0, 0}, Pi} {
Surface{5};Layers{8};Recombine;
}

but again, the second Extrude does not do it. Could you explain why, please?

Could you tell me how to do it, please?

Thank you.

Kind regards,
Silvia


_______________________________________________
gmsh mailing list
[email protected]
http://onelab.info/mailman/listinfo/gmsh

Reply via email to