We have a 3D (volume) unstructured, possibly hybrid, degenerative irregular mesh data structure that we are capable of generating (mostly composed of hexahedra and general polyhedra, using a mix of CSG and b-rep) and a set of triangulated surfaces that we know intersect the mesh. We would like to split the volume mesh by the set of intersecting triangulated surfaces and change the topology of the mesh accordingly. These meshes have several uses including computation and visualization. Also the geometries they both represent are highly irregular and complicated, so oct-trees or oct-forests are not being strongly considered. We already have an implementation to detect such intersections in the whole volume. The triangulated surfaces can intersect themselves inside the volume too and split the mesh in another number of topological regions.What we are looking for is an algorithm to split the mesh accordingly.Would you know any library (whatever language, but if commercial ones, implemented in C++) or papers that would deal with this?We are currently looking into using Marching cubes and have started some development towards that effort, but are interested in existing implementations or research on the topic. We have also been looking into CGAL but it does not fit our purpose. We know OpenFOAM by name but we do not know if it can help us.Thanks for your help!
Looking for a library or algorithms to perfom clipping 3D unstructured meshes by a set of surfaces
finite element;libraries;geometry;mesh generation;fluid dynamics
VTK has many utilities for cutting meshes with planes and implicitly-defined surfaces. It's possible that would work for you. To use it, you would probably feed your whole mesh into a vtkUnstructuredGrid (or similar) and have VTK do all the cutting. I think you will have a harder time if you want control over how topology changes when a cell is cut.A lower level and lightweight tool for geometric tasks relating to cutting cells is Voro++. I have used it for some mesh preprocessing tasks and computing sizes of dual cells; it worked well and was unintrusive. Voro++ would be a good choice if you want to cut single cells or collections of cells, then use your own logic for changing mesh topology due to the cut.You mentioned CGAL, but did not state how it failed to meet your needs. Perhaps you could specify what you are looking for more precisely?