]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
split polylines, missing points
authorPaul RASCLE <paul.rascle@edf.fr>
Sun, 19 Jun 2016 15:42:25 +0000 (17:42 +0200)
committerPaul RASCLE <paul.rascle@edf.fr>
Sun, 19 Jun 2016 15:42:25 +0000 (17:42 +0200)
src/HYDROData/HYDROData_PolylineXY.cxx

index 5eb6ed56ed7476884dce507ca81195afed1748a9..69d291d9cd8579b65ad4ce352dcfdff5be9957aa 100644 (file)
@@ -554,7 +554,7 @@ bool convertEdgesToSections( const TopoDS_Edge&
                   HYDROData_PolylineXY::PointsList aSectPoints = theOldPolyline->GetPoints(isec, false);
                   int nbPoints = aSectPoints.Length();
                   if (forward)
-                    for (int i=1; i<nbPoints; i++)
+                    for (int i=1; i<=nbPoints; i++)
                       {
                         HYDROData_PolylineXY::Point aPoint = aSectPoints.Value(i);
                         gp_XYZ p(aPoint.X(), aPoint.Y(), 0);
@@ -567,7 +567,7 @@ bool convertEdgesToSections( const TopoDS_Edge&
                           }
                       }
                   else
-                    for (int i=nbPoints -1; i>0; i--)
+                    for (int i=nbPoints; i>0; i--)
                       {
                         HYDROData_PolylineXY::Point aPoint = aSectPoints.Value(i);
                         gp_XYZ p(aPoint.X(), aPoint.Y(), 0);