[Gmsh] Sphere in a sphere mesh
Jeremy Theler
jeremy at seamplex.com
Wed Mar 4 10:32:22 CET 2020
On Wed, 2020-03-04 at 08:25 +0000, Silvia Ceccacci (HDR) wrote:
> 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; }
This actually works. See attached png.
--
jeremy theler
www.seamplex.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20200304/f5bd8522/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sphere.png
Type: image/png
Size: 45856 bytes
Desc: not available
URL: <http://onelab.info/pipermail/gmsh/attachments/20200304/f5bd8522/attachment-0001.png>
More information about the gmsh
mailing list