Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Service/HeightStructuresCalculationActivity.cs =================================================================== diff -u -re69acb9595f7bf1d202ddd1fb51934b66768b75d -r5dcbf2204ef1f29a353b60657e0cb830db7af73b --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Service/HeightStructuresCalculationActivity.cs (.../HeightStructuresCalculationActivity.cs) (revision e69acb9595f7bf1d202ddd1fb51934b66768b75d) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Service/HeightStructuresCalculationActivity.cs (.../HeightStructuresCalculationActivity.cs) (revision 5dcbf2204ef1f29a353b60657e0cb830db7af73b) @@ -20,10 +20,11 @@ // All rights reserved. using System; -using System.Linq; using Core.Common.Base.Service; using Ringtoets.Common.Data.AssessmentSection; +using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.HeightStructures.Data; +using Ringtoets.HeightStructures.Utils; using Ringtoets.HydraRing.Calculation.Activities; namespace Ringtoets.HeightStructures.Service @@ -86,15 +87,15 @@ { HeightStructuresDataSynchronizationService.ClearCalculationOutput(calculation); - var failureMechanismSection = failureMechanism.Sections.First(); // TODO: Obtain dike section based on cross section of structure with reference line + FailureMechanismSection failureMechanismSection = + HeightStructuresHelper.FailureMechanismSectionForCalculation(failureMechanism.Sections, calculation); calculationService.Calculate(calculation, assessmentSection, failureMechanismSection, failureMechanism.GeneralInput, failureMechanism.Contribution, hlcdDirectory); - } protected override void OnCancel() Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Service/Ringtoets.HeightStructures.Service.csproj =================================================================== diff -u -r1795be9025cb0e054dca86a5275203966c0a9b2a -r5dcbf2204ef1f29a353b60657e0cb830db7af73b --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Service/Ringtoets.HeightStructures.Service.csproj (.../Ringtoets.HeightStructures.Service.csproj) (revision 1795be9025cb0e054dca86a5275203966c0a9b2a) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Service/Ringtoets.HeightStructures.Service.csproj (.../Ringtoets.HeightStructures.Service.csproj) (revision 5dcbf2204ef1f29a353b60657e0cb830db7af73b) @@ -94,6 +94,11 @@ Ringtoets.HeightStructures.Data False + + {0FD0C7E1-E712-48D1-91AB-FBC78461FD76} + Ringtoets.HeightStructures.Utils + False + Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationContextTreeNodeInfoTest.cs =================================================================== diff -u -r6b9fda141298524c0910937dd090d82be420c52b -r5dcbf2204ef1f29a353b60657e0cb830db7af73b --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationContextTreeNodeInfoTest.cs) (revision 6b9fda141298524c0910937dd090d82be420c52b) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationContextTreeNodeInfoTest.cs) (revision 5dcbf2204ef1f29a353b60657e0cb830db7af73b) @@ -603,7 +603,10 @@ Output = new ProbabilityAssessmentOutput(double.NaN, double.NaN, double.NaN, double.NaN, double.NaN), InputParameters = { - HydraulicBoundaryLocation = hydraulicBoundaryLocation + HydraulicBoundaryLocation = hydraulicBoundaryLocation, + HeightStructure = new HeightStructure("test", "1", new Point2D(1.1, 2.2), + 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, + 0.8, 0.9, 0.11, 0.12, 0.13, 0.14, 0.15) } }; Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs =================================================================== diff -u -rc3c2bba57ff003c569aefa73e42ac6122fcf5bfa -r5dcbf2204ef1f29a353b60657e0cb830db7af73b --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision c3c2bba57ff003c569aefa73e42ac6122fcf5bfa) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision 5dcbf2204ef1f29a353b60657e0cb830db7af73b) @@ -806,15 +806,19 @@ failureMechanism.AddSection(new FailureMechanismSection("A", new[] { - new Point2D(0, 0) + new Point2D(0, 0), + new Point2D(2, 2) })); failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation { Name = "A", InputParameters = { - HydraulicBoundaryLocation = new HydraulicBoundaryLocation(-1, "nonExisting", 1, 2) + HydraulicBoundaryLocation = new HydraulicBoundaryLocation(-1, "nonExisting", 1, 2), + HeightStructure = new HeightStructure("test", "1", new Point2D(1.1, 2.2), + 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, + 0.8, 0.9, 0.11, 0.12, 0.13, 0.14, 0.15) } }); @@ -823,7 +827,10 @@ Name = "B", InputParameters = { - HydraulicBoundaryLocation = new HydraulicBoundaryLocation(-1, "nonExisting", 1, 2) + HydraulicBoundaryLocation = new HydraulicBoundaryLocation(-1, "nonExisting", 1, 2), + HeightStructure = new HeightStructure("test", "1", new Point2D(1.1, 2.2), + 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, + 0.8, 0.9, 0.11, 0.12, 0.13, 0.14, 0.15) } }); Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresFailureMechanismContextTreeNodeInfoTest.cs =================================================================== diff -u -r2f94a4a9a4058aa718129ba8d399e5944a994070 -r5dcbf2204ef1f29a353b60657e0cb830db7af73b --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresFailureMechanismContextTreeNodeInfoTest.cs (.../HeightStructuresFailureMechanismContextTreeNodeInfoTest.cs) (revision 2f94a4a9a4058aa718129ba8d399e5944a994070) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresFailureMechanismContextTreeNodeInfoTest.cs (.../HeightStructuresFailureMechanismContextTreeNodeInfoTest.cs) (revision 5dcbf2204ef1f29a353b60657e0cb830db7af73b) @@ -722,7 +722,8 @@ var section = new FailureMechanismSection("A", new[] { - new Point2D(0, 0) + new Point2D(0, 0), + new Point2D(2, 2) }); failureMechanism.AddSection(section); @@ -731,15 +732,21 @@ Name = "A", InputParameters = { - HydraulicBoundaryLocation = new HydraulicBoundaryLocation(-1, "nonExisting", 1, 2) + HydraulicBoundaryLocation = new HydraulicBoundaryLocation(-1, "nonExisting", 1, 2), + HeightStructure = new HeightStructure("test", "1", new Point2D(1.1, 2.2), + 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, + 0.8, 0.9, 0.11, 0.12, 0.13, 0.14, 0.15) } }); failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation { Name = "B", InputParameters = { - HydraulicBoundaryLocation = new HydraulicBoundaryLocation(-1, "nonExisting", 1, 2) + HydraulicBoundaryLocation = new HydraulicBoundaryLocation(-1, "nonExisting", 1, 2), + HeightStructure = new HeightStructure("test", "1", new Point2D(1.1, 2.2), + 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, + 0.8, 0.9, 0.11, 0.12, 0.13, 0.14, 0.15) } }); Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Integration.Test/HeightStructuresCalculationActivityIntegrationTest.cs =================================================================== diff -u -rc3c2bba57ff003c569aefa73e42ac6122fcf5bfa -r5dcbf2204ef1f29a353b60657e0cb830db7af73b --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Integration.Test/HeightStructuresCalculationActivityIntegrationTest.cs (.../HeightStructuresCalculationActivityIntegrationTest.cs) (revision c3c2bba57ff003c569aefa73e42ac6122fcf5bfa) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Integration.Test/HeightStructuresCalculationActivityIntegrationTest.cs (.../HeightStructuresCalculationActivityIntegrationTest.cs) (revision 5dcbf2204ef1f29a353b60657e0cb830db7af73b) @@ -146,7 +146,10 @@ { InputParameters = { - HydraulicBoundaryLocation = assessmentSection.HydraulicBoundaryDatabase.Locations.First(hl => hl.Id == 1300001) + HydraulicBoundaryLocation = assessmentSection.HydraulicBoundaryDatabase.Locations.First(hl => hl.Id == 1300001), + HeightStructure = new HeightStructure("test", "1", new Point2D(1.1, 2.2), + 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, + 0.8, 0.9, 0.11, 0.12, 0.13, 0.14, 0.15) } }; @@ -195,7 +198,10 @@ { InputParameters = { - HydraulicBoundaryLocation = new HydraulicBoundaryLocation(1, "test", 1, 1) + HydraulicBoundaryLocation = new HydraulicBoundaryLocation(1, "test", 1, 1), + HeightStructure = new HeightStructure("test", "1", new Point2D(1.1, 2.2), + 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, + 0.8, 0.9, 0.11, 0.12, 0.13, 0.14, 0.15) } }; @@ -248,7 +254,10 @@ { InputParameters = { - HydraulicBoundaryLocation = assessmentSection.HydraulicBoundaryDatabase.Locations.First(hl => hl.Id == 1300001) + HydraulicBoundaryLocation = assessmentSection.HydraulicBoundaryDatabase.Locations.First(hl => hl.Id == 1300001), + HeightStructure = new HeightStructure("test", "1", new Point2D(1.1, 2.2), + 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, + 0.8, 0.9, 0.11, 0.12, 0.13, 0.14, 0.15) } }; @@ -295,7 +304,10 @@ { InputParameters = { - HydraulicBoundaryLocation = new HydraulicBoundaryLocation(1, "test", 1, 1) + HydraulicBoundaryLocation = new HydraulicBoundaryLocation(1, "test", 1, 1), + HeightStructure = new HeightStructure("test", "1", new Point2D(1.1, 2.2), + 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, + 0.8, 0.9, 0.11, 0.12, 0.13, 0.14, 0.15) } };