Salome HOME
Merge from V6_4_BR 05/12/2011
[modules/smesh.git] / src / OBJECT / SMESH_ExtractGeometry.cxx
index 26c281382f1e1f033e42e5a707e6f02346045440..db42da397456e6133afc6a469a1851fb071d5ec2 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