Index: dam engine/trunk/src/Deltares.DamEngine.Interface/FillDamFromXmlInput.cs =================================================================== diff -u -r441 -r445 --- dam engine/trunk/src/Deltares.DamEngine.Interface/FillDamFromXmlInput.cs (.../FillDamFromXmlInput.cs) (revision 441) +++ dam engine/trunk/src/Deltares.DamEngine.Interface/FillDamFromXmlInput.cs (.../FillDamFromXmlInput.cs) (revision 445) @@ -5,6 +5,7 @@ using System.Threading.Tasks; using Deltares.DamEngine.Data.General; using Deltares.DamEngine.Io.XmlInput; +using Location = Deltares.DamEngine.Data.General.Location; namespace Deltares.DamEngine.Interface { @@ -17,6 +18,35 @@ { var damProjectData = new DamProjectData(); damProjectData.DamProjectType = ConversionHelper.ConvertToDamProjectType(input.DamProjectType); + + damProjectData.Dike = new Dike(); + for (int i = 0; i < input.Locations.Length; i++) + { + var location = new Location(); + var inputLocation = input.Locations[i]; + var waternetOptions = inputLocation.WaternetOptions; + location.ModelParametersForPLLines.PLLineCreationMethod = ConversionHelper.ConvertToPhreaticLineCreationMethod(waternetOptions.PhreaticLineCreationMethod); + location.IntrusionVerticalWaterPressure = ConversionHelper.ConvertToIntrusionVerticalWaterPressure(waternetOptions.IntrusionVerticalWaterPressure); + location.PolderLevel = waternetOptions.PolderLevel; + location.ModelParametersForPLLines.DampingFactorPL4 = waternetOptions.DampingFactorPL3; + location.ModelParametersForPLLines.DampingFactorPL3 = waternetOptions.DampingFactorPL4; + location.ModelParametersForPLLines.PenetrationLength = waternetOptions.PenetrationLength; + location.PlLineOffsetBelowDikeCrestMiddle = (waternetOptions.Pl1BelowCrestMiddleSpecified ? (double?) waternetOptions.Pl1BelowCrestMiddle : null); + location.UsePlLineOffsetFactorBelowShoulderCrest = waternetOptions.Pl1FactorBelowShoulderCrestSpecified; + location.PlLineOffsetFactorBelowShoulderCrest = waternetOptions.Pl1FactorBelowShoulderCrest; + location.PlLineOffsetDryBelowDikeCrestMiddle = (waternetOptions.DryPl1BelowCrestMiddleSpecified ? (double?) waternetOptions.DryPl1BelowCrestMiddle : null); + location.UsePlLineOffsetDryFactorBelowShoulderCrest = waternetOptions.DryPl1FactorBelowShoulderCrestSpecified; + location.PlLineOffsetDryFactorBelowShoulderCrest = waternetOptions.DryPl1FactorBelowShoulderCrest; + location.HeadPl2 = (waternetOptions.HeadPl2Specified ? (double?)waternetOptions.HeadPl2 : null); + location.HeadPl3 = (waternetOptions.HeadPl3Specified ? (double?)waternetOptions.HeadPl3 : null); + location.HeadPl4 = (waternetOptions.HeadPl4Specified ? (double?)waternetOptions.HeadPl4 : null); + location.SlopeDampingPiezometricHeightPolderSide = waternetOptions.SlopeDampingFactor; + location.PlLineOffsetBelowDikeTopAtRiver = waternetOptions.Pl1BelowCrestRiverside; + location.PlLineOffsetBelowDikeTopAtPolder = waternetOptions.Pl1BelowCrestPolderside; + location.PlLineOffsetBelowShoulderBaseInside = waternetOptions.Pl1BelowShoulderCrestPolderside; + location.PlLineOffsetBelowDikeToeAtPolder = waternetOptions.Pl1BelowToeDikePolderside; + damProjectData.Dike.Locations.Add(location); + } return damProjectData; }