Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/Views/PipingChartDataFactory.cs =================================================================== diff -u -r449e2761ad14af6e84ea5c1a56aea71bc535e8f9 -r5dc7eef906ffd48f56d14ea0b0b85441e4f2d529 --- Ringtoets/Piping/src/Ringtoets.Piping.Forms/Views/PipingChartDataFactory.cs (.../PipingChartDataFactory.cs) (revision 449e2761ad14af6e84ea5c1a56aea71bc535e8f9) +++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/Views/PipingChartDataFactory.cs (.../PipingChartDataFactory.cs) (revision 5dc7eef906ffd48f56d14ea0b0b85441e4f2d529) @@ -97,13 +97,7 @@ throw new ArgumentNullException("surfaceLine"); } - return new ChartPointData(new[] - { - new Point2D(entryPoint, surfaceLine.GetZAtL(entryPoint)), - }, Resources.PipingInput_EntryPointL_DisplayName) - { - Style = new ChartPointStyle(Color.Blue, 8, Color.Gray, 2, ChartPointSymbol.Triangle) - }; + return CreatePointWithZAtL(entryPoint, surfaceLine, Resources.PipingInput_EntryPointL_DisplayName, Color.Blue); } /// @@ -126,13 +120,7 @@ throw new ArgumentNullException("surfaceLine"); } - return new ChartPointData(new[] - { - new Point2D(exitPoint, surfaceLine.GetZAtL(exitPoint)), - }, Resources.PipingInput_ExitPointL_DisplayName) - { - Style = new ChartPointStyle(Color.Brown, 8, Color.Gray, 2, ChartPointSymbol.Triangle) - }; + return CreatePointWithZAtL(exitPoint, surfaceLine, Resources.PipingInput_ExitPointL_DisplayName, Color.Brown); } /// @@ -243,6 +231,30 @@ return CreateCharacteristicPoint(surfaceLine.DikeToeAtPolder, surfaceLine, PipingDataResources.CharacteristicPoint_DikeToeAtPolder, Color.Silver); } + private static ChartData CreatePointWithZAtL(RoundedDouble pointL, RingtoetsPipingSurfaceLine surfaceLine, string name, Color color) + { + ChartPointData pointWithZatLData; + + try + { + var pointZ = surfaceLine.GetZAtL(pointL); + + pointWithZatLData = new ChartPointData(new[] + { + new Point2D(pointL, pointZ), + }, name) + { + Style = new ChartPointStyle(color, 8, Color.Gray, 2, ChartPointSymbol.Triangle) + }; + } + catch (ArgumentOutOfRangeException) + { + pointWithZatLData = CreateEmptyPointData(name); + } + + return pointWithZatLData; + } + private static ChartData CreateCharacteristicPoint(Point3D worldPoint, RingtoetsPipingSurfaceLine surfaceLine, string name, Color color) { return CreateLocalPoint(worldPoint, surfaceLine, name, new ChartPointStyle(color, 8, Color.Transparent, 0, ChartPointSymbol.Circle));