inconsistent cuts from cells with a non-planar quad face
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
When a cell has a non-planar face it can give a different cut depending on the normal (see image). Either could be considered correct but I would consider it a bug that it is not consistent for the same cell.
To reproduce use a "Programmable Source" that outputs vtkUnstructuredGrid with the following script:
8<--------------------------------------------- output = self.GetOutput() npts = 5 pts = vtk.vtkPoints() pts.InsertNextPoint(-1.0, -1.0, -1.0) pts.InsertNextPoint( 1.0, -1.0, -0.5) pts.InsertNextPoint( 1.0, 1.0, -1.0) pts.InsertNextPoint(-1.0, 1.0, -0.5) pts.InsertNextPoint( 0.0, 0.0, 1.0) output.SetPoints(pts) output.Allocate(1,1) ids = vtk.vtkIdList() for i in range(npts): ids.InsertId(i,i) output.InsertNextCell(vtk.VTK_PYRAMID, ids) --------------------------------------------->8
Now apply "Slice" for Origin (0,0,-0.75) and try Normal of (0,0,-1) and (0,0,1). The output will be different depending on the direction.