[Gmsh] Does BooleanUnion works on surfaces?

Marco Antolovic marco_antolovic at yahoo.it
Sun Aug 23 21:40:33 CEST 2020


Hi all,
while I was building a geometry I came across an unexpected behavior of the BooleanUnion operator.
I assumed that the operator would work on surfaces but it does not. If you try the example below, the union result is going to be two separate surfaces

SetFactory("OpenCASCADE");

recta1=newreg;Rectangle ( recta1 ) = { -.02, -.030, 0, .005, 0.01};recta2=newreg;Rectangle ( recta2 ) = { -.015,   -.020, 0, .005, -0.01 };
resulting_surface() = BooleanUnion{ Surface{recta1}; Delete;}{ Surface{recta2}; Delete;};
For i In {0: #resulting_surface()-1}Printf ("test openCASCADE surface union = %g", resulting_surface(i));EndFor
The example shows that resulting_surface() contains two elements instead of one.

Does BooleanUnion works on surfaces?

Many thanks,
Marco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20200823/5930bba9/attachment.html>


More information about the gmsh mailing list