Salome HOME
Fix for the bug IPAL22828 TC6.4.0: Displayed entities are wrong
[modules/smesh.git] / src / OBJECT / SMESH_ActorUtils.cxx
index ee0a31efddfba1066958a292e2c63f91e5214bc3..3e2225b07c62511967f386e1e14c7d6ed1323f7c 100644 (file)
 #include "utilities.h"
 
 #include <vtkUnstructuredGrid.h>
+#include <vtkCellType.h>
 #include <vtkXMLUnstructuredGridWriter.h>
 #include <vtkUnstructuredGridWriter.h>
+#include <vtkUnsignedCharArray.h>
 
 //#ifdef _DEBUG_
 //static int MYDEBUG = 1;
@@ -155,6 +157,20 @@ namespace SMESH
     }
   }
 
+  std::map<SMDSAbs_ElementType,int> GetEntitiesFromObject(SMESH_VisualObj *theObject) {
+    std::map<SMDSAbs_ElementType,int> entities;
+       entities.insert(std::pair<SMDSAbs_ElementType,int>(SMDSAbs_0DElement,
+               theObject ? theObject->GetNbEntities(SMDSAbs_0DElement) : 0));
+    entities.insert(std::pair<SMDSAbs_ElementType,int>(SMDSAbs_Edge,
+               theObject ? theObject->GetNbEntities(SMDSAbs_Edge) : 0));
+    entities.insert(std::pair<SMDSAbs_ElementType,int>(SMDSAbs_Face,
+               theObject ? theObject->GetNbEntities(SMDSAbs_Face) : 0));
+    entities.insert(std::pair<SMDSAbs_ElementType,int>(SMDSAbs_Volume,
+               theObject ? theObject->GetNbEntities(SMDSAbs_Volume) : 0));
+    return entities;
+  }
+  
+
 
 #ifndef DISABLE_PLOT2DVIEWER
   //=======================================================================