Commit ee02727b authored by Paul Edwards's avatar Paul Edwards Committed by David E. DeMarle

Fix for polyhedron cells.

This happens for datasets containing a mixture of cell types.  The
vtkIdList was not reset consistently between polyhedron cells and other
cell types.

Change-Id: I2ace508eff3515ac2b6173250d8e2d338e4ba3de
parent 36ad2819
......@@ -299,6 +299,7 @@ int vtkAppendFilter::RequestData(
vtkUnstructuredGrid *ug = vtkUnstructuredGrid::SafeDownCast(ds);
for (cellId=0; cellId < numCells && !abort; cellId++)
{
newPtIds->Reset ();
if (ug && ds->GetCellType(cellId) == VTK_POLYHEDRON )
{
vtkIdType nfaces, *facePtIds;
......@@ -314,12 +315,10 @@ int vtkAppendFilter::RequestData(
}
newCellId = output->InsertNextCell(VTK_POLYHEDRON,nfaces,newPtIds->GetPointer(0));
outputCD->CopyData(cellList,cd,inputCount,cellId,newCellId);
newPtIds->Reset ();
}
else
{
ds->GetCellPoints(cellId, ptIds);
newPtIds->Reset ();
for (i=0; i < ptIds->GetNumberOfIds(); i++)
{
newPtIds->InsertId(i,ptIds->GetId(i)+ptOffset);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment