Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityCommon/PlLinesToWaternetConverter.cs =================================================================== diff -u -r5391 -r5393 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityCommon/PlLinesToWaternetConverter.cs (.../PlLinesToWaternetConverter.cs) (revision 5391) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityCommon/PlLinesToWaternetConverter.cs (.../PlLinesToWaternetConverter.cs) (revision 5393) @@ -616,17 +616,14 @@ { if (Math.Abs(points[i].X - points[i + 1].X) < toleranceAlmostEqual && points[i].Z < points[i + 1].Z) { - if (i < points.Count) + if (points[i + 1].X + 0.01 < points[i + 2].X) { - if (points[i + 1].X + 0.01 < points[i + 2].X) - { - points[i + 1].X += 0.01; - } - else - { - points[i + 1].X = points[i + 2].X - (points[i + 2].X - points[i + 1].X) / 2; - } + points[i + 1].X += 0.01; } + else + { + points[i + 1].X = points[i + 2].X - (points[i + 2].X - points[i + 1].X) / 2; + } } } }