Salome HOME
PLEIADES. fix WrapperIndex(index) for negative index
[modules/smesh.git] / src / SMDS / SMDS_MeshElement.hxx
index 794c352f508d1fb5b94ce6414fd87401147909e8..54f5067726fdcbe0629e1f374b25643ffcf9847f 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
 //
 //
 //
@@ -103,7 +103,7 @@ public:
     * \retval int - valid node index
    */
   int WrappedIndex(const int ind) const {
-    if ( ind < 0 ) return -( ind % NbNodes());
+    if ( ind < 0 ) return NbNodes() + ind % NbNodes();
     if ( ind >= NbNodes() ) return ind % NbNodes();
     return ind;
   }