Tetrahedralizer produces invalid/degenerate cells for certain types of input data
It seems the tetrahedralizer filter, which is applied internally by ParaView for some volume representations, produces invalid cells depending on the cell type of input dataset. While debugging, we saw duplicated cells and overlapping cells sharing edges.
I have attached 3 repro cases: repro.tar
When the volume is built using wedges and tets everything seems fine: "dummyGrid_tetra_and_wedge.vtu"... but when building the same volume with polyhedrons instead, it results on an ill mesh: "dummyGrid_polyhedron.vtu".
IndeX volume representation was failing to render the resulting mesh and ParaView shows some artifacts for "volume" representation and heavy artifacts when using "Bunyk ray caster" that even becomes unstable and shows this error in the log (ParaView 5.7 RC3).
"\bbd\ecd3383f\build\superbuild\paraview\src\VTK\Rendering\Volume\vtkUnstructuredGridBunykRayCastFunction.cxx, line 957 vtkUnstructuredGridBunykRayCastFunction (0000029D36277020): Degenerate topology - cell face used more than twice."
There is a second case where this happens (multiblock_structure.vtm), when using structured data and applying the "MergeBlock" filter with "MergePoints" option enabled. If "MergePoints" is disabled then it renders, but with artifacts at the boundaries between blocks.