Index: DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/LayerDetector.cs =================================================================== diff -u -r6404 -r7077 --- DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/LayerDetector.cs (.../LayerDetector.cs) (revision 6404) +++ DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/LayerDetector.cs (.../LayerDetector.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. // @@ -163,9 +163,9 @@ else if (intersectionResult == LineIntersection.NoIntersection || intersectionResult == LineIntersection.Parallel) { const double cEpsilon = 1.0e-7; - if ((Routines2D.DoesPointExistInLine(verticalHeadPoint, verticalEndPoint, - aHeadpoint, cEpsilon)) && (Routines2D.DoesPointExistInLine(verticalHeadPoint, - verticalEndPoint, aEndPoint, cEpsilon))) + if (Routines2D.DoesPointExistInLine(verticalHeadPoint, verticalEndPoint, + aHeadpoint, cEpsilon) && Routines2D.DoesPointExistInLine(verticalHeadPoint, + verticalEndPoint, aEndPoint, cEpsilon)) { AddPointToList(new LayerIntersectionPoint(aHeadpoint, aSurfaceRefKey)); AddPointToList(new LayerIntersectionPoint(aEndPoint, aSurfaceRefKey)); @@ -190,9 +190,9 @@ else { //point not same condition - bool notSameCondition = ((pointList[index].IntersectionPoint.X.IsNearEqual(( - (LayerIntersectionPoint) point1).IntersectionPoint.X)) && (pointList[index].IntersectionPoint.Z.IsNearEqual(( - (LayerIntersectionPoint) point1).IntersectionPoint.Z))); + bool notSameCondition = pointList[index].IntersectionPoint.X.IsNearEqual(( + (LayerIntersectionPoint) point1).IntersectionPoint.X) && pointList[index].IntersectionPoint.Z.IsNearEqual(( + (LayerIntersectionPoint) point1).IntersectionPoint.Z); if (!notSameCondition) { @@ -313,8 +313,8 @@ { for (var index = 0; index < count; index++) // to find duplicate { - if ((aPoint.IntersectionPoint.X.IsNearEqual(pointList[index].IntersectionPoint.X)) - && (aPoint.IntersectionPoint.Z.IsNearEqual(pointList[index].IntersectionPoint.Z)) + if (aPoint.IntersectionPoint.X.IsNearEqual(pointList[index].IntersectionPoint.X) + && aPoint.IntersectionPoint.Z.IsNearEqual(pointList[index].IntersectionPoint.Z) && (aPoint.SurfaceRefKey == pointList[index].SurfaceRefKey)) { isPointFound = true;