Salome HOME
Issue 0020368: SMESHGUI_MeshDlg::isTabEnabled must return something
[modules/smesh.git] / src / SMESH / SMESH_MesherHelper.hxx
index f88f1fc08e0732b60c2a42140967ea005f5454e4..733cfa4a436e0ee1870b069d74246e5bcd259d05 100644 (file)
 
 #include "SMESH_SMESH.hxx"
 
-#include <SMESH_Mesh.hxx>
-#include <TopoDS_Shape.hxx>
+#include "SMESH_MeshEditor.hxx" // needed for many meshers
 #include <SMDS_MeshNode.hxx>
+#include <SMDS_QuadraticEdge.hxx>
+
 #include <TopoDS_Face.hxx>
+#include <TopoDS_Shape.hxx>
 #include <gp_Pnt2d.hxx>
-#include <SMDS_QuadraticEdge.hxx>
 
 #include <map>
 
 typedef std::pair<const SMDS_MeshNode*, const SMDS_MeshNode*> NLink;
-typedef std::map<NLink, const SMDS_MeshNode*> NLinkNodeMap;
-typedef std::map<NLink, const SMDS_MeshNode*>::iterator ItNLinkNode;
+typedef std::map<NLink, const SMDS_MeshNode*>                 NLinkNodeMap;
+typedef std::map<NLink, const SMDS_MeshNode*>::iterator       ItNLinkNode;
 
 /*!
  * \brief It helps meshers to add elements
@@ -106,6 +107,13 @@ public:
     return ind;
   }
 
+  /*!
+   * \brief Return number of unique ancestors of the shape
+   */
+  static int NbAncestors(const TopoDS_Shape& shape,
+                         const SMESH_Mesh&   mesh,
+                         TopAbs_ShapeEnum    ancestorType=TopAbs_SHAPE);
+
 public:
   // ---------- PUBLIC INSTANCE METHODS ----------