Index: DamEngine/trunk/src/Deltares.DamEngine.TestHelpers/Factories/FactoryForSoilProfiles.cs =================================================================== diff -u -r5083 -r5102 --- DamEngine/trunk/src/Deltares.DamEngine.TestHelpers/Factories/FactoryForSoilProfiles.cs (.../FactoryForSoilProfiles.cs) (revision 5083) +++ DamEngine/trunk/src/Deltares.DamEngine.TestHelpers/Factories/FactoryForSoilProfiles.cs (.../FactoryForSoilProfiles.cs) (revision 5102) @@ -1084,12 +1084,6 @@ /// public static SoilProfile2D CreateSoilProfile2DWithSixSurfacesFormingTwoLayers() { - SoilLayer2D soilLayer1 = CreateRectangularSoilLayer2D(10, 0, -50, -20, "Surface 1"); - SoilLayer2D soilLayer2 = CreateRectangularSoilLayer2D(10, 0, -20, 0, "Surface 2"); - SoilLayer2D soilLayer3 = CreateRectangularSoilLayer2D(10, 0, 0, 60, "Surface 3"); - SoilLayer2D soilLayer4 = CreateRectangularSoilLayer2D(0, -15, -50, -10, "Surface 4"); - SoilLayer2D soilLayer5 = CreateRectangularSoilLayer2D(0, -15, -10, 35, "Surface 5"); - SoilLayer2D soilLayer6 = CreateRectangularSoilLayer2D(0, -15, 35, 60, "Surface 6"); var soilProfile2D = new SoilProfile2D { Geometry = new GeometryData @@ -1099,12 +1093,28 @@ Bottom = -15 } }; + + SoilLayer2D soilLayer1 = CreateRectangularSoilLayer2D(10, 0, -50, -20, "Surface 1", soilProfile2D); + SoilLayer2D soilLayer2 = CreateRectangularSoilLayer2D(10, 0, -20, 0, "Surface 2", soilProfile2D); + SoilLayer2D soilLayer3 = CreateRectangularSoilLayer2D(10, 0, 0, 60, "Surface 3", soilProfile2D); + SoilLayer2D soilLayer4 = CreateRectangularSoilLayer2D(0, -15, -50, -10, "Surface 4", soilProfile2D); + SoilLayer2D soilLayer5 = CreateRectangularSoilLayer2D(0, -15, -10, 35, "Surface 5", soilProfile2D); + SoilLayer2D soilLayer6 = CreateRectangularSoilLayer2D(0, -15, 35, 60, "Surface 6", soilProfile2D); + soilProfile2D.Surfaces.Add(soilLayer1); soilProfile2D.Surfaces.Add(soilLayer2); soilProfile2D.Surfaces.Add(soilLayer3); soilProfile2D.Surfaces.Add(soilLayer4); soilProfile2D.Surfaces.Add(soilLayer5); soilProfile2D.Surfaces.Add(soilLayer6); + + soilProfile2D.Geometry.Surfaces.Add(soilLayer1.GeometrySurface); + soilProfile2D.Geometry.Surfaces.Add(soilLayer2.GeometrySurface); + soilProfile2D.Geometry.Surfaces.Add(soilLayer3.GeometrySurface); + soilProfile2D.Geometry.Surfaces.Add(soilLayer4.GeometrySurface); + soilProfile2D.Geometry.Surfaces.Add(soilLayer5.GeometrySurface); + soilProfile2D.Geometry.Surfaces.Add(soilLayer6.GeometrySurface); + return soilProfile2D; } @@ -1120,13 +1130,29 @@ return id; } - public static SoilLayer2D CreateRectangularSoilLayer2D(double topCoord, double bottomCoord, double leftCoord, double rightCoord, string soilName) + public static SoilLayer2D CreateRectangularSoilLayer2D(double topCoord, double bottomCoord, double leftCoord, double rightCoord, string soilName, SoilProfile2D soilProfile2D = null) { var topLeftPoint = new Point2D(leftCoord, topCoord); var topRightPoint = new Point2D(rightCoord, topCoord); var bottomRightPoint = new Point2D(rightCoord, bottomCoord); var bottomLeftPoint = new Point2D(leftCoord, bottomCoord); + var curve1 = new GeometryCurve(topLeftPoint, topRightPoint); + var curve2 = new GeometryCurve(topRightPoint, bottomRightPoint); + var curve3 = new GeometryCurve(bottomRightPoint, bottomLeftPoint); + var curve4 = new GeometryCurve(bottomLeftPoint, topLeftPoint); + if (soilProfile2D != null) + { + soilProfile2D.Geometry.Points.Add(topLeftPoint); + soilProfile2D.Geometry.Points.Add(topRightPoint); + soilProfile2D.Geometry.Points.Add(bottomRightPoint); + soilProfile2D.Geometry.Points.Add(bottomLeftPoint); + soilProfile2D.Geometry.Curves.Add(curve1); + soilProfile2D.Geometry.Curves.Add(curve2); + soilProfile2D.Geometry.Curves.Add(curve3); + soilProfile2D.Geometry.Curves.Add(curve4); + } + return new SoilLayer2D { GeometrySurface = new GeometrySurface @@ -1135,10 +1161,10 @@ { CurveList = { - new GeometryCurve(topLeftPoint, topRightPoint), - new GeometryCurve(topRightPoint, bottomRightPoint), - new GeometryCurve(bottomRightPoint, bottomLeftPoint), - new GeometryCurve(bottomLeftPoint, topLeftPoint) + curve1, + curve2, + curve3, + curve4 } } },