From: rnv Date: Tue, 8 Nov 2011 06:44:15 +0000 (+0000) Subject: Fix SIGSEGV in the SMESH_ExtractGeometry filter. X-Git-Tag: RELIQUAT_6x_15112011~13 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1dc8a6cb2cfeff7157974296cf2e124a33d33d19;p=modules%2Fsmesh.git Fix SIGSEGV in the SMESH_ExtractGeometry filter. --- 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