Commit f2fd417a authored by Andrew Bauer's avatar Andrew Bauer Committed by Kitware Robot

Merge topic 'VTK-Fix_XMLWriter_polyhedron_appended_mode'

61d9f7ae Removed a spurious white line
e665230b Reverted vtkXMLPolyDataWriter.cxx to use the 'old' WriteCellsAppended method
7a99bbb1 Merge branch 'VTK-Fix_XMLWriter_polyhedron_appended_mode' of https://gitlab.kitware.com/mennodeij1/vtk into HEAD
d6a3449a VTK: Fixed XML problem when writing grids with VTK_POLYHEDRON cell types
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Reviewed-by: Andrew Bauer's avatarAndrew Bauer <andy.bauer@kitware.com>
Merge-request: !501
parents 9656347a 61d9f7ae
......@@ -685,6 +685,18 @@ void vtkXMLUnstructuredDataWriter::WriteCellsAppended(const char* name,
vtkIndent indent,
OffsetsManagerGroup *cellsManager)
{
this->WriteCellsAppended(name, types, 0, 0, indent, cellsManager);
}
//----------------------------------------------------------------------------
void vtkXMLUnstructuredDataWriter::WriteCellsAppended(const char* name,
vtkDataArray* types,
vtkIdTypeArray* faces,
vtkIdTypeArray* faceOffsets,
vtkIndent indent,
OffsetsManagerGroup *cellsManager)
{
this->ConvertFaces(faces,faceOffsets);
ostream& os = *(this->Stream);
os << indent << "<" << name << ">\n";
......@@ -735,7 +747,7 @@ void vtkXMLUnstructuredDataWriter::WriteCellsAppended(
types->InsertNextValue(static_cast<unsigned char>(cellIter->GetCellType()));
}
this->WriteCellsAppended(name, types.GetPointer(), indent, cellsManager);
this->WriteCellsAppended(name, types.GetPointer(), 0, 0, indent, cellsManager);
}
//----------------------------------------------------------------------------
......
......@@ -100,6 +100,10 @@ protected:
void WriteCellsAppended(const char* name, vtkDataArray* types,
vtkIndent indent, OffsetsManagerGroup *cellsManager);
void WriteCellsAppended(const char* name, vtkDataArray* types,
vtkIdTypeArray* faces, vtkIdTypeArray* faceOffsets,
vtkIndent indent, OffsetsManagerGroup *cellsManager);
void WriteCellsAppended(const char* name, vtkCellIterator *cellIter,
vtkIdType numCells, vtkIndent indent,
OffsetsManagerGroup *cellsManager);
......
......@@ -166,6 +166,8 @@ void vtkXMLUnstructuredGridWriter::WriteAppendedPiece(int index,
if (vtkUnstructuredGrid *grid = vtkUnstructuredGrid::SafeDownCast(input))
{
this->WriteCellsAppended("Cells", grid->GetCellTypesArray(),
grid->GetFaces(),
grid->GetFaceLocations(),
indent, &this->CellsOM->GetPiece(index));
}
else
......
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