From 1dc8a6cb2cfeff7157974296cf2e124a33d33d19 Mon Sep 17 00:00:00 2001 From: rnv Date: Tue, 8 Nov 2011 06:44:15 +0000 Subject: [PATCH] Fix SIGSEGV in the SMESH_ExtractGeometry filter. --- src/OBJECT/SMESH_ExtractGeometry.cxx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/OBJECT/SMESH_ExtractGeometry.cxx b/src/OBJECT/SMESH_ExtractGeometry.cxx index 26c281382..63023dd84 100644 --- a/src/OBJECT/SMESH_ExtractGeometry.cxx +++ b/src/OBJECT/SMESH_ExtractGeometry.cxx @@ -239,9 +239,14 @@ int SMESH_ExtractGeometry::RequestData( if ( npts >= numCellPts || (this->ExtractBoundaryCells && npts > 0) ) { - newCellId = output->InsertNextCell(cell->GetCellType(),newCellPts); - myElemVTK2ObjIds.push_back(cellId); - outputCD->CopyData(cd,cellId,newCellId); + if(cell->GetCellType() == VTK_POLYHEDRON) { + newCellPts->Reset(); + vtkUnstructuredGrid::SafeDownCast(input)->GetFaceStream( cellId ,newCellPts ); + vtkUnstructuredGrid::ConvertFaceStreamPointIds(newCellPts, pointMap); + } + newCellId = output->InsertNextCell(cell->GetCellType(),newCellPts); + myElemVTK2ObjIds.push_back(cellId); + outputCD->CopyData(cd,cellId,newCellId); } }//for all cells -- 2.39.2