[Gmsh] Selecting faces after boolean operation

Francis Giraldeau francis.giraldeau at gmail.com
Thu Feb 27 17:02:39 CET 2020


Le jeu. 27 févr. 2020 à 00:58, Christophe Geuzaine <cgeuzaine at uliege.be> a
écrit :

> > On 27 Feb 2020, at 00:02, Francis Giraldeau <francis.giraldeau at gmail.com>
> wrote:
> > case = newreg;
> > BooleanDifference(case) = { Volume{box1}; Delete; }{ Volume{box2}; };
> >
> > Physical Volume("case") = {case};
> > Physical Volume("box2") = {box2};
> >
> > // The boundary return also the internal surface
> > case_boundary() = Boundary{ Volume{case}; };
>
> Use CombinedBoundary to remove all internal faces.
>

Interesting. I tried that and it seems it doesn't work using
BooleanDifference. CombinedBoundary also return the internal surfaces in
the case above.

However, replacing BooleanDifference by BooleanFragments causes
CombinedBoundary to return only the external faces:

frag() = BooleanFragments { Volume{box1,box2}; Delete; }{ };
cb() = CombinedBoundary{Volume{frag()};};
Physical Surface("cb") = {cb()};

But when using BooleanFragments, box2 is deleted and cannot be used anymore
to create the corresponding physical volume.

Either way, it seems that BoundingBox is necessary to retrieve the volumes
or surfaces in order to create the physical groups.

Cheers!

Francis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20200227/419b3e2f/attachment.html>


More information about the gmsh mailing list