Index: Demo/Ringtoets/src/Demo.Ringtoets/Commands/AddNewDemoAssessmentSectionCommand.cs =================================================================== diff -u -rf27092df1f897798c4a0b24f6fc91f49c9f294ce -r6bb7ea5908ee78a9185a1ed8346c99f4c6b763e0 --- Demo/Ringtoets/src/Demo.Ringtoets/Commands/AddNewDemoAssessmentSectionCommand.cs (.../AddNewDemoAssessmentSectionCommand.cs) (revision f27092df1f897798c4a0b24f6fc91f49c9f294ce) +++ Demo/Ringtoets/src/Demo.Ringtoets/Commands/AddNewDemoAssessmentSectionCommand.cs (.../AddNewDemoAssessmentSectionCommand.cs) (revision 6bb7ea5908ee78a9185a1ed8346c99f4c6b763e0) @@ -28,6 +28,7 @@ using Core.Common.Controls.Commands; using Core.Common.Gui; using Core.Common.Utils.IO; +using Ringtoets.ClosingStructures.Data; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.Probabilistics; @@ -87,10 +88,12 @@ InitializeGrassCoverErosionInwardsData(demoAssessmentSection); InitializeGrassCoverErosionOutwardsData(demoAssessmentSection); InitializeHeightStructuresData(demoAssessmentSection); + InitializeClosingStructuresData(demoAssessmentSection); InitializeDemoPipingData(demoAssessmentSection); InitializeStabilityPointStructuresData(demoAssessmentSection); InitializeStabilityStoneCoverData(demoAssessmentSection); InitializeWaveImpactAsphaltCoverData(demoAssessmentSection); + return demoAssessmentSection; } @@ -243,12 +246,56 @@ private static HeightStructure CreateDemoHeightStructure() { - return new HeightStructure("KUNST1", "KUNST1", new Point2D(12345.56789, 9876.54321), - 45.0, 5.9, 0.01, 18.5, 0.05, 0.1, 1.5, 4.0, 0.05, 1.0, 50000.0, 0.02, 6.5, 0.1); + return new HeightStructure("KUNST1", "KUNST1", + new Point2D(12345.56789, 9876.54321), + 10.0, + 4.95, 0.05, + 25.0, 0.05, + 0.1, 0.15, + 21.0, 0.05, + 1.0, + 20000.0, 0.1, + 0.2, 0.1); } #endregion + #region ClosingStructuresFailureMechanism + + private static void InitializeClosingStructuresData(AssessmentSection demoAssessmentSection) + { + ClosingStructuresFailureMechanism failureMechanism = demoAssessmentSection.ClosingStructures; + failureMechanism.ClosingStructures.Add(CreateDemoClosingStructure()); + + var calculation = new ClosingStructuresCalculation(); + failureMechanism.CalculationsGroup.Children.Add(calculation); + calculation.InputParameters.HydraulicBoundaryLocation = demoAssessmentSection.HydraulicBoundaryDatabase.Locations.First(hl => hl.Id == 1300001); + calculation.InputParameters.NotifyObservers(); + } + + private static ClosingStructure CreateDemoClosingStructure() + { + return new ClosingStructure("KUNST1", "KUNST1", + new Point2D(12345.56789, 9876.54321), + 20000, 0.1, + 0.2, 0.1, + 10.0, + 21, 0.05, + 4.95, 0.05, + 0.5, 0.1, + 4.95, 0.1, + 31.5, 0.01, + 1.0, 0.15, + 25.0, 0.05, + 1.0, + 0.1, + 4, + 1.0, + ClosingStructureType.VerticalWall); + } + + #endregion + #region PipingFailureMechanism private void InitializeDemoPipingData(AssessmentSection demoAssessmentSection)