Results from vtkCell::Clip()

Still not quite there.

Here’s the basic problem I need to solve:

For the given geometry of the cell, and a known saturation (say 20%, different for each cell), I need to work out where the liquid level in that particular cell is located.

My intended approach is to analyze each cell once and then to use quadratic interpolations. This way I can output the liquid level many times over without additional computational costs after the analysis phase.

To analyse the cell I want to determine the volume of the lower part of the cell a) at each unique elevation of the cell vertices, and b) at mid-points, since I need additional points to fit quadratic functions.

Using vtkCell::Clip() gives me the correct answer for each cell. However I am just struggling to put the results from that operation back together. I am currently looking at vtkOrderedTriangulator which could work on the points created. I am actually not interested in creating the clipped cell artifacts; all I want to do is figure out their volume, for which tetrahedrons would be ideal.