Commit ce953409 authored by Joachim Pouderoux's avatar Joachim Pouderoux
Browse files

Small fixes to allow empty cells.

Add a fix for vtkXMLUnstucturedDatReader to read empty cells.
Also fix vtkTriangleFilter to skip empty polygons.

Change-Id: I8f979a8369d54673ca03143f80935b29815095da
parent 84113485
......@@ -157,6 +157,10 @@ int vtkTriangleFilter::RequestData(
this->UpdateProgress ((float)cellNum / numCells);
abort = this->GetAbortExecute();
}
if ( npts == 0 )
{
continue;
}
if ( npts == 3 )
{
newPolys->InsertNextCell(3,pts);
......
......@@ -601,7 +601,7 @@ int vtkXMLUnstructuredDataReader::ReadCellArray(vtkIdType numberOfCells,
vtkIdType i;
for(i=0; i < numberOfCells; ++i)
{
if(coffset[i] <= lastOffset)
if(coffset[i] < lastOffset)
{
vtkErrorMacro("Cannot read cell connectivity from " << eCells->GetName()
<< " in piece " << this->Piece
......
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