Gmsh - How to obtain 1D entity information in OCC (post gmsh.model.occ.removeAllDuplicates() using boolean fragments)

Hi all,

I have come across an issue using Gmsh. I use the function gmsh.model.occ.removeAllDuplicates() to get rid of duplicate entities using Boolean Fragments. This creates all new entities with new tags. I wish to then get information about these new 1D entities such as: what their lengths are, what 0D entities lie on them or form their ends, what the distance is between their end points, what 2D entities they form the boundaries of etc…

I can find no functions in the documentation that allow a user to get this information. However Gmsh must be storing it. Currently my only way of working out which 1D entity is which is to plot the mesh using the Gmsh GUI where it can be visualised and some of the above info can be viewed (see image).

Screenshot 2024-01-24 153023

But how do I access this information without having to go into the Gmsh GUI? (I need to know which 1D element is which prior to meshing so that I can set transfinite meshing constraints)

Thank you very much for your time!

1 Like

I would strongly encourage you to ask the GMSH developers about this, as it is a GMSH related issue.

1 Like

I have done also, awaiting a reply, thank you!
Happy for this to be taken down if you think it isn’t relevant on here

If you have done that, please add a link to that post here, so that if you get a reply, it is reflected here as well.

link to answer on gmsh onelab is below

how to obtain 1D entity information pre-meshing (post gmsh.model.occ.removeAllDuplicates()) (#2788) · Issues · gmsh / gmsh · GitLab (onelab.info)