Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityInwards/MacroStabilityInwardsKernelWrapperTests.cs =================================================================== diff -u -r3239 -r3248 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityInwards/MacroStabilityInwardsKernelWrapperTests.cs (.../MacroStabilityInwardsKernelWrapperTests.cs) (revision 3239) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityInwards/MacroStabilityInwardsKernelWrapperTests.cs (.../MacroStabilityInwardsKernelWrapperTests.cs) (revision 3248) @@ -280,7 +280,7 @@ Assert.IsNotNull(outputString); var output = DamXmlSerialization.LoadOutputFromXmlString(outputString); Assert.IsNotNull(output.Results.CalculationResults, "No results available"); - Assert.AreEqual(1.494, output.Results.CalculationResults[0].StabilityDesignResults.SafetyFactor, 0.001); + Assert.AreEqual(1.636, output.Results.CalculationResults[0].StabilityDesignResults.SafetyFactor, 0.001); } [Test] Index: DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/SoilSurfaceProfile.cs =================================================================== diff -u -r3247 -r3248 --- DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/SoilSurfaceProfile.cs (.../SoilSurfaceProfile.cs) (revision 3247) +++ DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/SoilSurfaceProfile.cs (.../SoilSurfaceProfile.cs) (revision 3248) @@ -472,7 +472,10 @@ // The last area needs to be added manually enclosedAreas.Add(currentArea); - return enclosedAreas.Select(a => CreateLayerData(a, soilLayer)).ToArray(); + + return enclosedAreas.Where(area => area.Coordinates.Any()) + .Select(a => CreateLayerData(a, soilLayer)) + .ToArray(); } private static LayerData CreateLayerData(EnclosedArea area, SoilLayer1D soilLayer) @@ -626,8 +629,6 @@ BuildGeometryModel(Geometry, layerData, originalSoilProfile1D, surfaceLine2); BuildSoilLayer2D(Surfaces, layerData, Geometry); -// // Assign soil materials to the surfaces -// // if (originalSoilProfile1D != null) // { // soilProfile = (SoilProfile1D)originalSoilProfile1D.Clone(); @@ -644,12 +645,12 @@ /// /// The collection of . /// The . - /// + /// A collection of unique x coordinates, in an ascending order. /// This function is necessary, because the algorithm in recognizing /// surfaces requires that curves are overlapping. Curves cannot be a subset (e.g, there is one /// curve definition that span two other curves, because the algorithm will not /// be able to determine a surface from it. - private IEnumerable GetXCoordinates(IEnumerable soilLayers, SurfaceLine2 surfaceLine) + private static IEnumerable GetXCoordinates(IEnumerable soilLayers, SurfaceLine2 surfaceLine) { var xCoordinates = new List(surfaceLine.Geometry.CalcPoints.Select(p => p.X));