Index: DamEngine/trunk/src/Deltares.DamEngine.Data/Geometry/GeometryHelper.cs =================================================================== diff -u -r5034 -r5046 --- DamEngine/trunk/src/Deltares.DamEngine.Data/Geometry/GeometryHelper.cs (.../GeometryHelper.cs) (revision 5034) +++ DamEngine/trunk/src/Deltares.DamEngine.Data/Geometry/GeometryHelper.cs (.../GeometryHelper.cs) (revision 5046) @@ -131,8 +131,7 @@ if (res == LineIntersection.Intersects) { var splitPoint = new Point2D(resPoint.X, resPoint.Z); - // Split the curve at the split point - SplitCurveAtPoint(geometry, geometryCurve, splitPoint); + // Add SplitPoint to the local list splitPoints.Add(splitPoint); } } @@ -160,7 +159,6 @@ } } geometry.Rebox(); - geometry.Left = atX; } /// @@ -305,34 +303,8 @@ return new GeometryCurve(headPoint, endPoint); } - /// - /// Splits the (existing) curve at this point and adds the splitPoint when needed. - /// - /// The geometry. - /// The geometry curve. - /// The split point. - private static void SplitCurveAtPoint(GeometryData geometry, GeometryCurve geometryCurve, Point2D splitPoint) + private static GeometryCurve GetCurvesWithPoints(Point2D headPoint, Point2D endPoint, List curves) { - Point2D existingPoint = geometry.GetPointAtLocation(new Point2D(splitPoint.X, splitPoint.Z), GeometryConstants.TestAccuracy); - // If point already exists do not add but use it - if (existingPoint == null) - { - geometry.Points.Add(splitPoint); - } - else - { - splitPoint = existingPoint; - } - - GeometryCurve oldCurve = geometryCurve; - Point2D oldEnd = oldCurve.EndPoint; - oldCurve.EndPoint = splitPoint; - var newCurve = new GeometryCurve(splitPoint, oldEnd); - geometry.Curves.Add(newCurve); - } - - public static GeometryCurve GetCurvesWithPoints(Point2D headPoint, Point2D endPoint, List curves) - { int curveCount = curves.Count;