[vtkusers] vtkGeometryFilter::UnstructuredGridExecute() : BUG ?
Philippe Guerville
philippe.guerville at cea.fr
Thu Aug 31 05:17:11 EDT 2000
I used vtkGeometryFilter on an unstructured grid with cell data and 1D, 2D
and 3D elements (VTK_LINE, VTK_QUAD and VTK_HEXAHEDRON).
The resulting cell data of the poly data output is wrong !
file vtkGeometryFilter.cxx Revision: 1.65
519 void vtkGeometryFilter::UnstructuredGridExecute()
{
......
635 case VTK_LINE:
case VTK_POLY_LINE:
newCellId =
Lines->InsertNextCell(npts,pts);
outputCD->CopyData(cd,cellId,newCellId);
break;
.....
641 case VTK_TRIANGLE:
case VTK_QUAD:
case VTK_POLYGON:
newCellId =
Polys->InsertNextCell(npts,pts);
outputCD->CopyData(cd,cellId,newCellId);
break;
.....
}
In the case of VTK_LINE, newCellId is from 0 to the number of lines and in
the case of VTK_QUAD newCellId is from 0 to the number of polys.
So, outputCD->CopyData(cd,cellId,newCellId) overwrite the previous value.
I suggest to use newCellId = output->InsertNextCell(type,npts,pts) as in
vtkGeometryFilter::PolyDataExecute() (line 506) which give the correct
newCellId.
Philippe Guerville
philippe.guerville at cea.fr
More information about the vtkusers
mailing list