Index: DamEngine/trunk/src/Deltares.DamEngine.Interface.Tests/PipingSellmeijer4ForcesTests.cs =================================================================== diff -u -r1362 -r1363 --- DamEngine/trunk/src/Deltares.DamEngine.Interface.Tests/PipingSellmeijer4ForcesTests.cs (.../PipingSellmeijer4ForcesTests.cs) (revision 1362) +++ DamEngine/trunk/src/Deltares.DamEngine.Interface.Tests/PipingSellmeijer4ForcesTests.cs (.../PipingSellmeijer4ForcesTests.cs) (revision 1363) @@ -98,9 +98,9 @@ // dike length = 66.986 Assert.AreEqual(66.986, redesignedSurfaceLine.GetDikeLength(), tolerance); - // ShoulderWidth = X_Kruin binnenberm - X_Insteek binnenberm = 65.01 - 29.01 = 36.0 + // ShoulderLength = X_Kruin binnenberm - X_Insteek binnenberm = 65.01 - 29.01 = 36.0 // Read from PipingSellmeijer4Forces_Piping_CharacteristicPoints.csv by export surfacelines in Release - Assert.AreEqual(36.0, redesignedSurfaceLine.DetermineShoulderWidth(), tolerance); + Assert.AreEqual(36.0, redesignedSurfaceLine.DetermineShoulderLength(), tolerance); Assert.AreEqual(0.0, output.Results.CalculationResults.DesignResults[0].PipingDesignResults.UpliftSituation.Pl3MinUplift, tolerance); Assert.AreEqual(0.0, output.Results.CalculationResults.DesignResults[0].PipingDesignResults.UpliftSituation.Pl3HeadAdjusted, tolerance); Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculatorFirstSlopeAdaptionThenShoulderAdaption.cs =================================================================== diff -u -r1289 -r1363 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculatorFirstSlopeAdaptionThenShoulderAdaption.cs (.../DesignCalculatorFirstSlopeAdaptionThenShoulderAdaption.cs) (revision 1289) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculatorFirstSlopeAdaptionThenShoulderAdaption.cs (.../DesignCalculatorFirstSlopeAdaptionThenShoulderAdaption.cs) (revision 1363) @@ -132,17 +132,17 @@ // Determine new width and height for shoulder double shoulderHeight; - double shoulderWidth; + double shoulderLength; GeometryPoint limitPointForShoulderDesign = surfaceLine.GetLimitPointForShoulderDesign(); - DesignCalculatorUtils.DetermineNewShoulderWidthAndHeight(designScenario.Location.StabilityShoulderGrowDeltaX, + DesignCalculatorUtils.DetermineNewShoulderLengthAndHeight(designScenario.Location.StabilityShoulderGrowDeltaX, designScenario.Location.StabilityShoulderGrowSlope, surfaceLine, limitPointForShoulderDesign, - out shoulderHeight, out shoulderWidth); + out shoulderHeight, out shoulderLength); // Create new shoulder var surfaceLineShoulderAdapter = new SurfaceLineShoulderAdapter(surfaceLine, designScenario.Location); surfaceLineShoulderAdapter.MaxShoulderLevel = maxShoulderLevel; surfaceLineShoulderAdapter.SlopeOfNewShoulder = currentCoTangent; - surfaceLine = surfaceLineShoulderAdapter.ConstructNewSurfaceLine(shoulderWidth, shoulderHeight, false); + surfaceLine = surfaceLineShoulderAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); var validationError = surfaceLine.Validate().FirstOrDefault(vr => vr.MessageType == ValidationResultType.Error); if (validationError != null) Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.Designer.cs =================================================================== diff -u -r1358 -r1363 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 1358) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 1363) @@ -489,29 +489,29 @@ } /// - /// Looks up a localized string similar to The new shoulder does not intersect the surface. This can be caused by a very strange surfaceline or the new shoulderwidth is too large.. + /// Looks up a localized string similar to New shoulder length is smaller than current shoulder length.. /// - internal static string SurfaceLineShoulderAdapterNewShoulderNoIntersectionError { + internal static string SurfaceLineShoulderAdapterNewShoulderLengthError { get { - return ResourceManager.GetString("SurfaceLineShoulderAdapterNewShoulderNoIntersectionError", resourceCulture); + return ResourceManager.GetString("SurfaceLineShoulderAdapterNewShoulderLengthError", resourceCulture); } } /// - /// Looks up a localized string similar to New shoulder width is smaller than current shoulder width.. + /// Looks up a localized string similar to The new shoulder length is too large to fit in the current surface line.. /// - internal static string SurfaceLineShoulderAdapterNewShoulderWidthError { + internal static string SurfaceLineShoulderAdapterNewShoulderLengthTooLargeError { get { - return ResourceManager.GetString("SurfaceLineShoulderAdapterNewShoulderWidthError", resourceCulture); + return ResourceManager.GetString("SurfaceLineShoulderAdapterNewShoulderLengthTooLargeError", resourceCulture); } } /// - /// Looks up a localized string similar to The new shoulder width is too large to fit in the current surface line.. + /// Looks up a localized string similar to The new shoulder does not intersect the surface. This can be caused by a very strange surfaceline or the new shoulder length is too large.. /// - internal static string SurfaceLineShoulderAdapterNewShoulderWidthTooLargeError { + internal static string SurfaceLineShoulderAdapterNewShoulderNoIntersectionError { get { - return ResourceManager.GetString("SurfaceLineShoulderAdapterNewShoulderWidthTooLargeError", resourceCulture); + return ResourceManager.GetString("SurfaceLineShoulderAdapterNewShoulderNoIntersectionError", resourceCulture); } } } Index: DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/SurfaceLine2Extensions.cs =================================================================== diff -u -r1341 -r1363 --- DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/SurfaceLine2Extensions.cs (.../SurfaceLine2Extensions.cs) (revision 1341) +++ DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/SurfaceLine2Extensions.cs (.../SurfaceLine2Extensions.cs) (revision 1363) @@ -507,7 +507,7 @@ /// /// Determines the width of the shoulder for this surfaceline. /// - /// shoulder width + /// shoulder length /// Method requires the existenc of the following characteristic points when /// and /// are defined: @@ -517,7 +517,7 @@ /// /// /// - public static double DetermineShoulderWidth(this SurfaceLine2 line) + public static double DetermineShoulderLength(this SurfaceLine2 line) { var shoulderTopInside = line.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside); if (shoulderTopInside != null && HasAnnotation(line, CharacteristicPointType.ShoulderBaseInside)) Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/SurfaceLineShoulderAdapter.cs =================================================================== diff -u -r1053 -r1363 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/SurfaceLineShoulderAdapter.cs (.../SurfaceLineShoulderAdapter.cs) (revision 1053) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/SurfaceLineShoulderAdapter.cs (.../SurfaceLineShoulderAdapter.cs) (revision 1363) @@ -71,26 +71,26 @@ /// /// Raise exception if new shoulder is smaller than existing shoulder /// - /// + /// /// /// - private void ValidateNewShoulderSize(double shoulderWidth, double shoulderHeight) + private void ValidateNewShoulderSize(double shoulderLength, double shoulderHeight) { if (surfaceLine.HasShoulderInside()) { - double currentShoulderWidth = surfaceLine.DetermineShoulderLengthForGivenShoulderTopInside(surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside)); - if (currentShoulderWidth > shoulderWidth) + double currentShoulderLength = surfaceLine.DetermineShoulderLengthForGivenShoulderTopInside(surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside)); + if (currentShoulderLength > shoulderLength) { - throw new SurfaceLineAdapterException(Resources.SurfaceLineShoulderAdapterNewShoulderWidthError); + throw new SurfaceLineAdapterException(Resources.SurfaceLineShoulderAdapterNewShoulderLengthError); } double currentShoulderHeight = surfaceLine.DetermineShoulderHeight(); if (currentShoulderHeight > shoulderHeight) { throw new SurfaceLineAdapterException(Resources.SurfaceLineShoulderAdapterNewShoulderHeightError); } - if (shoulderWidth < 0) + if (shoulderLength < 0) { - throw new SurfaceLineAdapterException(Resources.SurfaceLineShoulderAdapterNewShoulderWidthError); + throw new SurfaceLineAdapterException(Resources.SurfaceLineShoulderAdapterNewShoulderLengthError); } if (shoulderHeight < 0) { @@ -121,18 +121,18 @@ surfaceLine2.RemoveSegmentBetween(dikeTopAtPolder.X, dikeToeAtPolder.X); } } - + /// - /// ShoulderWidth = horizontal distance between ShoulderTopInside and ShoulderBaseInside - /// ShoulderHeight = vertical distance between ShoulderTopInside and DikeToeAtPolder + /// shoulderLength = horizontal distance between ShoulderTopInside and ShoulderBaseInside + /// shoulderHeight = vertical distance between ShoulderTopInside and DikeToeAtPolder /// The default slope of the shoulder will be 1 : 3 /// The height has a maximum of MaxFractionOfDikeHeightForShoulderHeight (default 2/3) * dike height /// - /// + /// /// /// Ensure that shoulder complies with piping design Demands (shoulder from toe instead of intersection old dike, height gives error /// - public SurfaceLine2 ConstructNewSurfaceLine(double shoulderWidth, double shoulderHeight, bool designFromDikeToe) + public SurfaceLine2 ConstructNewSurfaceLine(double shoulderLength, double shoulderHeight, bool designFromDikeToe) { var orgMaxX = surfaceLine.Geometry.GetMaxX(); if (double.IsNaN(orgMaxX)) @@ -145,7 +145,7 @@ var ditchDefinition = GetDitchDefinition(); // Then delete it from the surfaceline RemoveExistingDitch(ditchDefinition); - ValidateNewShoulderSize(shoulderWidth, shoulderHeight); + ValidateNewShoulderSize(shoulderLength, shoulderHeight); GeometryPoint dikeTopAtPolder = surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeTopAtPolder); GeometryPoint dikeToeAtPolder = surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder); @@ -172,7 +172,7 @@ intersectionPointAtDike = LineHelper.GetIntersectionPointWithExtrapolation(dikeTopAtPolder, dikeBaseInside, new GeometryPoint(dikeToeAtPolder.X, shoulderHeight + dikeToeZ), new GeometryPoint(dikeToeAtPolder.X + 1, shoulderHeight + dikeToeZ)); - var newTopShoulder = new GeometryPoint(intersectionPointAtDike.X + shoulderWidth, shoulderHeight + dikeToeZ); + var newTopShoulder = new GeometryPoint(intersectionPointAtDike.X + shoulderLength, shoulderHeight + dikeToeZ); if (Location.UseNewShoulderTopSlope) { // if top slope is not to be horizontal then recalculate the intersection from a point at required slope width @@ -185,10 +185,10 @@ throw new SurfaceLineAdapterException(Resources.SurfaceLineShoulderAdapterNewShoulderHeightTooLargeTopSlopeError); } } - + // Find the intersection at the surface line from a line starting at the end of the new shoulder sloping down at 1 : SlopeOfNewShoulder - // to get the new point of the toe. Note that for stability the shoulderwidth is applied directly to the intersection point as for piping - // the shoulderwidth is applied from the original diketoe (so for piping the complete shoulder is longer). + // to get the new point of the toe. Note that for stability the shoulder length is applied directly to the intersection point as for piping + // the shoulder length is applied from the original diketoe (so for piping the complete shoulder is longer). var xStart = intersectionPointAtDike.X; const double offset = 100.0; if (designFromDikeToe) @@ -217,7 +217,7 @@ var line1 = new Line { BeginPoint = new Point2D(xStart + 0.001, intersectionPointAtDike.Z), - EndPoint = new Point2D(xStart + shoulderWidth, intersectionPointAtDike.Z) + EndPoint = new Point2D(xStart + shoulderLength, intersectionPointAtDike.Z) }; var intersectionpoints2 = surfaceLine.Geometry.IntersectionPointsXzWithLineXz(line1); if (intersectionpoints2.Count > 0) @@ -233,8 +233,8 @@ if (designFromDikeToe) { - // for piping design, the new toe must be placed at shoulderWidth from the original toe, not from the new intersection point. - newToeAtPolder.X = dikeToeAtPolder.X + shoulderWidth + shoulderHeight * SlopeOfNewShoulder; + // for piping design, the new toe must be placed at shoulderLength from the original toe, not from the new intersection point. + newToeAtPolder.X = dikeToeAtPolder.X + shoulderLength + shoulderHeight * SlopeOfNewShoulder; } // remove old line (point) segment starting from intersection dike inside to new intersection ground @@ -250,7 +250,7 @@ // Check whether the surface line is extended. This is not allowed! if (surfaceLine.Geometry.GetMaxX() > orgMaxX) { - throw new SurfaceLineAdapterException(Resources.SurfaceLineShoulderAdapterNewShoulderWidthTooLargeError); + throw new SurfaceLineAdapterException(Resources.SurfaceLineShoulderAdapterNewShoulderLengthTooLargeError); } // Restore Ditch (if any) Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/DikesDesign/SurfaceLineShoulderAdapterTest.cs =================================================================== diff -u -r971 -r1363 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/DikesDesign/SurfaceLineShoulderAdapterTest.cs (.../SurfaceLineShoulderAdapterTest.cs) (revision 971) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/DikesDesign/SurfaceLineShoulderAdapterTest.cs (.../SurfaceLineShoulderAdapterTest.cs) (revision 1363) @@ -103,7 +103,7 @@ Geometry = new GeometryPointString() }; var location = new Location(); - const int shoulderWidth = 1; + const int shoulderLength = 1; const int shoulderHeight = 1; var pointAtToeRiver = new GeometryPoint { X = 0, Z = 0 }; var pointAtTopRiver = new GeometryPoint { X = 2, Z = 2 }; @@ -118,7 +118,7 @@ Assert.IsNull(surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside)); Assert.IsNull(surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside)); var surfaceLineAdapter = new SurfaceLineShoulderAdapter(surfaceLine, location); - var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderWidth, shoulderHeight, false); + var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); Assert.IsNotNull(adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside)); Assert.IsNotNull(adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside)); } @@ -138,7 +138,7 @@ Geometry = new GeometryPointString() }; var location = new Location(); - const int shoulderWidth = 1; + const int shoulderLength = 1; const int shoulderHeight = 1; var pointAtToeRiver = new GeometryPoint { X = 0, Z = 0 }; var pointAtTopRiver = new GeometryPoint { X = 1, Z = 1 }; @@ -152,7 +152,7 @@ surfaceLine.EnsurePointOfType(pointAtSurfaceLevelInside.X, pointAtSurfaceLevelInside.Z, CharacteristicPointType.SurfaceLevelInside); var surfaceLineAdapter = new SurfaceLineShoulderAdapter(surfaceLine, location); surfaceLineAdapter.MaxShoulderLevel = 0.67; - var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderWidth, shoulderHeight, false); + var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); double expectedShoulderHeight = Math.Min(shoulderHeight, surfaceLineAdapter.MaxShoulderLevel - pointAtToePolder.Z); var expectedPoint = new GeometryPoint(3.33, expectedShoulderHeight); var actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside); @@ -174,7 +174,7 @@ Geometry = new GeometryPointString() }; var location = new Location(); - const int shoulderWidth = 1; + const int shoulderLength = 1; const int shoulderHeight = 1; var pointAtToeRiver = new GeometryPoint { X = 0, Z = 0 }; var pointAtTopRiver = new GeometryPoint { X = 2, Z = 2 }; @@ -187,7 +187,7 @@ surfaceLine.EnsurePointOfType(pointAtToePolder.X, pointAtToePolder.Z, CharacteristicPointType.DikeToeAtPolder); surfaceLine.EnsurePointOfType(pointAtSurfaceLevelInside.X, pointAtSurfaceLevelInside.Z, CharacteristicPointType.SurfaceLevelInside); var surfaceLineAdapter = new SurfaceLineShoulderAdapter(surfaceLine, location); - var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderWidth, shoulderHeight, false); + var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); var expectedPoint = new GeometryPoint(3.5, 1); var actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside); Assert.IsTrue(expectedPoint.LocationEquals(actualPoint)); @@ -208,7 +208,7 @@ Geometry = new GeometryPointString() }; var location = new Location(); - const int shoulderWidth = 1; + const int shoulderLength = 1; const int shoulderHeight = 1; var pointAtToeRiver = new GeometryPoint { X = 0, Z = 0 }; var pointAtTopRiver = new GeometryPoint { X = 1, Z = 1 }; @@ -221,10 +221,10 @@ surfaceLine.EnsurePointOfType(pointAtToePolder.X, pointAtToePolder.Z, CharacteristicPointType.DikeToeAtPolder); surfaceLine.EnsurePointOfType(pointAtSurfaceLevelInside.X, pointAtSurfaceLevelInside.Z, CharacteristicPointType.SurfaceLevelInside); var surfaceLineAdapter = new SurfaceLineShoulderAdapter(surfaceLine, location); - var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderWidth, shoulderHeight, false); + var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); double expectedShoulderHeight = Math.Min(shoulderHeight, (surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeTopAtPolder).Z - surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder).Z)); var expectedPoint = new GeometryPoint( - pointAtTopPolder.X + (1 - expectedShoulderHeight) + shoulderWidth + expectedShoulderHeight * surfaceLineAdapter.SlopeOfNewShoulder, 0); + pointAtTopPolder.X + (1 - expectedShoulderHeight) + shoulderLength + expectedShoulderHeight * surfaceLineAdapter.SlopeOfNewShoulder, 0); var actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder); Assert.IsTrue(expectedPoint.LocationEquals(actualPoint)); } @@ -244,7 +244,7 @@ Geometry = new GeometryPointString() }; var location = new Location(); - const int shoulderWidth = 1; + const int shoulderLength = 1; const int shoulderHeight = 3; var pointAtToeRiver = new GeometryPoint { X = 0, Z = 0 }; var pointAtTopRiver = new GeometryPoint { X = 2, Z = 2 }; @@ -257,14 +257,14 @@ surfaceLine.EnsurePointOfType(pointAtToePolder.X, pointAtToePolder.Z, CharacteristicPointType.DikeToeAtPolder); surfaceLine.EnsurePointOfType(pointAtSurfaceLevelInside.X, pointAtSurfaceLevelInside.Z, CharacteristicPointType.SurfaceLevelInside); var surfaceLineAdapter = new SurfaceLineShoulderAdapter(surfaceLine, location); - var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderWidth, shoulderHeight, false); + var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); var expectedZ = pointAtTopPolder.Z; var actualZ = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside).Z; Assert.AreEqual(expectedZ, actualZ); } [Test] - public void AdaptedSurfaceLineWithoutShoulderNewShoulderWidthShouldExpand() + public void AdaptedSurfaceLineWithoutShoulderNewShoulderLengthShouldExpand() { var surfaceLine = new SurfaceLine2 { @@ -275,7 +275,7 @@ Geometry = new GeometryPointString() }; var location = new Location(); - const int shoulderWidth = 3; + const int shoulderLength = 3; const int shoulderHeight = 3; var pointAtToeRiver = new GeometryPoint { X = 0, Z = 0 }; var pointAtTopRiver = new GeometryPoint { X = 1, Z = 1 }; @@ -288,14 +288,14 @@ surfaceLine.EnsurePointOfType(pointAtToePolder.X, pointAtToePolder.Z, CharacteristicPointType.DikeToeAtPolder); surfaceLine.EnsurePointOfType(pointAtSurfaceLevelInside.X, pointAtSurfaceLevelInside.Z, CharacteristicPointType.SurfaceLevelInside); var surfaceLineAdapter = new SurfaceLineShoulderAdapter(surfaceLine, location) { SlopeOfNewShoulder = 2 }; - var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderWidth, shoulderHeight, false); + var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); double expectedShoulderHeight = Math.Min(shoulderHeight, (surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeTopAtPolder).Z - surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder).Z)); double expectedShoulderBaseX = pointAtTopPolder.X + (1 - expectedShoulderHeight); Assert.AreEqual(expectedShoulderBaseX, adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside).X); Assert.AreEqual(expectedShoulderHeight, adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside).Z); - Assert.AreEqual(expectedShoulderBaseX + shoulderWidth, adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside).X); + Assert.AreEqual(expectedShoulderBaseX + shoulderLength, adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside).X); Assert.AreEqual(expectedShoulderHeight, adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside).Z); - Assert.AreEqual(expectedShoulderBaseX + shoulderWidth + surfaceLineAdapter.SlopeOfNewShoulder * expectedShoulderHeight, adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder).X); + Assert.AreEqual(expectedShoulderBaseX + shoulderLength + surfaceLineAdapter.SlopeOfNewShoulder * expectedShoulderHeight, adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder).X); Assert.AreEqual(0, adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder).Z); } @@ -311,7 +311,7 @@ Geometry = new GeometryPointString() }; var location = new Location(); - const int shoulderWidth = 1; + const int shoulderLength = 1; const int shoulderHeight = 1; surfaceLine.EnsurePointOfType(-100, 0, CharacteristicPointType.SurfaceLevelOutside); surfaceLine.EnsurePointOfType(0, 0, CharacteristicPointType.DikeToeAtRiver); @@ -323,7 +323,7 @@ surfaceLine.EnsurePointOfType(100, 0, CharacteristicPointType.SurfaceLevelInside); var surfaceLineAdapter = new SurfaceLineShoulderAdapter(surfaceLine, location); surfaceLineAdapter.MaxShoulderLevel = 0.67; - var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderWidth, shoulderHeight, false); + var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); var expectedPoint = new GeometryPoint(3.66, 0.67); var actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside); Assert.IsTrue(expectedPoint.LocationEquals(actualPoint)); @@ -341,7 +341,7 @@ Geometry = new GeometryPointString() }; var location = new Location(); - const int shoulderWidth = 2; + const int shoulderLength = 2; const int shoulderHeight = 1; surfaceLine.EnsurePointOfType(-100, 0, CharacteristicPointType.SurfaceLevelOutside); surfaceLine.EnsurePointOfType(0, 1, CharacteristicPointType.DikeToeAtRiver); @@ -353,7 +353,7 @@ surfaceLine.EnsurePointOfType(100, 1, CharacteristicPointType.SurfaceLevelInside); var surfaceLineAdapter = new SurfaceLineShoulderAdapter(surfaceLine, location) { SlopeOfNewShoulder = 2 }; surfaceLineAdapter.MaxShoulderLevel = 0.67 + surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder).Z; - var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderWidth, shoulderHeight, false); + var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); var expectedPoint = new GeometryPoint(6.00, 1); var actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder); Assert.AreEqual(expectedPoint.X, actualPoint.X, pointCoordinateTolerance); @@ -380,7 +380,7 @@ Geometry = new GeometryPointString() }; var location = new Location(); - const int shoulderWidth = 1; + const int shoulderLength = 1; const int shoulderHeight = 1; surfaceLine.EnsurePointOfType(-1, 0, CharacteristicPointType.SurfaceLevelOutside); surfaceLine.EnsurePointOfType(0, 0, CharacteristicPointType.DikeToeAtRiver); @@ -391,7 +391,7 @@ surfaceLine.EnsurePointOfType(5, 0, CharacteristicPointType.DikeToeAtPolder); surfaceLine.EnsurePointOfType(10, 0, CharacteristicPointType.SurfaceLevelInside); var surfaceLineAdapter = new SurfaceLineShoulderAdapter(surfaceLine, location); - var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderWidth, shoulderHeight, false); + var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); var expectedPoint = new GeometryPoint(2.857, 1.0); var actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside); Assert.AreEqual(expectedPoint.X, actualPoint.X, pointCoordinateTolerance); @@ -410,7 +410,7 @@ Geometry = new GeometryPointString() }; var location = new Location(); - const int shoulderWidth = 1; + const int shoulderLength = 1; const int shoulderHeight = 1; var pointAtToeRiver = new GeometryPoint { X = 0, Z = 0 }; var pointAtTopRiver = new GeometryPoint { X = 1, Z = 4 }; @@ -433,7 +433,7 @@ surfaceLine.EnsurePointOfType(pointAtSurfaceLevelInside.X, pointAtSurfaceLevelInside.Z, CharacteristicPointType.SurfaceLevelInside); surfaceLine.EnsurePointOfType(pointAtSurfaceLevelOutside.X, pointAtSurfaceLevelOutside.Z, CharacteristicPointType.SurfaceLevelOutside); var surfaceLineAdapter = new SurfaceLineShoulderAdapter(surfaceLine, location) { SlopeOfNewShoulder = 2 }; - var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderWidth, shoulderHeight, false); + var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); double xToePolder = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder).X; double xSurfaceLevelInside = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.SurfaceLevelInside).X; var actualExtraPoints = adaptedSurfaceLine.GetPointSegmentIncluding(xToePolder, xSurfaceLevelInside); @@ -473,7 +473,7 @@ return surfaceLine; } - private void EvaluateAdaptedSurfaceLineWithSkewedSurfaceLevelInside(SurfaceLine2 surfaceLine, SurfaceLine2 adaptedSurfaceLine, double shoulderHeight, double shoulderWidth) + private void EvaluateAdaptedSurfaceLineWithSkewedSurfaceLevelInside(SurfaceLine2 surfaceLine, SurfaceLine2 adaptedSurfaceLine, double shoulderHeight, double shoulderLength) { const double cTolerance = 0.0000001; Assert.IsNotNull(adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside)); @@ -482,7 +482,7 @@ double intersectionInsideSlopeWithDikeBaseXCoordinate = surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeTopAtPolder).X + (surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeTopAtPolder).Z - surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder).Z); Assert.AreEqual(intersectionInsideSlopeWithDikeBaseXCoordinate - shoulderHeight, adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside).X, cTolerance); Assert.AreEqual(surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder).Z + shoulderHeight, adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside).Z, cTolerance); - Assert.AreEqual(intersectionInsideSlopeWithDikeBaseXCoordinate - shoulderHeight + shoulderWidth, adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside).X, cTolerance); + Assert.AreEqual(intersectionInsideSlopeWithDikeBaseXCoordinate - shoulderHeight + shoulderLength, adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside).X, cTolerance); double rightShift = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder).X - surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder).X; Assert.AreEqual(surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.SurfaceLevelInside).X, adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.SurfaceLevelInside).X, cTolerance); Assert.AreEqual(surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.SurfaceLevelInside).Z, adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.SurfaceLevelInside).Z, cTolerance); @@ -493,31 +493,31 @@ { var surfaceLine = CreateSurfaceLineWithSkewedSurfaceLevelInside(); var location = new Location(); - const int shoulderWidth = 2; + const int shoulderLength = 2; const int shoulderHeight = 1; Assert.IsNull(surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside)); Assert.IsNull(surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside)); var surfaceLineAdapter = new SurfaceLineShoulderAdapter(surfaceLine, location); - var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderWidth, shoulderHeight, false); - EvaluateAdaptedSurfaceLineWithSkewedSurfaceLevelInside(surfaceLine, adaptedSurfaceLine, shoulderHeight, shoulderWidth); + var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); + EvaluateAdaptedSurfaceLineWithSkewedSurfaceLevelInside(surfaceLine, adaptedSurfaceLine, shoulderHeight, shoulderLength); } [Test] public void AdaptedSurfaceLineWithoutShoulderWithSkewedSurfaceLevelInsideAndInbetweenPointInSlopeHasCorrectPointsInside() { var surfaceLine = CreateSurfaceLineWithSkewedSurfaceLevelInside(); var location = new Location(); - const int shoulderWidth = 2; + const int shoulderLength = 2; const int shoulderHeight = 1; surfaceLine.EnsurePoint(8, 1.9); surfaceLine.SortPoints(); Assert.IsNull(surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside)); Assert.IsNull(surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside)); var surfaceLineAdapter = new SurfaceLineShoulderAdapter(surfaceLine, location); - var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderWidth, shoulderHeight, false); + var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); Assert.AreEqual(7, surfaceLine.Geometry.Points.Count); Assert.AreEqual(8, adaptedSurfaceLine.Geometry.Points.Count); - EvaluateAdaptedSurfaceLineWithSkewedSurfaceLevelInside(surfaceLine, adaptedSurfaceLine, shoulderHeight, shoulderWidth); + EvaluateAdaptedSurfaceLineWithSkewedSurfaceLevelInside(surfaceLine, adaptedSurfaceLine, shoulderHeight, shoulderLength); } private SurfaceLine2 CreateSurfaceLineWithShoulderAndSkewedSurfaceLevelInside() @@ -539,30 +539,30 @@ { var surfaceLine = CreateSurfaceLineWithShoulderAndSkewedSurfaceLevelInside(); var location = new Location(); - const int shoulderWidth = 2; + const int shoulderLength = 2; const int shoulderHeight = 1; var surfaceLineAdapter = new SurfaceLineShoulderAdapter(surfaceLine, location); - var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderWidth, shoulderHeight, false); - EvaluateAdaptedSurfaceLineWithSkewedSurfaceLevelInside(surfaceLine, adaptedSurfaceLine, shoulderHeight, shoulderWidth); + var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); + EvaluateAdaptedSurfaceLineWithSkewedSurfaceLevelInside(surfaceLine, adaptedSurfaceLine, shoulderHeight, shoulderLength); } [Test] public void AdaptedSurfaceLineWithShoulderWithSkewedSurfaceLevelInsideAndInbetweenPointsHasCorrectPointsInside() { var surfaceLine = CreateSurfaceLineWithShoulderAndSkewedSurfaceLevelInside(); var location = new Location(); - const int shoulderWidth = 2; + const int shoulderLength = 2; const int shoulderHeight = 1; surfaceLine.EnsurePoint(8, 1.9); surfaceLine.EnsurePoint(10, 1); surfaceLine.EnsurePoint(12, 0.5); surfaceLine.EnsurePoint(14, -0.5); surfaceLine.SortPoints(); var surfaceLineAdapter = new SurfaceLineShoulderAdapter(surfaceLine, location) { SlopeOfNewShoulder = 2 }; - var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderWidth, shoulderHeight, false); + var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); Assert.AreEqual(12, surfaceLine.Geometry.Points.Count); Assert.AreEqual(9, adaptedSurfaceLine.Geometry.Points.Count); - EvaluateAdaptedSurfaceLineWithSkewedSurfaceLevelInside(surfaceLine, adaptedSurfaceLine, shoulderHeight, shoulderWidth); + EvaluateAdaptedSurfaceLineWithSkewedSurfaceLevelInside(surfaceLine, adaptedSurfaceLine, shoulderHeight, shoulderLength); } [Test] @@ -575,10 +575,10 @@ var pointTrafficLoadInside = new GeometryPoint { X = 10.5, Z = 0.925 }; surfaceLine.EnsurePointOfType(pointTrafficLoadOutside.X, pointTrafficLoadOutside.Z, CharacteristicPointType.TrafficLoadOutside); surfaceLine.EnsurePointOfType(pointTrafficLoadInside.X, pointTrafficLoadInside.Z, CharacteristicPointType.TrafficLoadInside); - const int shoulderWidth = 2; + const int shoulderLength = 2; const int shoulderHeight = 1; var surfaceLineAdapter = new SurfaceLineShoulderAdapter(surfaceLine, location); - var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderWidth, shoulderHeight, false); + var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); var expectedPointTrafficLoadOutside = new GeometryPoint { X = 9.5, Z = 1.0 }; var expectedPointTrafficLoadInside = new GeometryPoint { X = 10.5, Z = 1.0 }; Assert.AreEqual(expectedPointTrafficLoadOutside.X, adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.TrafficLoadOutside).X, cTolerance); @@ -599,7 +599,7 @@ Geometry = new GeometryPointString() }; var location = new Location(); - const int shoulderWidth = 1; + const int shoulderLength = 1; const int shoulderHeight = 1; var pointAtToeRiver = new GeometryPoint { X = 0, Z = 0 }; var pointAtTopRiver = new GeometryPoint { X = 2, Z = 2 }; @@ -620,7 +620,7 @@ surfaceLine.EnsurePointOfType(ditchTopAtPolderSide.X, ditchTopAtPolderSide.Z, CharacteristicPointType.DitchPolderSide); surfaceLine.EnsurePointOfType(pointAtSurfaceLevelInside.X, pointAtSurfaceLevelInside.Z, CharacteristicPointType.SurfaceLevelInside); var surfaceLineAdapter = new SurfaceLineShoulderAdapter(surfaceLine, location) { SlopeOfNewShoulder = 2 }; - var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderWidth, shoulderHeight, false); + var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); var expectedPoint = new GeometryPoint(3.5, 1); var actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside); Assert.IsTrue(expectedPoint.LocationEquals(actualPoint)); @@ -658,7 +658,7 @@ Geometry = new GeometryPointString() }; var location = new Location(); - const int shoulderWidth = 1; + const int shoulderLength = 1; const int shoulderHeight = 1; var pointAtToeRiver = new GeometryPoint { X = 0, Z = 0 }; var pointAtTopRiver = new GeometryPoint { X = 2, Z = 2 }; @@ -679,7 +679,7 @@ surfaceLine.EnsurePointOfType(ditchTopAtPolderSide.X, ditchTopAtPolderSide.Z, CharacteristicPointType.DitchPolderSide); surfaceLine.EnsurePointOfType(pointAtSurfaceLevelInside.X, pointAtSurfaceLevelInside.Z, CharacteristicPointType.SurfaceLevelInside); var surfaceLineAdapter = new SurfaceLineShoulderAdapter(surfaceLine, location) { SlopeOfNewShoulder = 2 }; - var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderWidth, shoulderHeight, false); + var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); var expectedPoint = new GeometryPoint(3.5, 1); var actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside); Assert.IsTrue(expectedPoint.LocationEquals(actualPoint)); @@ -717,7 +717,7 @@ Geometry = new GeometryPointString() }; var location = new Location(); - const int shoulderWidth = 1; + const int shoulderLength = 1; const int shoulderHeight = 1; var pointAtToeRiver = new GeometryPoint { X = 0, Z = 0 }; var pointAtTopRiver = new GeometryPoint { X = 2, Z = 2 }; @@ -740,7 +740,7 @@ surfaceLine.EnsurePoint(inBetweenPointAtSurfaceLevelInside.X, inBetweenPointAtSurfaceLevelInside.Z); surfaceLine.EnsurePointOfType(pointAtSurfaceLevelInside.X, pointAtSurfaceLevelInside.Z, CharacteristicPointType.SurfaceLevelInside); var surfaceLineAdapter = new SurfaceLineShoulderAdapter(surfaceLine, location) { SlopeOfNewShoulder = 2 }; - var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderWidth, shoulderHeight, false); + var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); var expectedPoint = new GeometryPoint(3.5, 1); var actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside); Assert.IsTrue(expectedPoint.LocationEquals(actualPoint)); @@ -766,7 +766,7 @@ Geometry = new GeometryPointString() }; var location = new Location(); - const int shoulderWidth = 1; + const int shoulderLength = 1; const int shoulderHeight = 1; var pointAtToeRiver = new GeometryPoint { X = 0, Z = 0 }; var pointAtTopRiver = new GeometryPoint { X = 2, Z = 2 }; @@ -791,7 +791,7 @@ surfaceLine.EnsurePointOfType(apoint2.X, apoint2.Z, null); surfaceLine.EnsurePointOfType(pointAtSurfaceLevelInside.X, pointAtSurfaceLevelInside.Z, CharacteristicPointType.SurfaceLevelInside); var surfaceLineAdapter = new SurfaceLineShoulderAdapter(surfaceLine, location) { SlopeOfNewShoulder = 2 }; - var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderWidth, shoulderHeight, false); + var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); var expectedPoint = new GeometryPoint(3.5, 1); var actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside); Assert.IsTrue(expectedPoint.LocationEquals(actualPoint)); @@ -829,7 +829,7 @@ Geometry = new GeometryPointString() }; var location = new Location(); - const int shoulderWidth = 1; + const int shoulderLength = 1; const int shoulderHeight = 1; var pointAtToeRiver = new GeometryPoint { X = 0, Z = 0 }; var pointAtTopRiver = new GeometryPoint { X = 2, Z = 2 }; @@ -857,7 +857,7 @@ surfaceLine.EnsurePointOfType(pointAtSurfaceLevelInside.X, pointAtSurfaceLevelInside.Z, CharacteristicPointType.SurfaceLevelInside); Assert.AreEqual(12, surfaceLine.Geometry.Points.Count); var surfaceLineAdapter = new SurfaceLineShoulderAdapter(surfaceLine, location) { SlopeOfNewShoulder = 2 }; - var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderWidth, shoulderHeight, false); + var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); var expectedPoint = new GeometryPoint(3.5, 1); var actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside); Assert.IsTrue(expectedPoint.LocationEquals(actualPoint)); @@ -901,7 +901,7 @@ Geometry = new GeometryPointString() }; var location = new Location(); - const int shoulderWidth = 1; + const int shoulderLength = 1; const int shoulderHeight = 1; var pointAtToeRiver = new GeometryPoint { X = 0, Z = 0 }; var pointAtTopRiver = new GeometryPoint { X = 2, Z = 2 }; @@ -929,7 +929,7 @@ surfaceLine.EnsurePointOfType(pointAtSurfaceLevelInside.X, pointAtSurfaceLevelInside.Z, CharacteristicPointType.SurfaceLevelInside); Assert.AreEqual(12, surfaceLine.Geometry.Count); var surfaceLineAdapter = new SurfaceLineShoulderAdapter(surfaceLine, location) { SlopeOfNewShoulder = 2 }; - var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderWidth, shoulderHeight, false); + var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); var expectedPoint = new GeometryPoint(3.5, 1); var actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside); Assert.IsTrue(expectedPoint.LocationEquals(actualPoint)); @@ -974,7 +974,7 @@ Geometry = new GeometryPointString() }; var location = new Location(); - const int shoulderWidth = 100; + const int shoulderLength = 100; const int shoulderHeight = 1; var pointAtToeRiver = new GeometryPoint { X = 0, Z = 0 }; var pointAtTopRiver = new GeometryPoint { X = 2, Z = 2 }; @@ -987,7 +987,7 @@ surfaceLine.EnsurePointOfType(pointAtToePolder.X, pointAtToePolder.Z, CharacteristicPointType.DikeToeAtPolder); surfaceLine.EnsurePointOfType(pointAtSurfaceLevelInside.X, pointAtSurfaceLevelInside.Z, CharacteristicPointType.SurfaceLevelInside); var surfaceLineAdapter = new SurfaceLineShoulderAdapter(surfaceLine, location); - var line = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderWidth, shoulderHeight, false); + var line = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); } [Test] @@ -1003,7 +1003,7 @@ Geometry = new GeometryPointString() }; var location = new Location(); - const double shoulderWidth = 94.51; + const double shoulderLength = 94.51; const int shoulderHeight = 1; var pointAtToeRiver = new GeometryPoint { X = 0, Z = 0 }; var pointAtTopRiver = new GeometryPoint { X = 2, Z = 2 }; @@ -1017,7 +1017,7 @@ surfaceLine.EnsurePointOfType(pointAtSurfaceLevelInside.X, pointAtSurfaceLevelInside.Z, CharacteristicPointType.SurfaceLevelInside); var surfaceLineAdapter = new SurfaceLineShoulderAdapter(surfaceLine, location); - var line = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderWidth, shoulderHeight, false); + var line = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); } [Test] @@ -1033,7 +1033,7 @@ Geometry = new GeometryPointString() }; var location = new Location(); - const double shoulderWidth = 90.51; + const double shoulderLength = 90.51; const int shoulderHeight = 1; var pointAtToeRiver = new GeometryPoint { X = 0, Z = 0 }; var pointAtTopRiver = new GeometryPoint { X = 2, Z = 2 }; @@ -1060,7 +1060,7 @@ surfaceLine.EnsurePointOfType(apoint3.X, apoint3.Z, null); surfaceLine.EnsurePointOfType(pointAtSurfaceLevelInside.X, pointAtSurfaceLevelInside.Z, CharacteristicPointType.SurfaceLevelInside); var surfaceLineAdapter = new SurfaceLineShoulderAdapter(surfaceLine, location); - var line = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderWidth, shoulderHeight, false); + var line = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); } [Test] @@ -1077,7 +1077,7 @@ var location = new Location(); location.UseNewMaxHeightShoulderAsFraction = true; location.NewMaxHeightShoulderAsFraction = 0.5; - const int shoulderWidth = 1; + const int shoulderLength = 1; const int shoulderHeight = 1; var pointAtToeRiver = new GeometryPoint { X = 0, Z = 0 }; var pointAtTopRiver = new GeometryPoint { X = 1, Z = 1 }; @@ -1093,7 +1093,7 @@ surfaceLineAdapter.MaxShoulderLevel = location.NewMaxHeightShoulderAsFraction * (surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeTopAtPolder).Z - surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder).Z) + surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder).Z; - var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderWidth, shoulderHeight, false); + var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); double expectedShoulderHeight = Math.Min(shoulderHeight, surfaceLineAdapter.MaxShoulderLevel + surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder).Z); var expectedPoint = new GeometryPoint(3.5, expectedShoulderHeight); var actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside); @@ -1114,7 +1114,7 @@ var location = new Location(); location.UseNewMaxHeightShoulderAsFraction = true; location.NewMaxHeightShoulderAsFraction = 1; - const int shoulderWidth = 1; + const int shoulderLength = 1; const int shoulderHeight = 1; var pointAtToeRiver = new GeometryPoint { X = 0, Z = 0 }; var pointAtTopRiver = new GeometryPoint { X = 1, Z = 1 }; @@ -1127,7 +1127,7 @@ surfaceLine.EnsurePointOfType(pointAtToePolder.X, pointAtToePolder.Z, CharacteristicPointType.DikeToeAtPolder); surfaceLine.EnsurePointOfType(pointAtSurfaceLevelInside.X, pointAtSurfaceLevelInside.Z, CharacteristicPointType.SurfaceLevelInside); var surfaceLineAdapter = new SurfaceLineShoulderAdapter(surfaceLine, location); - var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderWidth, shoulderHeight, false); + var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); double expectedShoulderHeight = Math.Min(shoulderHeight, (surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeTopAtPolder).Z - surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder).Z)); var expectedPoint = new GeometryPoint(3, expectedShoulderHeight); var actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside); @@ -1149,7 +1149,7 @@ var location = new Location(); location.UseNewMaxHeightShoulderAsFraction = true; location.NewMaxHeightShoulderAsFraction = 1; - const int shoulderWidth = 1; + const int shoulderLength = 1; const int shoulderHeight = 1; var pointAtToeRiver = new GeometryPoint { X = 0, Z = 0 }; var pointAtTopRiver = new GeometryPoint { X = 1, Z = 1 }; @@ -1164,7 +1164,7 @@ var surfaceLineAdapter = new SurfaceLineShoulderAdapter(surfaceLine, location); surfaceLineAdapter.MaxShoulderLevel = maxFractionOfDikeHeightForShoulderHeight * (surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeTopAtPolder).Z - surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder).Z) + surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder).Z; - var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderWidth, shoulderHeight, false); + var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); double expectedShoulderHeight = Math.Min(shoulderHeight, surfaceLineAdapter.MaxShoulderLevel + surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder).Z); var expectedPoint = new GeometryPoint(3.5, expectedShoulderHeight); var actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside); @@ -1185,7 +1185,7 @@ var location = new Location(); location.UseNewShoulderTopSlope = true; location.NewShoulderTopSlope = 0.05; - const double shoulderWidth = 4.5; + const double shoulderLength = 4.5; const double shoulderHeight = 0.5; var pointAtToeRiver = new GeometryPoint { X = 0, Z = 0 }; var pointAtTopRiver = new GeometryPoint { X = 1, Z = 1 }; @@ -1200,7 +1200,7 @@ var surfaceLineAdapter = new SurfaceLineShoulderAdapter(surfaceLine, location); surfaceLineAdapter.MaxShoulderLevel = 0.8 * (surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeTopAtPolder).Z - surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder).Z) + surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder).Z; - var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderWidth, shoulderHeight, false); + var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); var expectedBasePoint = new GeometryPoint(2.263, 0.737); var actualBasePoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside); Assert.IsTrue(expectedBasePoint.LocationEquals(actualBasePoint)); @@ -1227,7 +1227,7 @@ var location = new Location(); location.UseNewShoulderTopSlope = true; location.NewShoulderTopSlope = 0.5; - const double shoulderWidth = 4.5; + const double shoulderLength = 4.5; const int shoulderHeight = 1; var pointAtToeRiver = new GeometryPoint { X = 0, Z = 0 }; var pointAtTopRiver = new GeometryPoint { X = 1, Z = 1 }; @@ -1242,7 +1242,7 @@ var surfaceLineAdapter = new SurfaceLineShoulderAdapter(surfaceLine, location); surfaceLineAdapter.MaxShoulderLevel = 0.5 * (surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeTopAtPolder).Z - surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder).Z) + surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder).Z; - var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderWidth, shoulderHeight, false); + var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); // TODO (The) what to do with the outcommented code? // Dike top polder now coincides with the shoulder base. // var expectedBasePoint = GeometryPoint.CreateNewXZPoint(2, 1); @@ -1272,7 +1272,7 @@ var location = new Location(); location.UseNewShoulderBaseSlope = true; location.NewShoulderBaseSlope = 1; - const double shoulderWidth = 4.5; + const double shoulderLength = 4.5; const int shoulderHeight = 1; var pointAtToeRiver = new GeometryPoint { X = 0, Z = 0 }; var pointAtTopRiver = new GeometryPoint { X = 1, Z = 1 }; @@ -1287,7 +1287,7 @@ var surfaceLineAdapter = new SurfaceLineShoulderAdapter(surfaceLine, location); surfaceLineAdapter.MaxShoulderLevel = 0.5 * (surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeTopAtPolder).Z - surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder).Z) + surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder).Z; - var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderWidth, shoulderHeight, false); + var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); var expectedBasePoint = new GeometryPoint(2.5, 0.5); var actualBasePoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside); Assert.IsTrue(expectedBasePoint.LocationEquals(actualBasePoint)); @@ -1313,7 +1313,7 @@ var location = new Location(); location.UseNewShoulderBaseSlope = true; location.NewShoulderBaseSlope = 1; - const double shoulderWidth = 4.5; + const double shoulderLength = 4.5; const int shoulderHeight = 1; var pointAtToeRiver = new GeometryPoint { X = 0, Z = 0 }; var pointAtTopRiver = new GeometryPoint { X = 1, Z = 1 }; @@ -1329,7 +1329,7 @@ surfaceLineAdapter.MaxShoulderLevel = 0.5 * (surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeTopAtPolder).Z - surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder).Z) + surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder).Z; surfaceLineAdapter.SlopeOfNewShoulder = 2; - var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderWidth, shoulderHeight, false); + var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); var expectedBasePoint = new GeometryPoint(2.5, 0.5); var actualBasePoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside); Assert.IsTrue(expectedBasePoint.LocationEquals(actualBasePoint)); @@ -1356,7 +1356,7 @@ var location = new Location(); location.UseNewShoulderBaseSlope = true; location.NewShoulderBaseSlope = 0.001; - const double shoulderWidth = 4.5; + const double shoulderLength = 4.5; const int shoulderHeight = 1; var pointAtToeRiver = new GeometryPoint { X = 0, Z = 0 }; var pointAtTopRiver = new GeometryPoint { X = 1, Z = 1 }; @@ -1371,7 +1371,7 @@ var surfaceLineAdapter = new SurfaceLineShoulderAdapter(surfaceLine, location); surfaceLineAdapter.MaxShoulderLevel = 0.5 * (surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeTopAtPolder).Z - surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder).Z) + surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder).Z; - var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderWidth, shoulderHeight, false); + var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); } [Test] @@ -1386,7 +1386,7 @@ Geometry = new GeometryPointString() }; var location = new Location(); - const int shoulderWidth = 1; + const int shoulderLength = 1; const int shoulderHeight = 1; location.UseNewMinDistanceDikeToeStartDitch = true; location.NewMinDistanceDikeToeStartDitch = 1; @@ -1413,7 +1413,7 @@ surfaceLine.EnsurePointOfType(apoint2.X, apoint2.Z, null); surfaceLine.EnsurePointOfType(pointAtSurfaceLevelInside.X, pointAtSurfaceLevelInside.Z, CharacteristicPointType.SurfaceLevelInside); var surfaceLineAdapter = new SurfaceLineShoulderAdapter(surfaceLine, location) { SlopeOfNewShoulder = 2 }; - var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderWidth, shoulderHeight, false); + var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); var expectedPoint = new GeometryPoint(3.5, 1); var actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside); Assert.IsTrue(expectedPoint.LocationEquals(actualPoint)); @@ -1451,7 +1451,7 @@ Geometry = new GeometryPointString() }; var location = new Location(); - const int shoulderWidth = 1; + const int shoulderLength = 1; const int shoulderHeight = 1; location.UseNewMinDistanceDikeToeStartDitch = true; location.NewMinDistanceDikeToeStartDitch = 31; @@ -1478,7 +1478,7 @@ surfaceLine.EnsurePointOfType(apoint2.X, apoint2.Z, null); surfaceLine.EnsurePointOfType(pointAtSurfaceLevelInside.X, pointAtSurfaceLevelInside.Z, CharacteristicPointType.SurfaceLevelInside); var surfaceLineAdapter = new SurfaceLineShoulderAdapter(surfaceLine, location) { SlopeOfNewShoulder = 2 }; - var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderWidth, shoulderHeight, false); + var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); var expectedPoint = new GeometryPoint(3.5, 1); var actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside); Assert.IsTrue(expectedPoint.LocationEquals(actualPoint)); @@ -1517,7 +1517,7 @@ Geometry = new GeometryPointString() }; var location = new Location(); - const int shoulderWidth = 1; + const int shoulderLength = 1; const int shoulderHeight = 1; location.UseNewMinDistanceDikeToeStartDitch = true; location.NewMinDistanceDikeToeStartDitch = 131; @@ -1544,7 +1544,7 @@ surfaceLine.EnsurePointOfType(apoint2.X, apoint2.Z, null); surfaceLine.EnsurePointOfType(pointAtSurfaceLevelInside.X, pointAtSurfaceLevelInside.Z, CharacteristicPointType.SurfaceLevelInside); var surfaceLineAdapter = new SurfaceLineShoulderAdapter(surfaceLine, location) { SlopeOfNewShoulder = 2 }; - var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderWidth, shoulderHeight, false); + var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); } [Test] @@ -1559,7 +1559,7 @@ Geometry = new GeometryPointString() }; var location = new Location(); - const int shoulderWidth = 1; + const int shoulderLength = 1; const int shoulderHeight = 1; location.UseNewMinDistanceDikeToeStartDitch = true; location.NewMinDistanceDikeToeStartDitch = 1; @@ -1591,7 +1591,7 @@ surfaceLine.EnsurePointOfType(apoint2.X, apoint2.Z, null); surfaceLine.EnsurePointOfType(pointAtSurfaceLevelInside.X, pointAtSurfaceLevelInside.Z, CharacteristicPointType.SurfaceLevelInside); var surfaceLineAdapter = new SurfaceLineShoulderAdapter(surfaceLine, location) { SlopeOfNewShoulder = 2 }; - var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderWidth, shoulderHeight, false); + var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); var expectedPoint = new GeometryPoint(3.5, 1); var actualPoint = adaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderBaseInside); Assert.IsTrue(expectedPoint.LocationEquals(actualPoint)); @@ -1630,7 +1630,7 @@ Geometry = new GeometryPointString() }; var location = new Location(); - const int shoulderWidth = 1; + const int shoulderLength = 1; const int shoulderHeight = 1; location.UseNewMinDistanceDikeToeStartDitch = true; location.NewMinDistanceDikeToeStartDitch = 1; @@ -1662,7 +1662,7 @@ surfaceLine.EnsurePointOfType(apoint2.X, apoint2.Z, null); surfaceLine.EnsurePointOfType(pointAtSurfaceLevelInside.X, pointAtSurfaceLevelInside.Z, CharacteristicPointType.SurfaceLevelInside); var surfaceLineAdapter = new SurfaceLineShoulderAdapter(surfaceLine, location) { SlopeOfNewShoulder = 2 }; - var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderWidth, shoulderHeight, false); + var adaptedSurfaceLine = surfaceLineAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); } } } \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.Interface.Tests/PipingSellmeijerVnkTests.cs =================================================================== diff -u -r1361 -r1363 --- DamEngine/trunk/src/Deltares.DamEngine.Interface.Tests/PipingSellmeijerVnkTests.cs (.../PipingSellmeijerVnkTests.cs) (revision 1361) +++ DamEngine/trunk/src/Deltares.DamEngine.Interface.Tests/PipingSellmeijerVnkTests.cs (.../PipingSellmeijerVnkTests.cs) (revision 1363) @@ -100,9 +100,9 @@ // dike length = 84.486 Assert.AreEqual(84.486, redesignedSurfaceLine.GetDikeLength(), tolerance); - // ShoulderWidth = X_Kruin binnenberm - X_Insteek binnenberm = 82.51 - 29.01 = 53.5 + // ShoulderLength = X_Kruin binnenberm - X_Insteek binnenberm = 82.51 - 29.01 = 53.5 // Read from PipingSellmeijerVNK_Piping_CharacteristicPoints.csv by export surfacelines in Release - Assert.AreEqual(53.5, redesignedSurfaceLine.DetermineShoulderWidth(), tolerance); + Assert.AreEqual(53.5, redesignedSurfaceLine.DetermineShoulderLength(), tolerance); Assert.AreEqual(0.0, output.Results.CalculationResults.DesignResults[0].PipingDesignResults.UpliftSituation.Pl3MinUplift, tolerance); Assert.AreEqual(0.0, output.Results.CalculationResults.DesignResults[0].PipingDesignResults.UpliftSituation.Pl3HeadAdjusted, tolerance); @@ -135,7 +135,7 @@ } [Test] - public void TestIfSellmeijerVnkCalculationResultIsSetToFailDueToShoulderWidthError() + public void TestIfSellmeijerVnkCalculationResultIsSetToFailDueToShoulderShoulderLengthError() { // Based on ".\data\DamEngineTestProjects\PipingVoorbeeld1\PipingSellmeijerVNK.damx" // Set Analysis type to "Adapt geometry" @@ -148,14 +148,14 @@ var output = DamXmlSerialization.LoadOutputFromXmlString(outputString); Assert.AreEqual(CalculationResult.Succeeded, ConversionHelper.ConvertToCalculationResult(output.Results.CalculationResults.DesignResults[0].CalculationResult)); - // expected value = -1 because exception was raised for the shoulder width + // expected value = -1 because exception was raised for the shoulder length Assert.AreEqual(-1.0, output.Results.CalculationResults.DesignResults[0].PipingDesignResults.SellmeijerVnkFactor, tolerance); - Assert.AreEqual("The new shoulder width is too large to fit in the current surface line.", + Assert.AreEqual("The new shoulder length is too large to fit in the current surface line.", output.Results.CalculationResults.DesignResults[0].PipingDesignResults.ResultMessage); Assert.AreEqual("Location Profiel 1, subsoil scenario 'soilprofile_01', design scenario '1': " + "The calculation failed with error message " + "'The design was not successful. " + - "The new shoulder width is too large to fit in the current surface line.'", + "The new shoulder length is too large to fit in the current surface line.'", output.Results.CalculationMessages[0].Message1); } @@ -173,7 +173,6 @@ var output = DamXmlSerialization.LoadOutputFromXmlString(outputString); Assert.AreEqual(CalculationResult.Succeeded, ConversionHelper.ConvertToCalculationResult(output.Results.CalculationResults.DesignResults[0].CalculationResult)); - // expected value = -1 because exception was raised for the shoulder width Assert.AreEqual(true, output.Results.CalculationResults.DesignResults[0].PipingDesignResults.SellmeijerVnkFactor > -1); Assert.AreEqual("", output.Results.CalculationResults.DesignResults[0].PipingDesignResults.ResultMessage); } Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.nl-NL.resx =================================================================== diff -u -r1358 -r1363 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.nl-NL.resx (.../Resources.nl-NL.resx) (revision 1358) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.nl-NL.resx (.../Resources.nl-NL.resx) (revision 1363) @@ -255,13 +255,13 @@ De hoogte van de nieuwe berm moet groter zijn dan 0. + + De nieuwe berm is minder lang dan de huidige berm. + + + De nieuwe lengte van de berm past niet in het dijkprofiel (is langer dan toegestaan). + De nieuwe berm snijdt het dijkprofiel niet. Ofwel het dijkprofiel verloopt heel vreemd of de nieuwe bermbreedte is te groot. - - De nieuwe berm is minder breed dan de huidige berm. - - - De nieuwe breedte van de berm past niet in het dijkprofiel (is breder dan toegestaan). - \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculatorUtils.cs =================================================================== diff -u -r1218 -r1363 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculatorUtils.cs (.../DesignCalculatorUtils.cs) (revision 1218) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculatorUtils.cs (.../DesignCalculatorUtils.cs) (revision 1363) @@ -33,16 +33,16 @@ public class DesignCalculatorUtils { /// - /// Determines the new height and width of the shoulder width + /// Determines the new height and length of the shoulder /// /// The shoulder grow delta X. /// The shoulder grow slope. /// The surface line. /// The limit point for shoulder design. /// New height of the shoulder. - /// New width of the shoulder. - public static void DetermineNewShoulderWidthAndHeight(double shoulderGrowDeltaX, double shoulderGrowSlope, - SurfaceLine2 surfaceLine, GeometryPoint limitPointForShoulderDesign, out double shoulderHeight, out double shoulderWidth) + /// New length of the shoulder. + public static void DetermineNewShoulderLengthAndHeight(double shoulderGrowDeltaX, double shoulderGrowSlope, + SurfaceLine2 surfaceLine, GeometryPoint limitPointForShoulderDesign, out double shoulderHeight, out double shoulderLength) { // Determine new shoulderpoint var newShoulderPoint = new GeometryPoint() @@ -51,8 +51,8 @@ Z = limitPointForShoulderDesign.Z + shoulderGrowDeltaX * shoulderGrowSlope }; - // Determine new shoulder width and height - shoulderWidth = surfaceLine.DetermineShoulderLengthForGivenShoulderTopInside(newShoulderPoint); + // Determine new shoulder length and height + shoulderLength = surfaceLine.DetermineShoulderLengthForGivenShoulderTopInside(newShoulderPoint); shoulderHeight = newShoulderPoint.Z - surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder).Z; } Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculatorCombinedSlopeAndShoulderAdaption.cs =================================================================== diff -u -r1349 -r1363 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculatorCombinedSlopeAndShoulderAdaption.cs (.../DesignCalculatorCombinedSlopeAndShoulderAdaption.cs) (revision 1349) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculatorCombinedSlopeAndShoulderAdaption.cs (.../DesignCalculatorCombinedSlopeAndShoulderAdaption.cs) (revision 1363) @@ -107,14 +107,14 @@ // If exit point of circle is after the limitPointForShoulderDesign then enlarge the shoulder // Determine new width and height for shoulder double shoulderHeight; - double shoulderWidth; - DesignCalculatorUtils.DetermineNewShoulderWidthAndHeight(location.StabilityShoulderGrowDeltaX, - location.StabilityShoulderGrowSlope, surfaceLine, limitPointForShoulderDesign, out shoulderHeight, out shoulderWidth); + double shoulderLength; + DesignCalculatorUtils.DetermineNewShoulderLengthAndHeight(location.StabilityShoulderGrowDeltaX, + location.StabilityShoulderGrowSlope, surfaceLine, limitPointForShoulderDesign, out shoulderHeight, out shoulderLength); // Create new shoulder var surfaceLineShoulderAdapter = new SurfaceLineShoulderAdapter(surfaceLine, location); surfaceLineShoulderAdapter.MaxShoulderLevel = maxShoulderLevel; - surfaceLine = surfaceLineShoulderAdapter.ConstructNewSurfaceLine(shoulderWidth, shoulderHeight, false); + surfaceLine = surfaceLineShoulderAdapter.ConstructNewSurfaceLine(shoulderLength, shoulderHeight, false); var validationError = surfaceLine.Validate().FirstOrDefault(vr => vr.MessageType == ValidationResultType.Error); if (validationError != null) Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.resx =================================================================== diff -u -r1358 -r1363 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.resx (.../Resources.resx) (revision 1358) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.resx (.../Resources.resx) (revision 1363) @@ -226,13 +226,13 @@ New shoulder height should be larger than 0. - The new shoulder does not intersect the surface. This can be caused by a very strange surfaceline or the new shoulderwidth is too large. + The new shoulder does not intersect the surface. This can be caused by a very strange surfaceline or the new shoulder length is too large. - - New shoulder width is smaller than current shoulder width. + + New shoulder length is smaller than current shoulder length. - - The new shoulder width is too large to fit in the current surface line. + + The new shoulder length is too large to fit in the current surface line. No Dam input object defined for Bligh Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculatorShoulderPerPoint.cs =================================================================== diff -u -r1361 -r1363 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculatorShoulderPerPoint.cs (.../DesignCalculatorShoulderPerPoint.cs) (revision 1361) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculatorShoulderPerPoint.cs (.../DesignCalculatorShoulderPerPoint.cs) (revision 1363) @@ -40,7 +40,7 @@ public class DesignCalculatorShoulderPerPoint { private const double minimumShoulderElevation = 0.5; - private const double minimumShoulderWidth = 2; + private const double minimumShoulderLength = 2; private const double toleranceShoulderChanges = 0.001; /// @@ -68,7 +68,7 @@ try { List locationCalculationMessages; - double orgShoulderLength = surfaceLine.DetermineShoulderWidth(); + double orgShoulderLength = surfaceLine.DetermineShoulderLength(); double orgShoulderHeight = surfaceLine.DetermineShoulderHeight(); GeometryPoint startSurfacePoint = surfaceLine.GetDikeToeInward(); @@ -101,7 +101,7 @@ } if (desiredShoulderLength > 0) { - desiredShoulderLength = Math.Max(desiredShoulderLength, minimumShoulderWidth); + desiredShoulderLength = Math.Max(desiredShoulderLength, minimumShoulderLength); } if (desiredShoulderLength > 0) { Index: DamEngine/trunk/src/Deltares.DamEngine.Interface.Tests/PipingBlighTests.cs =================================================================== diff -u -r1358 -r1363 --- DamEngine/trunk/src/Deltares.DamEngine.Interface.Tests/PipingBlighTests.cs (.../PipingBlighTests.cs) (revision 1358) +++ DamEngine/trunk/src/Deltares.DamEngine.Interface.Tests/PipingBlighTests.cs (.../PipingBlighTests.cs) (revision 1363) @@ -121,7 +121,7 @@ Assert.AreEqual(true, output.Results.CalculationResults.DesignResults[0].PipingDesignResults.UpliftSituation.IsUplift); Assert.AreEqual(1.995, redesignedSurfaceLine.DetermineShoulderHeight(), tolerance); Assert.AreEqual(63.486, redesignedSurfaceLine.GetDikeLength(), tolerance); - Assert.AreEqual(32.5, redesignedSurfaceLine.DetermineShoulderWidth(), tolerance); + Assert.AreEqual(32.5, redesignedSurfaceLine.DetermineShoulderLength(), tolerance); Assert.AreEqual(0.0, output.Results.CalculationResults.DesignResults[0].PipingDesignResults.UpliftSituation.Pl3MinUplift, tolerance); Assert.AreEqual(0.0, output.Results.CalculationResults.DesignResults[0].PipingDesignResults.UpliftSituation.Pl3HeadAdjusted, tolerance); Assert.AreEqual(0.0, output.Results.CalculationResults.DesignResults[0].PipingDesignResults.UpliftSituation.Pl3LocationXMinUplift, tolerance); @@ -182,7 +182,7 @@ Assert.AreEqual("Location 101, subsoil scenario 'segment1_1D1', design scenario '1': " + "The calculation failed with error message " + "'The design was not successful. " + - "The new shoulder width is too large to fit in the current surface line.'", + "The new shoulder length is too large to fit in the current surface line.'", output.Results.CalculationMessages[0].Message1); }