[vtkusers] vtkCutter on unstructured grid overwrites cell data (VTK 4.4)
jcplatt at lineone.net
Mon Feb 28 06:22:33 EST 2005
I think there is a problem colour mapping cell scalars using vtkCutter
on an unstructured grid. The grid contains 2 cells, a hex and a quad.
Cutting the hex creates 2 triangles - vtkHexahedron::Contour() calls
newCellId = polys->InsertNextCell(3,pts);
creating new triangles with newCellId = 0 & 1.
Cutting the quad gives a single line - vtkQuad::Contour() calls
newCellId = lines->InsertNextCell(2,pts);
creating a new line with newCellId = 0.
Unfortunately, the CopyData() in vtkQuad::Contour() overwrites the cell
data for the first triangle. On more complex geometries this causes the
renderer to crash because the cell data is not present.
I think the calls to copy the cell data need the new cell Id in the
aggregate polydata, not the individual lines or polys - something like
outCD->CopyData(inCd, cellId, vtkCutter->NumberOfNewCells++ );
Any suggestions for a resolution would be very much appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vtkusers