Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityCommon/PlLinesToWaternetConverter.cs =================================================================== diff -u -r5252 -r5268 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityCommon/PlLinesToWaternetConverter.cs (.../PlLinesToWaternetConverter.cs) (revision 5252) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityCommon/PlLinesToWaternetConverter.cs (.../PlLinesToWaternetConverter.cs) (revision 5268) @@ -61,21 +61,22 @@ /// /// The pl lines. /// The 1D soil profile. - /// The points of the surface line. + /// The surface line. /// Length of the penetration. - /// Left side of the 2D profile. - /// Right side of the 2D profile. /// The type of distribution of the vertical water pressures. /// A . /// Thrown when , or /// is null. - public static Waternet CreateWaternetBasedOnPlLines(PlLines plLines, SoilProfile1D soilProfile1D, GeometryPointString surfaceLine, - double penetrationLength, double xLeft, double xRight, IntrusionVerticalWaterPressureType? pressureType) + public static Waternet CreateWaternetBasedOnPlLines(PlLines plLines, SoilProfile1D soilProfile1D, SurfaceLine2 surfaceLine, + double penetrationLength, IntrusionVerticalWaterPressureType? pressureType) { ThrowWhenPlLinesIsNull(plLines); ThrowWhenSoilProfileIsNull(soilProfile1D); ThrowWhenSurfaceLineIsNull(surfaceLine); + double xLeft = surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.SurfaceLevelOutside).X; + double xRight = surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.SurfaceLevelInside).X; + if (soilProfile1D.BottomAquiferLayer == null) { throw new NoNullAllowedException(string.Format(Resources.NoBottomAquiferLayer, soilProfile1D.Name)); @@ -88,7 +89,7 @@ if (plLine != null && !IsBelowSoilProfile(soilProfile1D, plLine)) { waternet.PhreaticLine = CreateLine(plLine, headLine1Name); - WaternetLine waternetLine = CreateWaternetLineForPhreaticLine(soilProfile1D, surfaceLine, headLine, xLeft, xRight, pressureType); + WaternetLine waternetLine = CreateWaternetLineForPhreaticLine(soilProfile1D, surfaceLine.Geometry, headLine, xLeft, xRight, pressureType); waternetLine.Name = waternetLine1Name; waternetLine.HeadLine = headLine; waternetLine.HeadLine.SyncCalcPoints(); @@ -693,7 +694,7 @@ /// /// The surface line. /// - private static void ThrowWhenSurfaceLineIsNull(GeometryPointString surfaceLine) + private static void ThrowWhenSurfaceLineIsNull(SurfaceLine2 surfaceLine) { if (surfaceLine == null) {