Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/PipingCalculationConfigurationHelper.cs =================================================================== diff -u -rbb0aeecc47206f5089ab04ca6c3575a1de8c206f -r7ae9100ff4e61169edcefaeb01b72d492431742f --- Ringtoets/Piping/src/Ringtoets.Piping.Forms/PipingCalculationConfigurationHelper.cs (.../PipingCalculationConfigurationHelper.cs) (revision bb0aeecc47206f5089ab04ca6c3575a1de8c206f) +++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/PipingCalculationConfigurationHelper.cs (.../PipingCalculationConfigurationHelper.cs) (revision 7ae9100ff4e61169edcefaeb01b72d492431742f) @@ -106,15 +106,9 @@ Segment2D[] surfaceLineSegments = Math2D.ConvertLinePointsToLineSegments(surfaceLine.Points.Select(p => new Point2D(p.X, p.Y))).ToArray(); - var soilModelObjectsForCalculation = new List(); - foreach (StochasticSoilModel stochasticSoilModel in availableSoilModels.Where(sm => sm.StochasticSoilProfiles.Any())) - { - if (DoesSoilModelGeometryIntersectWithSurfaceLineGeometry(stochasticSoilModel, surfaceLineSegments)) - { - soilModelObjectsForCalculation.Add(stochasticSoilModel); - } - } - return soilModelObjectsForCalculation; + return availableSoilModels.Where(stochasticSoilModel => stochasticSoilModel.StochasticSoilProfiles.Any() && + DoesSoilModelGeometryIntersectWithSurfaceLineGeometry(stochasticSoilModel, surfaceLineSegments)) + .ToList(); } private static CalculationGroup CreateCalculationGroup(RingtoetsPipingSurfaceLine surfaceLine, IEnumerable soilModels, GeneralPipingInput generalInput)