]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Fix SIGSEGV in the SMESH_ExtractGeometry filter.
authorrnv <rnv@opencascade.com>
Tue, 8 Nov 2011 06:44:15 +0000 (06:44 +0000)
committerrnv <rnv@opencascade.com>
Tue, 8 Nov 2011 06:44:15 +0000 (06:44 +0000)
src/OBJECT/SMESH_ExtractGeometry.cxx

index 26c281382f1e1f033e42e5a707e6f02346045440..63023dd84cb5756ba0aa59506c5a0522d1eb9553 100644 (file)
@@ -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