Salome HOME
Warn about direct SMESH idl usage: smesh python package have to be used where it...
[modules/smesh.git] / src / SMDS / SMDS_MeshEdge.cxx
index 484207ba08c6b7a3b1e4c50657c9c6d0c8a35143..ee79fcd2c46636a2ec3b596c984c5b38e7db2b99 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
 //
 //
 //
 //  Author : Jean-Michel BOULCOURT
 //  Module : SMESH
 
+#ifdef _MSC_VER
+#pragma warning(disable:4786)
+#endif
 
 #include "SMDS_MeshEdge.hxx"
 #include "SMDS_IteratorOfElements.hxx"
 #include "SMDS_MeshNode.hxx"
-#include <iostream>
+
+using namespace std;
 
 //=======================================================================
 //function : SMDS_MeshEdge
@@ -130,3 +134,29 @@ bool operator<(const SMDS_MeshEdge & e1, const SMDS_MeshEdge & e2)
        else if(id11==id21) return (id21<id22);
        else return false;
 }
+
+/*!
+ * \brief Return node by its index
+ * \param ind - node index
+ * \retval const SMDS_MeshNode* - the node
+ * 
+ * Index is wrapped if it is out of a valid range
+ */
+const SMDS_MeshNode* SMDS_MeshEdge::GetNode(const int ind) const
+{
+  return myNodes[ WrappedIndex( ind )];
+}
+
+//=======================================================================
+//function : ChangeNodes
+//purpose  : 
+//=======================================================================
+
+bool SMDS_MeshEdge::ChangeNodes(const SMDS_MeshNode * node1,
+                                const SMDS_MeshNode * node2)
+{
+  myNodes[0]=node1;
+  myNodes[1]=node2;
+  return true;
+}
+