Salome HOME
Update copyright information
[modules/smesh.git] / src / OBJECT / SMESH_ExtractGeometry.cxx
index 26c281382f1e1f033e42e5a707e6f02346045440..aad9a64474a7110208f147593c3105f36eea43ae 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -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