Salome HOME
Join modifications from branch BR_DEBUG_3_2_0b1
[modules/smesh.git] / src / SMDS / SMDS_MeshElement.cxx
index 83f073fdbcc1c2c529c43fe5f0c469dc18ec722f..e6f84076bf2f71cf7f24deac1b7a53649e589d57 100644 (file)
@@ -17,7 +17,7 @@
 //  License along with this library; if not, write to the Free Software 
 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
 // 
-//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 
 #ifdef _MSC_VER
 #pragma warning(disable:4786)
@@ -218,3 +218,20 @@ bool SMDS_MeshElement::IsMediumNode(const SMDS_MeshNode* node) const
 {
   return false;
 }
+
+//================================================================================
+  /*!
+   * \brief Check if a node belongs to the element
+    * \param node - the node to check
+    * \retval int - node index within the element, -1 if not found
+   */
+//================================================================================
+
+int SMDS_MeshElement::GetNodeIndex( const SMDS_MeshNode* node ) const
+{
+  SMDS_ElemIteratorPtr nIt = nodesIterator();
+  for ( int i = 0; nIt->more(); ++i )
+    if ( nIt->next() == node )
+      return i;
+  return -1;
+}