Skip to content

WIP: Convex polyhedral contouring

I'm working on improving the contouring and clipping of polyhedral cells. The idea is to decompose convex polyhedral cells into tetras and offload the clipping and contouring to these tetras. For concave polyhedral cells the existing algorithm is used.

I see this as an improvement over the existing situation, in which contouring of a polyhedral cell can fail, depending on the point data:

   (+)-----------------(+)
   /|                   /|
  / |                  / |
 /  |                 /  |
(+)------------------(+) |
|   |                |   |
|  (-)---------------|--(-)
| /                  | /
|/                   |/
(-)-------(+)-------(-)

In this case (also see TestPolyhedron4), because there is an extra vertex in the lower front edge, the contouring fails, resulting in gaps in the final contoured surface. By offloading the contouring to tetras after decomposing this cell, it works correctly.

This work is still in progress - I need to test this further in larger datasets. Also, the impact on other code that presumes that contouring or clipping a VTK_POLYHEDRON will always return VTK_POLYHEDRON cells needs to be further investigated.

I'm interested in anyone's take on this. I think that @tjcorona has worked on polyhedral contouring too?

Merge request reports