From: adv Date: Fri, 6 Dec 2013 07:17:13 +0000 (+0000) Subject: Get distance from polyline corrected (Bug #190). X-Git-Tag: BR_hydro_v_0_4~12 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a50aea7c93b6867148d0dc43c351c071ebe8f661;p=modules%2Fhydro.git Get distance from polyline corrected (Bug #190). --- diff --git a/src/HYDROData/HYDROData_PolylineXY.cxx b/src/HYDROData/HYDROData_PolylineXY.cxx index a8cb4c0f..6c7e5910 100755 --- a/src/HYDROData/HYDROData_PolylineXY.cxx +++ b/src/HYDROData/HYDROData_PolylineXY.cxx @@ -296,6 +296,9 @@ double HYDROData_PolylineXY::GetDistance( const int theSectionIndex, const Point& aSectPoint = aSectPointsList.Value( i ); aResDistance += gp_Pnt2d( aPrevPoint ).Distance( aSectPoint ); aPrevPoint = aSectPoint; + + if ( thePointIndex == i - 1 ) + break; } } else