Python libraries for mesh intersection with elements, in 2D and 3D

I have done quite a lot of looking around now, and I am wondering if anyone knows more about the functionalities of the libraries I have looked into, or whether I missed some things. I am trying to do this in python (really in Julia but the search for suitable packages was even more limited).

I am trying to intersect 3D and 2D Meshes with 3D and 2D elements. What I need from that intersection is the center of the intersection, and the volume. I have a coordinate matrix as well as a connectivity matrix, to define the mesh, and the same goes for the element. I am going to have a variety of elements of different shapes (Quadrangles, Tetrahedrons, etc..).

Here are the libraries I looked at, and the problems/missing functionalities I encountered.

geopandas - this worked like a charm for the 2D case, but does not support 3D

trimesh - there was no way I could define simple geometries for the element, it also triangulates the mesh, which is not suitable for my application, since I need the original mesh with the elements as they are in the file

pygalmesh - I resorted to defining the mesh with meshio, however this doesnt work with the pygalmesh intersection algorithm. There was no way that I found to create the mesh from coordinates and connectivity, since pygalmesh only supports tetrahedral meshes it seems!

pyvista - the intersection algorithm is just simply not functional enough

Am I missing something in any of these packages? Are there any additional libraries I might have missed, maybe newer ones? And finally, is it even possible to do everything with just one library?

I also tried working with cgal-swig-bindings, but this is not ideal since I am working with Julia, and call all the python packages via PyCall, and using a package that is a wrapper around yet another language is something I would like to avoid if possible.

Thank you so much in advance!

Upvotes: 0

Views: 44

Answers (0)

Related Questions