Index: Ringtoets/Common/src/Ringtoets.Common.Utils/Ringtoets.Common.Utils.csproj =================================================================== diff -u -re8c8982fcfccf1206ef2569cbd1f9bc69be25bae -r721d6f7ac6513e2219ff9bc652f3d6059061a009 --- Ringtoets/Common/src/Ringtoets.Common.Utils/Ringtoets.Common.Utils.csproj (.../Ringtoets.Common.Utils.csproj) (revision e8c8982fcfccf1206ef2569cbd1f9bc69be25bae) +++ Ringtoets/Common/src/Ringtoets.Common.Utils/Ringtoets.Common.Utils.csproj (.../Ringtoets.Common.Utils.csproj) (revision 721d6f7ac6513e2219ff9bc652f3d6059061a009) @@ -39,13 +39,27 @@ Properties\GlobalAssembly.cs + + Copying.licenseheader + + + {3BBFD65B-B277-4E50-AE6D-BD24C3434609} + Core.Common.Base + False + + + {D4200F43-3F72-4F42-AF0A-8CED416A38EC} + Ringtoets.Common.Data + False + + + + + + \ No newline at end of file Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Utils/GrassCoverErosionInwardsHelper.cs =================================================================== diff -u -r02670d8c9fceeaea5f829937a2eb269f3488c6b1 -r721d6f7ac6513e2219ff9bc652f3d6059061a009 --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Utils/GrassCoverErosionInwardsHelper.cs (.../GrassCoverErosionInwardsHelper.cs) (revision 02670d8c9fceeaea5f829937a2eb269f3488c6b1) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Utils/GrassCoverErosionInwardsHelper.cs (.../GrassCoverErosionInwardsHelper.cs) (revision 721d6f7ac6513e2219ff9bc652f3d6059061a009) @@ -22,8 +22,8 @@ using System; using System.Collections.Generic; using System.Linq; -using Core.Common.Base.Geometry; using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Common.Utils; using Ringtoets.GrassCoverErosionInwards.Data; namespace Ringtoets.GrassCoverErosionInwards.Utils @@ -57,7 +57,7 @@ throw new ArgumentNullException("calculations"); } - SectionSegments[] sectionSegments = MakeSectionSegments(sections); + SectionSegments[] sectionSegments = SectionSegmentsHelper.MakeSectionSegments(sections); var calculationsPerSegment = new Dictionary>(); @@ -96,16 +96,11 @@ throw new ArgumentNullException("calculation"); } - SectionSegments[] sectionSegments = MakeSectionSegments(sections); + SectionSegments[] sectionSegments = SectionSegmentsHelper.MakeSectionSegments(sections); return FindSectionForCalculation(sectionSegments, calculation); } - private static SectionSegments[] MakeSectionSegments(IEnumerable sectionResults) - { - return sectionResults.Select(s => new SectionSegments(s)).ToArray(); - } - private static FailureMechanismSection FindSectionForCalculation(SectionSegments[] sectionSegmentsCollection, GrassCoverErosionInwardsCalculation calculation) { var dikeProfile = calculation.InputParameters.DikeProfile; @@ -138,39 +133,5 @@ } calculationsPerSegment[sectionName].Add(calculation); } - - /// - /// This class represents the geometry of a as a collection of objects. - /// - private class SectionSegments - { - private readonly IEnumerable segments; - - /// - /// Creates a new instance of . - /// - /// The whose - /// this class represents as a collection of objects. - public SectionSegments(FailureMechanismSection section) - { - Section = section; - segments = Math2D.ConvertLinePointsToLineSegments(section.Points); - } - - /// - /// Gets the . - /// - public FailureMechanismSection Section { get; private set; } - - /// - /// Calculate the Euclidean distance between the and a . - /// - /// The . - /// The Euclidean distance as a . - public double Distance(Point2D point) - { - return segments.Min(segment => segment.GetEuclideanDistanceToPoint(point)); - } - } } } \ No newline at end of file Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Utils/Ringtoets.GrassCoverErosionInwards.Utils.csproj =================================================================== diff -u -r1795be9025cb0e054dca86a5275203966c0a9b2a -r721d6f7ac6513e2219ff9bc652f3d6059061a009 --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Utils/Ringtoets.GrassCoverErosionInwards.Utils.csproj (.../Ringtoets.GrassCoverErosionInwards.Utils.csproj) (revision 1795be9025cb0e054dca86a5275203966c0a9b2a) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Utils/Ringtoets.GrassCoverErosionInwards.Utils.csproj (.../Ringtoets.GrassCoverErosionInwards.Utils.csproj) (revision 721d6f7ac6513e2219ff9bc652f3d6059061a009) @@ -54,6 +54,11 @@ Ringtoets.Common.Data False + + {6A074D65-A81C-4C1C-8E24-F36C916E4ED7} + Ringtoets.Common.Utils + False + {90DE728E-48EF-4665-AB38-3D88E41D9F4D} Ringtoets.GrassCoverErosionInwards.Data