Index: DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/SoilProfile2D.cs =================================================================== diff -u -r5886 -r6087 --- DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/SoilProfile2D.cs (.../SoilProfile2D.cs) (revision 5886) +++ DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/SoilProfile2D.cs (.../SoilProfile2D.cs) (revision 6087) @@ -126,7 +126,7 @@ clonedSoilProfile2D.Geometry = Geometry.Clone(); foreach (SoilLayer2D surface in Surfaces) { - SoilLayer2D clonedSurface = surface.Clone(); + SoilLayer2D clonedSurface = surface.Clone(clonedSoilProfile2D.Geometry); clonedSoilProfile2D.Surfaces.Add(clonedSurface); } foreach (PreConsolidationStress preconsolidationStress in PreconsolidationStresses) @@ -146,6 +146,23 @@ { return Name; } + + /// + /// Finds a SoilLayer2D based on its outer loop + /// + /// + /// the layer or when not found null + public SoilLayer2D FindSoilLayer2DByItsOuterLoop(GeometryLoop outerLoop) + { + foreach (SoilLayer2D soilLayer2D in Surfaces) + { + if (soilLayer2D.GeometrySurface.OuterLoop.HasSameCurves(outerLoop)) + { + return soilLayer2D; + } + } + return null; + } /// /// Get the soil layer from the old surfaces