]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourModel.cpp
#2989 creaMaracasVisu Bug New Normal - ManualContourModel duplicate last point...
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / manualContour / manualContourModel.cpp
index 947e614bd77f90dfe4d3c581249f885ee699b8c5..7e3e8b83387a4e228c2ecf9e601482633c0a7941 100644 (file)
@@ -337,7 +337,8 @@ void manualContourModel::UpdateSpline() // virtual
                _delta_JSTG = (double) (np) / double (_sizePointsContour - 1);  //Without the -1 the curve is not close
        } else {
 //             _delta_JSTG = (double) (np-1) / double (_sizePointsContour );  //Without the -1 the curve is not close
-               _delta_JSTG = (double) (np) / double (_sizePointsContour-1 );  //Without the -1 the curve is not close
+//EED 9/7/2016                 _delta_JSTG = (double) (np) / double (_sizePointsContour-1 );  //Without the -1 the curve is not close
+               _delta_JSTG = (double) (np-1) / double (_sizePointsContour-1 );  //Without the -1 the curve is not close
        }
 //-----------------------------------------------------------------------------------------------------------
 }
@@ -357,14 +358,14 @@ void manualContourModel::UpdateSpline() // virtual
 void manualContourModel::GetSpline_i_Point(int i, double *x, double *y, double *z) // virtal
 {
        GetSpline_t_Point(i*_delta_JSTG,x,y,z);
-}
+
 
 // ----------------------------------------------------------------------------
 
 //JSTG 25-02-08 ---------------------------------------------------------------
 void manualContourModel::GetSpline_t_Point(double t, double *x, double *y, double *z)
 {
-               if (_lstPoints.size()==0)
+       if (_lstPoints.size()==0)
        {
                *x      = 0;
                *y      = 0;