[Gmsh] BooleanFragments output identification

Lionel Wilhelm wilhelm at ycoorsystems.com
Sun Nov 26 16:10:02 CET 2017


Dear Gmsh community,

I'm quite new to Gmsh and I'm trying to use the recently available 
OpenCASCADE functionalities. I would like to know if there is a 
programatically mean to identify the results of a BooleanFragments 
operation.

I have two boxes and I would like to cut them with a surface imported as a 
stp (ShapeFromFile command). So far, my script (attached) works well in the 
sense that both of my volumes are cut as expected. I store the output  of 
the  BooleanFragments command in a list v() and label each element in order 
to control which id number is which volume. I would like to know which 
volume is above and which volume is below the surface.

For instance, is it possible to return the center of gravity (COG) of a 
volume ? Based on the COG coordinates, I could identify both volumes.

Kindly,

Lionel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20171126/4f36c784/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bump.stp
Type: application/octet-stream
Size: 23982 bytes
Desc: not available
URL: <http://onelab.info/pipermail/gmsh/attachments/20171126/4f36c784/attachment-0001.stp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test0.geo
Type: application/octet-stream
Size: 507 bytes
Desc: not available
URL: <http://onelab.info/pipermail/gmsh/attachments/20171126/4f36c784/attachment-0001.geo>


More information about the gmsh mailing list