vtkClipPolyData with implicit function produces NANs
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
In this example: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Broken/PolyData/ImplicitDataSetClipping
I create a sphere (vtkPolyData) and clip it with an implicit cube (vtkBox). The visual result of the clipping looks correct (the portion of the sphere that is inside the box remains), but there are 68 cells reported in the resulting clipped data (clipped->GetNumberOfCells()), but I only count 20 (2 columns of 10 triangles).
The cells seem to be well formed, but there are tons of NAN points that I guess the cells are referencing. At line 250ish in vtkClipPolyData.cxx:
// evaluate implicit cutting function
for ( i=0; i < numberOfPoints; i++ )
{
s = clipScalars->GetComponent(cellIds->GetId(i),0);
cellScalars->InsertTuple(i, &s);
}
's' is getting set to -inf for many of the cells, which is my best quick guess at what is causing the NANs.