+//================================================================================
+/*!
+ * \brief Check if a node is a medium node of a quadratic cell
+ */
+//================================================================================
+
+bool SMDS_MeshElement::IsMediumNode(const SMDS_MeshNode* node) const
+{
+ return !( GetNodeIndex( node ) < NbCornerNodes() );
+}
+
+//================================================================================
+/*!
+ * \brief Return true if index of node is valid (0 <= ind < NbNodes())
+ * \param ind - node index
+ * \retval bool - index check result
+ */
+//================================================================================
+
+bool SMDS_MeshElement::IsValidIndex(const int ind) const
+{
+ return ( ind>-1 && ind<NbNodes() );
+}
+
+//================================================================================
+/*!
+ * \brief Return a valid corner node index, fixing the given one if necessary
+ * \param ind - node index
+ * \retval int - valid node index
+ */
+//================================================================================
+
+int SMDS_MeshElement::WrappedIndex(const int ind) const
+{
+ if ( ind < 0 ) return NbCornerNodes() + ind % NbCornerNodes();
+ if ( ind >= NbCornerNodes() ) return ind % NbCornerNodes();
+ return ind;
+}
+
+//================================================================================
+/*!
+ * \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