Index: DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/SoilProfile2D.cs =================================================================== diff -u -r7060 -r7077 --- DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/SoilProfile2D.cs (.../SoilProfile2D.cs) (revision 7060) +++ DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/SoilProfile2D.cs (.../SoilProfile2D.cs) (revision 7077) @@ -1,4 +1,4 @@ -// Copyright (C) Stichting Deltares 2025. All rights reserved. +// Copyright (C) Stichting Deltares 2026. All rights reserved. // // This file is part of the Dam Engine. // @@ -168,7 +168,7 @@ { return null; } - + return DetermineOldSurfaceFromTestPoint(oldSurfaces, point); } @@ -190,17 +190,6 @@ return false; } - - /// - /// Returns a that represents this instance. - /// - /// - /// A that represents this instance. - /// - public override string ToString() - { - return Name; - } /// /// Determine the old surface from the test point. @@ -213,7 +202,7 @@ foreach (SoilLayer2D oldSurface in oldSurfaces) { GeometryLoop outerLoop = oldSurface.GeometrySurface.OuterLoop; - if (outerLoop != null && outerLoop.CurveList.Count > 2 && + if (outerLoop != null && outerLoop.CurveList.Count > 2 && Routines2D.CheckIfPointIsInPolygon(outerLoop, point.X, point.Z) == PointInPolygon.InsidePolygon) { var isPointInOuterLoopOfOldSurface = true; @@ -232,9 +221,21 @@ } } } + return null; } - + + /// + /// Returns a that represents this instance. + /// + /// + /// A that represents this instance. + /// + public override string ToString() + { + return Name; + } + private static double DetermineXminFromSurfaces(IEnumerable oldSurfaces) { var xminFromSurfaces = double.MaxValue; @@ -272,12 +273,13 @@ soilProfile.BottomLevel = detector.LayerList[detector.LayerList.Count - 1].EndPoint.Z; for (var i = 0; i < detector.LayerList.Count; i++) { - bool isHolePresentBeforeLayer = (i > 0) && (Math.Abs(detector.LayerList[i].StartPoint.Z - detector.LayerList[i -1].EndPoint.Z) > 1e-3); + bool isHolePresentBeforeLayer = (i > 0) && (Math.Abs(detector.LayerList[i].StartPoint.Z - detector.LayerList[i - 1].EndPoint.Z) > 1e-3); if (isHolePresentBeforeLayer) { var emptyLayer = new SoilLayer1D(null, detector.LayerList[i - 1].EndPoint.Z); soilProfile.Layers.Add(emptyLayer); } + var layer = new SoilLayer1D(detector.LayerList[i].Soil, detector.LayerList[i].StartPoint.Z) { IsAquifer = detector.LayerList[i].IsAquifer,