Index: DamEngine/trunk/src/Deltares.DamEngine.Data/Geometry/GeometryPointString.cs =================================================================== diff -u -r4897 -r4904 --- DamEngine/trunk/src/Deltares.DamEngine.Data/Geometry/GeometryPointString.cs (.../GeometryPointString.cs) (revision 4897) +++ DamEngine/trunk/src/Deltares.DamEngine.Data/Geometry/GeometryPointString.cs (.../GeometryPointString.cs) (revision 4904) @@ -695,7 +695,7 @@ CondensePoints(); - for (int i = calcPoints.Count - 2; i > 1; i--) + for (int i = calcPoints.Count - 2; i > 0; i--) { // if the slope of the line before the point is equal to the slope after the point, the point can be removed double slopeBefore = (calcPoints[i].Z - calcPoints[i - 1].Z) / (calcPoints[i].X - calcPoints[i - 1].X);