Index: Core/Common/src/Core.Common.Base/Geometry/Math2D.cs
===================================================================
diff -u -rd603616dc14b48d1558275495bb59952e22b351f -r38dd2d81eada00a5bcec11cb847e298aad9c83e6
--- Core/Common/src/Core.Common.Base/Geometry/Math2D.cs (.../Math2D.cs) (revision d603616dc14b48d1558275495bb59952e22b351f)
+++ Core/Common/src/Core.Common.Base/Geometry/Math2D.cs (.../Math2D.cs) (revision 38dd2d81eada00a5bcec11cb847e298aad9c83e6)
@@ -60,7 +60,7 @@
{
throw new ArgumentException(Resources.Math2D_SplitLineAtLengths_Not_enough_points_to_make_line, nameof(linePoints));
}
- Segment2D[] lineSegments = ConvertLinePointsToLineSegments(linePoints).ToArray();
+ Segment2D[] lineSegments = ConvertPointsToLineSegments(linePoints).ToArray();
if (Math.Abs(lengths.Sum(l => l) - lineSegments.Sum(s => s.Length)) > epsilonForComparisons)
{
@@ -71,15 +71,16 @@
}
///
- /// Creates an enumerator that converts a sequence of line points to a sequence of line segments.
+ /// Creates an enumerator that converts a sequence of points to a sequence of segments that represent a line.
///
- /// The line points.
- /// A sequence of N elements, where N is the number of elements in
- /// - 1, or 0 if only has one or no elements.
- public static IEnumerable ConvertLinePointsToLineSegments(IEnumerable linePoints)
+ /// A sequence of points to convert.
+ /// A sequence of N elements, where N is the number of elements in
+ /// - 1, or 0 if only has one or no elements.
+ /// The converted points do not form a closed loop.
+ public static IEnumerable ConvertPointsToLineSegments(IEnumerable points)
{
Point2D endPoint = null;
- foreach (Point2D linePoint in linePoints)
+ foreach (Point2D linePoint in points)
{
Point2D startPoint = endPoint;
endPoint = linePoint;
@@ -92,29 +93,30 @@
}
///
- /// Creates an enumerator that converts a sequence of line points to a sequence of line segments
- /// and adds a segment between the last and the first point of the sequence.
+ /// Creates an enumerator that converts a sequence of points to a sequence of segments
+ /// that represent a polygon.
///
- /// The line points.
- /// A sequence of N elements, where N is the number of elements in ,
- /// or 0 if has one or no elements.
- public static IEnumerable ConvertLinePointsToClosingLineSegments(IEnumerable linePoints)
+ /// A sequence of points to convert.
+ /// A sequence of N elements, where N is the number of elements in ,
+ /// or 0 if has one or no elements.
+ /// The converted points form a closed loop.
+ public static IEnumerable ConvertPointsToPolygonSegments(IEnumerable points)
{
- if (linePoints.Count() < 2)
+ Point2D[] pointsArray = points.ToArray();
+ int nrOfPoints = pointsArray.Length;
+ if (nrOfPoints < 2)
{
yield break;
}
- Point2D endPoint = linePoints.Last();
- foreach (Point2D linePoint in linePoints)
+ for (var i = 0; i < nrOfPoints; i++)
{
- Point2D startPoint = endPoint;
- endPoint = linePoint;
+ Point2D startPoint = pointsArray[i];
+ Point2D endPoint = i != nrOfPoints - 1
+ ? pointsArray[i + 1]
+ : pointsArray[0];
- if (startPoint != null)
- {
- yield return new Segment2D(startPoint, endPoint);
- }
+ yield return new Segment2D(startPoint, endPoint);
}
}
Index: Core/Common/test/Core.Common.Base.Test/Geometry/Math2DTest.cs
===================================================================
diff -u -rd603616dc14b48d1558275495bb59952e22b351f -r38dd2d81eada00a5bcec11cb847e298aad9c83e6
--- Core/Common/test/Core.Common.Base.Test/Geometry/Math2DTest.cs (.../Math2DTest.cs) (revision d603616dc14b48d1558275495bb59952e22b351f)
+++ Core/Common/test/Core.Common.Base.Test/Geometry/Math2DTest.cs (.../Math2DTest.cs) (revision 38dd2d81eada00a5bcec11cb847e298aad9c83e6)
@@ -168,20 +168,20 @@
[Test]
[TestCase(0)]
[TestCase(1)]
- public void ConvertLinePointsToLineSegments_TooFewPoints_ReturnEmpty(int pointCount)
+ public void ConvertPointsToLineSegments_TooFewPoints_ReturnEmpty(int pointCount)
{
// Setup
IEnumerable linePoints = Enumerable.Repeat(new Point2D(0, 0), pointCount);
// Call
- IEnumerable segments = Math2D.ConvertLinePointsToLineSegments(linePoints);
+ IEnumerable segments = Math2D.ConvertPointsToLineSegments(linePoints);
// Assert
CollectionAssert.IsEmpty(segments);
}
[Test]
- public void ConvertLinePointsToLineSegments_TwoPoints_ReturnOneSegmentOfThoseTwoPoints()
+ public void ConvertPointsToLineSegments_TwoPoints_ReturnOneSegmentOfThoseTwoPoints()
{
// Setup
var linePoints = new[]
@@ -191,31 +191,31 @@
};
// Call
- Segment2D[] segments = Math2D.ConvertLinePointsToLineSegments(linePoints).ToArray();
+ Segment2D[] segments = Math2D.ConvertPointsToLineSegments(linePoints).ToArray();
// Assert
Assert.AreEqual(1, segments.Length);
- Assert.AreEqual(linePoints[0], segments[0].FirstPoint);
- Assert.AreEqual(linePoints[1], segments[0].SecondPoint);
+ Assert.AreSame(linePoints[0], segments[0].FirstPoint);
+ Assert.AreSame(linePoints[1], segments[0].SecondPoint);
}
[Test]
[TestCase(0)]
[TestCase(1)]
- public void ConvertLinePointsToClosingLineSegments_TooFewPoints_ReturnEmpty(int pointCount)
+ public void ConvertPointsToPolygonSegments_TooFewPoints_ReturnEmpty(int pointCount)
{
// Setup
IEnumerable linePoints = Enumerable.Repeat(new Point2D(0, 0), pointCount);
// Call
- IEnumerable segments = Math2D.ConvertLinePointsToClosingLineSegments(linePoints);
+ IEnumerable segments = Math2D.ConvertPointsToPolygonSegments(linePoints);
// Assert
CollectionAssert.IsEmpty(segments);
}
[Test]
- public void ConvertLinePointsToClosingLineSegments_TwoPoints_ReturnsExpectedSegments()
+ public void ConvertPointsToPolygonSegments_TwoPoints_ReturnsExpectedSegments()
{
// Setup
var linePoints = new[]
@@ -225,18 +225,18 @@
};
// Call
- Segment2D[] segments = Math2D.ConvertLinePointsToClosingLineSegments(linePoints).ToArray();
+ Segment2D[] segments = Math2D.ConvertPointsToPolygonSegments(linePoints).ToArray();
// Assert
Assert.AreEqual(2, segments.Length);
Segment2D firstSegment = segments[0];
- Assert.AreEqual(linePoints[1], firstSegment.FirstPoint);
- Assert.AreEqual(linePoints[0], firstSegment.SecondPoint);
+ Assert.AreSame(linePoints[0], firstSegment.FirstPoint);
+ Assert.AreSame(linePoints[1], firstSegment.SecondPoint);
Segment2D secondSegment = segments[1];
- Assert.AreEqual(linePoints[0], secondSegment.FirstPoint);
- Assert.AreEqual(linePoints[1], secondSegment.SecondPoint);
+ Assert.AreSame(linePoints[1], secondSegment.FirstPoint);
+ Assert.AreSame(linePoints[0], secondSegment.SecondPoint);
}
[Test]
@@ -1292,7 +1292,7 @@
private static double[] GetLengthsBasedOnRelative(IEnumerable relativeLengths, IEnumerable lineGeometryPoints)
{
- double lineLength = Math2D.ConvertLinePointsToLineSegments(lineGeometryPoints).Sum(s => s.Length);
+ double lineLength = Math2D.ConvertPointsToLineSegments(lineGeometryPoints).Sum(s => s.Length);
return relativeLengths.Select(l => lineLength * l).ToArray();
}
Index: Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/FailureMechanismSectionsImporter.cs
===================================================================
diff -u -r09d20758dff97aed16e0d04399c803097eb1d28c -r38dd2d81eada00a5bcec11cb847e298aad9c83e6
--- Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/FailureMechanismSectionsImporter.cs (.../FailureMechanismSectionsImporter.cs) (revision 09d20758dff97aed16e0d04399c803097eb1d28c)
+++ Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/FailureMechanismSectionsImporter.cs (.../FailureMechanismSectionsImporter.cs) (revision 38dd2d81eada00a5bcec11cb847e298aad9c83e6)
@@ -316,7 +316,7 @@
private static IEnumerable GetLineSegments(IEnumerable linePoints)
{
- return Math2D.ConvertLinePointsToLineSegments(linePoints);
+ return Math2D.ConvertPointsToLineSegments(linePoints);
}
private static IEnumerable CreateFailureMechanismSectionsSnappedOnReferenceLine(IEnumerable orderedReadSections, IEnumerable splitResults)
Index: Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/ProfilesImporter.cs
===================================================================
diff -u -ra8744fa1e115c1317d15a3f5784474aacaf2227d -r38dd2d81eada00a5bcec11cb847e298aad9c83e6
--- Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/ProfilesImporter.cs (.../ProfilesImporter.cs) (revision a8744fa1e115c1317d15a3f5784474aacaf2227d)
+++ Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/ProfilesImporter.cs (.../ProfilesImporter.cs) (revision 38dd2d81eada00a5bcec11cb847e298aad9c83e6)
@@ -344,7 +344,7 @@
private static IEnumerable GetLineSegments(IEnumerable linePoints)
{
- return Math2D.ConvertLinePointsToLineSegments(linePoints);
+ return Math2D.ConvertPointsToPolygonSegments(linePoints);
}
}
}
\ No newline at end of file
Index: Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/StructuresImporter.cs
===================================================================
diff -u -rac96d7c315129af851634ed5a4a6800b59ede718 -r38dd2d81eada00a5bcec11cb847e298aad9c83e6
--- Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/StructuresImporter.cs (.../StructuresImporter.cs) (revision ac96d7c315129af851634ed5a4a6800b59ede718)
+++ Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/StructuresImporter.cs (.../StructuresImporter.cs) (revision 38dd2d81eada00a5bcec11cb847e298aad9c83e6)
@@ -410,7 +410,7 @@
private static IEnumerable GetLineSegments(IEnumerable linePoints)
{
- return Math2D.ConvertLinePointsToLineSegments(linePoints);
+ return Math2D.ConvertPointsToLineSegments(linePoints);
}
///
Index: Ringtoets/Common/src/Ringtoets.Common.IO/SurfaceLines/SurfaceLineExtensions.cs
===================================================================
diff -u -r83ac738ad69ef53eba6ca4f647657e5b7f024b96 -r38dd2d81eada00a5bcec11cb847e298aad9c83e6
--- Ringtoets/Common/src/Ringtoets.Common.IO/SurfaceLines/SurfaceLineExtensions.cs (.../SurfaceLineExtensions.cs) (revision 83ac738ad69ef53eba6ca4f647657e5b7f024b96)
+++ Ringtoets/Common/src/Ringtoets.Common.IO/SurfaceLines/SurfaceLineExtensions.cs (.../SurfaceLineExtensions.cs) (revision 38dd2d81eada00a5bcec11cb847e298aad9c83e6)
@@ -89,8 +89,8 @@
private static ReferenceLineIntersectionResult GetReferenceLineIntersections(ReferenceLine referenceLine, SurfaceLine surfaceLine)
{
- IEnumerable surfaceLineSegments = Math2D.ConvertLinePointsToLineSegments(surfaceLine.Points.Select(p => new Point2D(p.X, p.Y))).ToArray();
- IEnumerable referenceLineSegments = Math2D.ConvertLinePointsToLineSegments(referenceLine.Points).ToArray();
+ IEnumerable surfaceLineSegments = Math2D.ConvertPointsToLineSegments(surfaceLine.Points.Select(p => new Point2D(p.X, p.Y))).ToArray();
+ IEnumerable referenceLineSegments = Math2D.ConvertPointsToLineSegments(referenceLine.Points).ToArray();
return GetReferenceLineIntersectionsResult(surfaceLineSegments, referenceLineSegments);
}
Index: Ringtoets/Common/src/Ringtoets.Common.Util/SectionSegments.cs
===================================================================
diff -u -rfcad48d7beb394e1ac15cfe4289a7381e05aa883 -r38dd2d81eada00a5bcec11cb847e298aad9c83e6
--- Ringtoets/Common/src/Ringtoets.Common.Util/SectionSegments.cs (.../SectionSegments.cs) (revision fcad48d7beb394e1ac15cfe4289a7381e05aa883)
+++ Ringtoets/Common/src/Ringtoets.Common.Util/SectionSegments.cs (.../SectionSegments.cs) (revision 38dd2d81eada00a5bcec11cb847e298aad9c83e6)
@@ -47,7 +47,7 @@
throw new ArgumentNullException(nameof(section));
}
Section = section;
- segments = Math2D.ConvertLinePointsToLineSegments(section.Points);
+ segments = Math2D.ConvertPointsToLineSegments(section.Points);
}
///
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsFailureMechanismSectionResultDetailedAssessmentExtensions.cs
===================================================================
diff -u -rd8d1d5d4a3eabd84c2d6e07eedb75fa200c2d54e -r38dd2d81eada00a5bcec11cb847e298aad9c83e6
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsFailureMechanismSectionResultDetailedAssessmentExtensions.cs (.../MacroStabilityInwardsFailureMechanismSectionResultDetailedAssessmentExtensions.cs) (revision d8d1d5d4a3eabd84c2d6e07eedb75fa200c2d54e)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsFailureMechanismSectionResultDetailedAssessmentExtensions.cs (.../MacroStabilityInwardsFailureMechanismSectionResultDetailedAssessmentExtensions.cs) (revision 38dd2d81eada00a5bcec11cb847e298aad9c83e6)
@@ -143,7 +143,7 @@
throw new ArgumentNullException(nameof(calculationScenarios));
}
- IEnumerable lineSegments = Math2D.ConvertLinePointsToLineSegments(sectionResult.Section.Points);
+ IEnumerable lineSegments = Math2D.ConvertPointsToLineSegments(sectionResult.Section.Points);
return calculationScenarios
.Where(pc => pc.IsRelevant && pc.IsSurfaceLineIntersectionWithReferenceLineInSection(lineSegments));
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsStochasticSoilModelExtensions.cs
===================================================================
diff -u -r78382ec129ddc7537096860680cef36f3796700d -r38dd2d81eada00a5bcec11cb847e298aad9c83e6
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsStochasticSoilModelExtensions.cs (.../MacroStabilityInwardsStochasticSoilModelExtensions.cs) (revision 78382ec129ddc7537096860680cef36f3796700d)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsStochasticSoilModelExtensions.cs (.../MacroStabilityInwardsStochasticSoilModelExtensions.cs) (revision 38dd2d81eada00a5bcec11cb847e298aad9c83e6)
@@ -52,13 +52,13 @@
throw new ArgumentNullException(nameof(surfaceLine));
}
- Segment2D[] surfaceLineSegments = Math2D.ConvertLinePointsToLineSegments(surfaceLine.Points.Select(p => new Point2D(p.X, p.Y))).ToArray();
+ Segment2D[] surfaceLineSegments = Math2D.ConvertPointsToLineSegments(surfaceLine.Points.Select(p => new Point2D(p.X, p.Y))).ToArray();
return DoesSoilModelGeometryIntersectWithSurfaceLineGeometry(stochasticSoilModel, surfaceLineSegments);
}
private static bool DoesSoilModelGeometryIntersectWithSurfaceLineGeometry(MacroStabilityInwardsStochasticSoilModel stochasticSoilModel, Segment2D[] surfaceLineSegments)
{
- IEnumerable soilProfileGeometrySegments = Math2D.ConvertLinePointsToLineSegments(stochasticSoilModel.Geometry);
+ IEnumerable soilProfileGeometrySegments = Math2D.ConvertPointsToLineSegments(stochasticSoilModel.Geometry);
return soilProfileGeometrySegments.Any(s => DoesSegmentIntersectWithSegmentArray(s, surfaceLineSegments));
}
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Factories/MacroStabilityInwardsChartDataPointsFactory.cs
===================================================================
diff -u -rc9703bc7410fa04c7e81a19553b62eb704b1ff6c -r38dd2d81eada00a5bcec11cb847e298aad9c83e6
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Factories/MacroStabilityInwardsChartDataPointsFactory.cs (.../MacroStabilityInwardsChartDataPointsFactory.cs) (revision c9703bc7410fa04c7e81a19553b62eb704b1ff6c)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Factories/MacroStabilityInwardsChartDataPointsFactory.cs (.../MacroStabilityInwardsChartDataPointsFactory.cs) (revision 38dd2d81eada00a5bcec11cb847e298aad9c83e6)
@@ -576,8 +576,8 @@
double leftX = waternetZoneAsPolygon.Min(p => p.X);
double rightX = waternetZoneAsPolygon.Max(p => p.X);
- Segment2D[] surfaceLineSegments = Math2D.ConvertLinePointsToLineSegments(surfaceLineLocalGeometry).ToArray();
- Segment2D[] waternetZoneSegments = Math2D.ConvertLinePointsToLineSegments(waternetZoneAsPolygon).ToArray();
+ Segment2D[] surfaceLineSegments = Math2D.ConvertPointsToLineSegments(surfaceLineLocalGeometry).ToArray();
+ Segment2D[] waternetZoneSegments = Math2D.ConvertPointsToLineSegments(waternetZoneAsPolygon).ToArray();
var intersectionPoints = new List();
@@ -671,8 +671,8 @@
{
var areas = new List>();
- Segment2D[] phreaticLineSegments = Math2D.ConvertLinePointsToLineSegments(phreaticLineGeometry).ToArray();
- Segment2D[] waternetLineSegments = Math2D.ConvertLinePointsToLineSegments(waternetLineGeometry).ToArray();
+ Segment2D[] phreaticLineSegments = Math2D.ConvertPointsToLineSegments(phreaticLineGeometry).ToArray();
+ Segment2D[] waternetLineSegments = Math2D.ConvertPointsToLineSegments(waternetLineGeometry).ToArray();
var intersectionPoints = new List();
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Views/MacroStabilityInwardsCalculationsView.cs
===================================================================
diff -u -r1ab13c60f0a6168b2e959bc213d229d2c77af3b6 -r38dd2d81eada00a5bcec11cb847e298aad9c83e6
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Views/MacroStabilityInwardsCalculationsView.cs (.../MacroStabilityInwardsCalculationsView.cs) (revision 1ab13c60f0a6168b2e959bc213d229d2c77af3b6)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Views/MacroStabilityInwardsCalculationsView.cs (.../MacroStabilityInwardsCalculationsView.cs) (revision 38dd2d81eada00a5bcec11cb847e298aad9c83e6)
@@ -307,7 +307,7 @@
return;
}
- IEnumerable lineSegments = Math2D.ConvertLinePointsToLineSegments(failureMechanismSection.Points);
+ IEnumerable lineSegments = Math2D.ConvertPointsToLineSegments(failureMechanismSection.Points);
IEnumerable calculations = calculationGroup
.GetCalculations()
.OfType()
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Views/MacroStabilityInwardsScenariosView.cs
===================================================================
diff -u -reb4e08c0608aa4d157d50dba3fa4a85976eece20 -r38dd2d81eada00a5bcec11cb847e298aad9c83e6
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Views/MacroStabilityInwardsScenariosView.cs (.../MacroStabilityInwardsScenariosView.cs) (revision eb4e08c0608aa4d157d50dba3fa4a85976eece20)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Views/MacroStabilityInwardsScenariosView.cs (.../MacroStabilityInwardsScenariosView.cs) (revision 38dd2d81eada00a5bcec11cb847e298aad9c83e6)
@@ -174,7 +174,7 @@
return;
}
- IEnumerable lineSegments = Math2D.ConvertLinePointsToLineSegments(failureMechanismSection.Points);
+ IEnumerable lineSegments = Math2D.ConvertPointsToLineSegments(failureMechanismSection.Points);
IEnumerable calculations = calculationGroup
.GetCalculations()
.OfType()
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/MacroStabilityInwardsInputValidator.cs
===================================================================
diff -u -r99acd17eb8dec6f0b8957531699818576fba0343 -r38dd2d81eada00a5bcec11cb847e298aad9c83e6
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/MacroStabilityInwardsInputValidator.cs (.../MacroStabilityInwardsInputValidator.cs) (revision 99acd17eb8dec6f0b8957531699818576fba0343)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Service/MacroStabilityInwardsInputValidator.cs (.../MacroStabilityInwardsInputValidator.cs) (revision 38dd2d81eada00a5bcec11cb847e298aad9c83e6)
@@ -149,7 +149,7 @@
foreach (Point2D surfaceLinePoint in surfaceLineWithInterpolations)
{
bool isNear = IsPointNearSoilSegments(surfaceLinePoint,
- Math2D.ConvertLinePointsToClosingLineSegments(maximumYCoordinates));
+ Math2D.ConvertPointsToPolygonSegments(maximumYCoordinates));
if (!isNear)
{
return false;
@@ -198,7 +198,7 @@
private static IEnumerable GetSurfaceLineWithInterpolations(MacroStabilityInwardsInput inputParameters,
IEnumerable uniqueXs)
{
- Segment2D[] surfaceLineSegments = Math2D.ConvertLinePointsToLineSegments(inputParameters.SurfaceLine.LocalGeometry).ToArray();
+ Segment2D[] surfaceLineSegments = Math2D.ConvertPointsToLineSegments(inputParameters.SurfaceLine.LocalGeometry).ToArray();
foreach (double x in uniqueXs)
{
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsCalculationScenarioExtensionsTest.cs
===================================================================
diff -u -rd619624819b7200ac55b357b0a0c54d198fc20e4 -r38dd2d81eada00a5bcec11cb847e298aad9c83e6
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsCalculationScenarioExtensionsTest.cs (.../MacroStabilityInwardsCalculationScenarioExtensionsTest.cs) (revision d619624819b7200ac55b357b0a0c54d198fc20e4)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/MacroStabilityInwardsCalculationScenarioExtensionsTest.cs (.../MacroStabilityInwardsCalculationScenarioExtensionsTest.cs) (revision 38dd2d81eada00a5bcec11cb847e298aad9c83e6)
@@ -107,7 +107,7 @@
}
};
- IEnumerable lineSegments = Math2D.ConvertLinePointsToLineSegments(referenceLine.Points);
+ IEnumerable lineSegments = Math2D.ConvertPointsToLineSegments(referenceLine.Points);
// Call
TestDelegate call = () => calculation.IsSurfaceLineIntersectionWithReferenceLineInSection(lineSegments);
@@ -145,7 +145,7 @@
}
};
- IEnumerable lineSegments = Math2D.ConvertLinePointsToLineSegments(referenceLine.Points);
+ IEnumerable lineSegments = Math2D.ConvertPointsToLineSegments(referenceLine.Points);
// Call
bool intersects = calculation.IsSurfaceLineIntersectionWithReferenceLineInSection(lineSegments);
@@ -183,7 +183,7 @@
}
};
- IEnumerable lineSegments = Math2D.ConvertLinePointsToLineSegments(referenceLine.Points);
+ IEnumerable lineSegments = Math2D.ConvertPointsToLineSegments(referenceLine.Points);
// Call
bool intersects = calculation.IsSurfaceLineIntersectionWithReferenceLineInSection(lineSegments);
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/MacroStabilityInwardsInputValidatorTest.cs
===================================================================
diff -u -r17d32f6850a103cea1c89b73b08a4b4384201f85 -r38dd2d81eada00a5bcec11cb847e298aad9c83e6
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/MacroStabilityInwardsInputValidatorTest.cs (.../MacroStabilityInwardsInputValidatorTest.cs) (revision 17d32f6850a103cea1c89b73b08a4b4384201f85)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Service.Test/MacroStabilityInwardsInputValidatorTest.cs (.../MacroStabilityInwardsInputValidatorTest.cs) (revision 38dd2d81eada00a5bcec11cb847e298aad9c83e6)
@@ -630,17 +630,12 @@
{
new MacroStabilityInwardsSoilLayer2D(new Ring(new[]
{
- new Point2D(0.2, 0),
+ new Point2D(0.2, 10),
new Point2D(0.0, 10),
new Point2D(0.1, 20)
- })),
- new MacroStabilityInwardsSoilLayer2D(new Ring(new[]
- {
- new Point2D(0.0, 10.0),
- new Point2D(0.1, 20)
}))
}, new MacroStabilityInwardsPreconsolidationStress[0]))
- .SetName("SoilLayer X start- and endpoint on right side of surfaceline");
+ .SetName("SoilLayer X start and end point on right side of surfaceline");
yield return new TestCaseData(
new MacroStabilityInwardsSoilProfile2D(
@@ -652,14 +647,9 @@
new Point2D(0.1, 20),
new Point2D(0.2, 10),
new Point2D(0.0, 10)
- })),
- new MacroStabilityInwardsSoilLayer2D(new Ring(new[]
- {
- new Point2D(0.0, 10.0),
- new Point2D(0.1, 20)
}))
}, new MacroStabilityInwardsPreconsolidationStress[0]))
- .SetName("SoilLayer X start- and endpoint on left side of surfaceline");
+ .SetName("SoilLayer X start and end point on left side of surfaceline");
}
private static RoundedDouble GetTestNormativeAssessmentLevel()
Index: Ringtoets/Piping/src/Ringtoets.Piping.Data/PipingFailureMechanismSectionResultDetailedAssessmentExtensions.cs
===================================================================
diff -u -rd8d1d5d4a3eabd84c2d6e07eedb75fa200c2d54e -r38dd2d81eada00a5bcec11cb847e298aad9c83e6
--- Ringtoets/Piping/src/Ringtoets.Piping.Data/PipingFailureMechanismSectionResultDetailedAssessmentExtensions.cs (.../PipingFailureMechanismSectionResultDetailedAssessmentExtensions.cs) (revision d8d1d5d4a3eabd84c2d6e07eedb75fa200c2d54e)
+++ Ringtoets/Piping/src/Ringtoets.Piping.Data/PipingFailureMechanismSectionResultDetailedAssessmentExtensions.cs (.../PipingFailureMechanismSectionResultDetailedAssessmentExtensions.cs) (revision 38dd2d81eada00a5bcec11cb847e298aad9c83e6)
@@ -140,7 +140,7 @@
throw new ArgumentNullException(nameof(calculationScenarios));
}
- IEnumerable lineSegments = Math2D.ConvertLinePointsToLineSegments(sectionResult.Section.Points);
+ IEnumerable lineSegments = Math2D.ConvertPointsToLineSegments(sectionResult.Section.Points);
return calculationScenarios
.Where(pc => pc.IsRelevant && pc.IsSurfaceLineIntersectionWithReferenceLineInSection(lineSegments));
Index: Ringtoets/Piping/src/Ringtoets.Piping.Data/SoilProfile/PipingStochasticSoilModelExtensions.cs
===================================================================
diff -u -r42b0a40e019f6b36f83495fc46b13bac5971292f -r38dd2d81eada00a5bcec11cb847e298aad9c83e6
--- Ringtoets/Piping/src/Ringtoets.Piping.Data/SoilProfile/PipingStochasticSoilModelExtensions.cs (.../PipingStochasticSoilModelExtensions.cs) (revision 42b0a40e019f6b36f83495fc46b13bac5971292f)
+++ Ringtoets/Piping/src/Ringtoets.Piping.Data/SoilProfile/PipingStochasticSoilModelExtensions.cs (.../PipingStochasticSoilModelExtensions.cs) (revision 38dd2d81eada00a5bcec11cb847e298aad9c83e6)
@@ -53,7 +53,7 @@
throw new ArgumentNullException(nameof(surfaceLine));
}
- Segment2D[] surfaceLineSegments = Math2D.ConvertLinePointsToLineSegments(GetSurfaceLine2DGeometry(surfaceLine)).ToArray();
+ Segment2D[] surfaceLineSegments = Math2D.ConvertPointsToLineSegments(GetSurfaceLine2DGeometry(surfaceLine)).ToArray();
return DoesSoilModelGeometryIntersectWithSurfaceLineGeometry(stochasticSoilModel, surfaceLineSegments);
}
@@ -65,7 +65,7 @@
private static bool DoesSoilModelGeometryIntersectWithSurfaceLineGeometry(PipingStochasticSoilModel stochasticSoilModel,
Segment2D[] surfaceLineSegments)
{
- IEnumerable soilProfileGeometrySegments = Math2D.ConvertLinePointsToLineSegments(stochasticSoilModel.Geometry);
+ IEnumerable soilProfileGeometrySegments = Math2D.ConvertPointsToLineSegments(stochasticSoilModel.Geometry);
return soilProfileGeometrySegments.Any(s => DoesSegmentIntersectWithSegmentArray(s, surfaceLineSegments));
}
Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/Views/PipingCalculationsView.cs
===================================================================
diff -u -r1ab13c60f0a6168b2e959bc213d229d2c77af3b6 -r38dd2d81eada00a5bcec11cb847e298aad9c83e6
--- Ringtoets/Piping/src/Ringtoets.Piping.Forms/Views/PipingCalculationsView.cs (.../PipingCalculationsView.cs) (revision 1ab13c60f0a6168b2e959bc213d229d2c77af3b6)
+++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/Views/PipingCalculationsView.cs (.../PipingCalculationsView.cs) (revision 38dd2d81eada00a5bcec11cb847e298aad9c83e6)
@@ -325,7 +325,7 @@
return;
}
- IEnumerable lineSegments = Math2D.ConvertLinePointsToLineSegments(failureMechanismSection.Points);
+ IEnumerable lineSegments = Math2D.ConvertPointsToLineSegments(failureMechanismSection.Points);
IEnumerable pipingCalculations = calculationGroup
.GetCalculations()
.OfType()
Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/Views/PipingScenariosView.cs
===================================================================
diff -u -reb4e08c0608aa4d157d50dba3fa4a85976eece20 -r38dd2d81eada00a5bcec11cb847e298aad9c83e6
--- Ringtoets/Piping/src/Ringtoets.Piping.Forms/Views/PipingScenariosView.cs (.../PipingScenariosView.cs) (revision eb4e08c0608aa4d157d50dba3fa4a85976eece20)
+++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/Views/PipingScenariosView.cs (.../PipingScenariosView.cs) (revision 38dd2d81eada00a5bcec11cb847e298aad9c83e6)
@@ -183,7 +183,7 @@
return;
}
- IEnumerable lineSegments = Math2D.ConvertLinePointsToLineSegments(failureMechanismSection.Points);
+ IEnumerable lineSegments = Math2D.ConvertPointsToLineSegments(failureMechanismSection.Points);
IEnumerable pipingCalculations = calculationGroup
.GetCalculations()
.OfType()
Index: Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/PipingCalculationScenarioExtensionsTest.cs
===================================================================
diff -u -r99f686f22091051a65ff1ee20abd68ffad713647 -r38dd2d81eada00a5bcec11cb847e298aad9c83e6
--- Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/PipingCalculationScenarioExtensionsTest.cs (.../PipingCalculationScenarioExtensionsTest.cs) (revision 99f686f22091051a65ff1ee20abd68ffad713647)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/PipingCalculationScenarioExtensionsTest.cs (.../PipingCalculationScenarioExtensionsTest.cs) (revision 38dd2d81eada00a5bcec11cb847e298aad9c83e6)
@@ -110,7 +110,7 @@
}
};
- IEnumerable lineSegments = Math2D.ConvertLinePointsToLineSegments(referenceLine.Points);
+ IEnumerable lineSegments = Math2D.ConvertPointsToLineSegments(referenceLine.Points);
// Call
bool intersects = calculation.IsSurfaceLineIntersectionWithReferenceLineInSection(lineSegments);
@@ -148,7 +148,7 @@
}
};
- IEnumerable lineSegments = Math2D.ConvertLinePointsToLineSegments(referenceLine.Points);
+ IEnumerable lineSegments = Math2D.ConvertPointsToLineSegments(referenceLine.Points);
// Call
bool intersects = calculation.IsSurfaceLineIntersectionWithReferenceLineInSection(lineSegments);