Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Primitives/RingtoetsMacroStabilityInwardsSurfaceLine.cs =================================================================== diff -u -rec27d9f02dc27c2829ed45788fae7d5923d63d3d -rdf853f988ad99b935860c361bc000f6aba9876a7 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Primitives/RingtoetsMacroStabilityInwardsSurfaceLine.cs (.../RingtoetsMacroStabilityInwardsSurfaceLine.cs) (revision ec27d9f02dc27c2829ed45788fae7d5923d63d3d) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Primitives/RingtoetsMacroStabilityInwardsSurfaceLine.cs (.../RingtoetsMacroStabilityInwardsSurfaceLine.cs) (revision df853f988ad99b935860c361bc000f6aba9876a7) @@ -35,7 +35,7 @@ namespace Ringtoets.MacroStabilityInwards.Primitives { /// - /// Definition of a surfaceline for macro stability inwards. + /// Definition of a surface line for macro stability inwards. /// public class RingtoetsMacroStabilityInwardsSurfaceLine : Observable, IMechanismSurfaceLine { @@ -53,22 +53,22 @@ } /// - /// Gets or sets the name of the surfaceline. + /// Gets or sets the name of the surface line. /// public string Name { get; set; } /// - /// Gets the 3D points describing its geometry. + /// Gets the 3D points describing the geometry of the surface line. /// public Point3D[] Points { get; private set; } /// - /// Gets the first 3D geometry point defining the surfaceline in world coordinates. + /// Gets the first 3D geometry point defining the surface line in world coordinates. /// public Point3D StartingWorldPoint { get; private set; } /// - /// Gets the last 3D geometry point defining the surfaceline in world coordinates. + /// Gets the last 3D geometry point defining the surface line in world coordinates. /// public Point3D EndingWorldPoint { get; private set; } @@ -168,9 +168,9 @@ } /// - /// Sets the geometry of the surfaceline. + /// Sets the geometry of the surface line. /// - /// The collection of points defining the surfaceline geometry. + /// The collection of points defining the surface line geometry. /// Thrown when is null. /// Thrown when any element of is null. public void SetGeometry(IEnumerable points) @@ -200,7 +200,7 @@ /// The location as a which to set as the . /// Thrown when doesn't contain a at /// . - /// is null. + /// Thrown when is null. public void SetDitchPolderSideAt(Point3D point) { Point3D geometryPoint = GetPointFromGeometry(point); @@ -217,7 +217,7 @@ /// The location as a which to set as the . /// Thrown when doesn't contain a at /// . - /// is null. + /// Thrown when is null. public void SetBottomDitchPolderSideAt(Point3D point) { Point3D geometryPoint = GetPointFromGeometry(point); @@ -234,7 +234,7 @@ /// The location as a which to set as the . /// Thrown when doesn't contain a at /// . - /// is null. + /// Thrown when is null. public void SetBottomDitchDikeSideAt(Point3D point) { Point3D geometryPoint = GetPointFromGeometry(point); @@ -251,7 +251,7 @@ /// The location as a which to set as the . /// Thrown when doesn't contain a at /// . - /// is null. + /// Thrown when is null. public void SetDitchDikeSideAt(Point3D point) { Point3D geometryPoint = GetPointFromGeometry(point); @@ -268,7 +268,7 @@ /// The location as a which to set as the . /// Thrown when doesn't contain a at /// . - /// is null. + /// Thrown when is null. public void SetDikeTopAtPolderAt(Point3D point) { Point3D geometryPoint = GetPointFromGeometry(point); @@ -285,7 +285,7 @@ /// The location as a which to set as the . /// Thrown when doesn't contain a at /// . - /// is null. + /// Thrown when is null. public void SetShoulderBaseInsideAt(Point3D point) { Point3D geometryPoint = GetPointFromGeometry(point); @@ -302,7 +302,7 @@ /// The location as a which to set as the . /// Thrown when doesn't contain a at /// . - /// is null. + /// Thrown when is null. public void SetShoulderTopInsideAt(Point3D point) { Point3D geometryPoint = GetPointFromGeometry(point); @@ -319,7 +319,7 @@ /// The location as a which to set as the . /// Thrown when doesn't contain a at /// . - /// is null. + /// Thrown when is null. public void SetTrafficLoadInsideAt(Point3D point) { Point3D geometryPoint = GetPointFromGeometry(point); @@ -336,7 +336,7 @@ /// The location as a which to set as the . /// Thrown when doesn't contain a at /// . - /// is null. + /// Thrown when is null. public void SetTrafficLoadOutsideAt(Point3D point) { Point3D geometryPoint = GetPointFromGeometry(point); @@ -353,7 +353,7 @@ /// The location as a which to set as the . /// Thrown when doesn't contain a at /// . - /// is null. + /// Thrown when is null. public void SetDikeToeAtRiverAt(Point3D point) { Point3D geometryPoint = GetPointFromGeometry(point); @@ -370,7 +370,7 @@ /// The location as a which to set as the . /// Thrown when doesn't contain a at /// . - /// is null. + /// Thrown when is null. public void SetDikeToeAtPolderAt(Point3D point) { Point3D geometryPoint = GetPointFromGeometry(point); @@ -387,7 +387,7 @@ /// The location as a which to set as the . /// Thrown when doesn't contain a at /// . - /// is null. + /// Thrown when is null. public void SetSurfaceLevelInsideAt(Point3D point) { Point3D geometryPoint = GetPointFromGeometry(point); @@ -404,7 +404,7 @@ /// The location as a which to set as the . /// Thrown when doesn't contain a at /// . - /// is null. + /// Thrown when is null. public void SetSurfaceLevelOutsideAt(Point3D point) { Point3D geometryPoint = GetPointFromGeometry(point); @@ -422,8 +422,8 @@ /// The height of the at L=. /// Thrown when the /// intersection point at have a significant difference in their y coordinate. - /// is not in range of the LZ-projected . - /// is empty. + /// Thrown when is not in range of the LZ-projected . + /// Thrown when is empty. public double GetZAtL(RoundedDouble l) { ValidateHasPoints(); @@ -545,28 +545,6 @@ SetCharacteristicPoints(fromSurfaceLine); } - private void SetCharacteristicPoints(RingtoetsMacroStabilityInwardsSurfaceLine fromSurfaceLine) - { - SurfaceLevelOutside = PointFromGeometryOrNull(fromSurfaceLine.SurfaceLevelOutside); - TrafficLoadOutside = PointFromGeometryOrNull(fromSurfaceLine.TrafficLoadOutside); - TrafficLoadInside = PointFromGeometryOrNull(fromSurfaceLine.TrafficLoadInside); - DikeToeAtPolder = PointFromGeometryOrNull(fromSurfaceLine.DikeToeAtPolder); - ShoulderBaseInside = PointFromGeometryOrNull(fromSurfaceLine.ShoulderBaseInside); - ShoulderTopInside = PointFromGeometryOrNull(fromSurfaceLine.ShoulderTopInside); - BottomDitchDikeSide = PointFromGeometryOrNull(fromSurfaceLine.BottomDitchDikeSide); - BottomDitchPolderSide = PointFromGeometryOrNull(fromSurfaceLine.BottomDitchPolderSide); - DikeToeAtPolder = PointFromGeometryOrNull(fromSurfaceLine.DikeToeAtPolder); - DikeToeAtRiver = PointFromGeometryOrNull(fromSurfaceLine.DikeToeAtRiver); - DitchDikeSide = PointFromGeometryOrNull(fromSurfaceLine.DitchDikeSide); - DitchPolderSide = PointFromGeometryOrNull(fromSurfaceLine.DitchPolderSide); - SurfaceLevelInside = PointFromGeometryOrNull(fromSurfaceLine.SurfaceLevelInside); - } - - private Point3D PointFromGeometryOrNull(Point3D point3D) - { - return point3D != null ? GetPointFromGeometry(point3D) : null; - } - public override bool Equals(object obj) { if (ReferenceEquals(null, obj)) @@ -614,12 +592,34 @@ return Name; } + private void SetCharacteristicPoints(RingtoetsMacroStabilityInwardsSurfaceLine fromSurfaceLine) + { + SurfaceLevelOutside = PointFromGeometryOrNull(fromSurfaceLine.SurfaceLevelOutside); + TrafficLoadOutside = PointFromGeometryOrNull(fromSurfaceLine.TrafficLoadOutside); + TrafficLoadInside = PointFromGeometryOrNull(fromSurfaceLine.TrafficLoadInside); + DikeToeAtPolder = PointFromGeometryOrNull(fromSurfaceLine.DikeToeAtPolder); + ShoulderBaseInside = PointFromGeometryOrNull(fromSurfaceLine.ShoulderBaseInside); + ShoulderTopInside = PointFromGeometryOrNull(fromSurfaceLine.ShoulderTopInside); + BottomDitchDikeSide = PointFromGeometryOrNull(fromSurfaceLine.BottomDitchDikeSide); + BottomDitchPolderSide = PointFromGeometryOrNull(fromSurfaceLine.BottomDitchPolderSide); + DikeToeAtPolder = PointFromGeometryOrNull(fromSurfaceLine.DikeToeAtPolder); + DikeToeAtRiver = PointFromGeometryOrNull(fromSurfaceLine.DikeToeAtRiver); + DitchDikeSide = PointFromGeometryOrNull(fromSurfaceLine.DitchDikeSide); + DitchPolderSide = PointFromGeometryOrNull(fromSurfaceLine.DitchPolderSide); + SurfaceLevelInside = PointFromGeometryOrNull(fromSurfaceLine.SurfaceLevelInside); + } + + private Point3D PointFromGeometryOrNull(Point3D point3D) + { + return point3D != null ? GetPointFromGeometry(point3D) : null; + } + /// /// Finds a point from which is at the same position as . /// /// The location of a point from . /// The from at the same location as . - /// is null. + /// Thrown when is null. private Point3D GetPointFromGeometry(Point3D point) { if (point == null) @@ -683,7 +683,7 @@ /// /// Checks whether the current collection is not empty. /// - /// is empty. + /// Thrown when is empty. private void ValidateHasPoints() { if (!Points.Any())