Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/SurfaceLineAdapter.cs =================================================================== diff -u -r1965 -r2791 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/SurfaceLineAdapter.cs (.../SurfaceLineAdapter.cs) (revision 1965) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/SurfaceLineAdapter.cs (.../SurfaceLineAdapter.cs) (revision 2791) @@ -67,19 +67,22 @@ protected double trafficLoadWidth; protected bool hasTrafficLoad; protected bool isTrafficLoadOnCrest = false; + protected double polderLevel; const double offset = 100.0; /// /// Constructor /// /// /// - protected SurfaceLineAdapter(SurfaceLine2 surfaceLine, Location location) + /// + protected SurfaceLineAdapter(SurfaceLine2 surfaceLine, Location location, double scenarioPolderLevel) { ThrowWhenSurfaceLineIsNull(surfaceLine); ThrowWhenSurfaceLineDoesNotSatisfyToSpecification(surfaceLine); this.surfaceLine = surfaceLine.FullDeepClone(); - this.Location = location; + Location = location; + polderLevel = scenarioPolderLevel; RetainTrafficLoad(); } @@ -412,7 +415,7 @@ res.XAtDike = xDitchDike; res.ZAtDike = surfaceLine.Geometry.GetZatX(res.XAtDike); // Depth of the ditch is defined towards PolderLevel - res.ZBottom = Location.PolderLevel - Location.NewDepthDitch; + res.ZBottom = polderLevel - Location.NewDepthDitch; res.XBottomAtDike = xDitchDike + (res.ZAtDike - res.ZBottom)*Location.NewSlopeAngleDitch; res.XBottomAtPolder = res.XBottomAtDike + Location.NewWidthDitchBottom; var line = new Line