Index: DamEngine/trunk/src/Deltares.DamEngine.Data/Geometry/GeometryPointString.cs =================================================================== diff -u -r1974 -r3079 --- DamEngine/trunk/src/Deltares.DamEngine.Data/Geometry/GeometryPointString.cs (.../GeometryPointString.cs) (revision 1974) +++ DamEngine/trunk/src/Deltares.DamEngine.Data/Geometry/GeometryPointString.cs (.../GeometryPointString.cs) (revision 3079) @@ -591,6 +591,23 @@ } /// + /// Removes the non ascending points on surface line. + /// + public void RemoveNonAscendingPointsOnSurfaceLine() + { + for (int i = points.Count - 1; i > 0; i--) + { + if (Math.Abs(points[i].X - points[i - 1].X) < GeometryConstants.Accuracy) + { + if (Math.Abs(points[i].Z - points[i - 1].Z) > GeometryConstants.Accuracy) + { + points.Remove(points[i]); + } + } + } + } + + /// /// Gets a part of the geometry point string defined by a begin and end point /// ///