[vtkusers] vtkCutter on unstructured grid overwrites cell data (VTK 4.4)
John Platt
jcplatt at lineone.net
Mon Feb 28 06:22:33 EST 2005
Hi Users,
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);
outCd->CopyData(inCd,cellId,newCellId);
creating new triangles with newCellId = 0 & 1.
Cutting the quad gives a single line - vtkQuad::Contour() calls
newCellId = lines->InsertNextCell(2,pts);
outCd->CopyData(inCd,cellId,newCellId);
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.
John.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20050228/9f7bedc5/attachment.htm>
More information about the vtkusers
mailing list