Index: DamEngine/branches/DamEngine 18.1/src/Deltares.DamEngine.Data/Geotechnics/SurfaceLine2Extensions.cs
===================================================================
diff -u -r1748 -r1750
--- DamEngine/branches/DamEngine 18.1/src/Deltares.DamEngine.Data/Geotechnics/SurfaceLine2Extensions.cs (.../DamEngine 18.1 Obsolete/src/Deltares.DamEngine.Data/Geotechnics/SurfaceLine2Extensions.cs) (revision 1748)
+++ DamEngine/branches/DamEngine 18.1/src/Deltares.DamEngine.Data/Geotechnics/SurfaceLine2Extensions.cs (.../DamEngine 18.1/src/Deltares.DamEngine.Data/Geotechnics/SurfaceLine2Extensions.cs) (revision 1750)
@@ -476,6 +476,35 @@
}
///
+ /// Determines the intersection of a horizontal line with the surfaceline, starting
+ /// from to .
+ ///
+ /// The surfaceline being evaluated.
+ /// The height of the horizontal line.
+ /// The GeometryPoint at the intersection, or null if no intersection can
+ /// be found.
+ ///
+ /// Requires that the following characteristic points are defined:
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// This method draws the horizontal line starting from the X coordinate of
+ /// to .
+ ///
+ /// When greater than
+ /// the height of the characteristic point .
+ ///
+ public static GeometryPoint DetermineIntersectionBetweenTaludRiverSideAndWaterLevel(this SurfaceLine2 line, double level)
+ {
+ double startXCoordinate = line.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.SurfaceLevelOutside).X;
+ var waterlevelLine = GetWaterlevelLineStartingFrom(line, level, startXCoordinate);
+
+ return DetermineIntersectionWithHorizontalLevel(line, waterlevelLine);
+ }
+
+ ///
/// Determines the shoulder length for given shoulder top inside.
///
/// The line.
@@ -613,14 +642,14 @@
/// Throw an in case the given height level is
/// higher than the characteristic point .
///
- private static void ThrowWhenLevelAboveDike(SurfaceLine2 line, double Level)
+ private static void ThrowWhenLevelAboveDike(SurfaceLine2 line, double level)
{
var dikeTopAtRiver = line.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeTopAtRiver);
- if (Level > dikeTopAtRiver.Z)
+ if (level > dikeTopAtRiver.Z)
{
throw new SurfaceLineException(String.Format(
"Level ({0:F2} m) should NOT be higher than surface line ({1:F2}))",
- Level, dikeTopAtRiver.Z));
+ level, dikeTopAtRiver.Z));
}
}
#endregion Private methods