Clipping breaks the Hexahedron adjacent to the Polyhedron


I am currently trying to create a cut-cell program to cut cartesian grids with watertight PolyData. Once this is completed, unlike vtkDelaunay3D, volumes can be created for concave PolyData. (The cut-cell program is the Sutherland-Hodgman clip algorithm from SPARTA ( rewritten in the style of the VTK library.)

Unfortunately, clipping the resulting mesh of the cut-cell with ParaView’s Clip filter breaks the Hexahedron adjacent to the Polyhedron (as shown in the figure below). I can’t figure out what is causing this, the Polyhedron and Hexahedron definitions seem to be correct. Is it a problem with the vtkTableBasedClipDataSet used by the Clip filter? Or is it another reason?

The program and sample data are below.
CutCell3D.7z (94.4 KB)

@will.schroeder This is similar to the issue that i have tagged you in the past. Do you want me to take a look at it, or do you wanna go for it?

I’ll take a look next week when I return from vacation.