Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/Views/PipingChartDataFactory.cs =================================================================== diff -u -r6ae3b82563c665574a6e8e1465e1fec3d8080dbe -r449e2761ad14af6e84ea5c1a56aea71bc535e8f9 --- Ringtoets/Piping/src/Ringtoets.Piping.Forms/Views/PipingChartDataFactory.cs (.../PipingChartDataFactory.cs) (revision 6ae3b82563c665574a6e8e1465e1fec3d8080dbe) +++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/Views/PipingChartDataFactory.cs (.../PipingChartDataFactory.cs) (revision 449e2761ad14af6e84ea5c1a56aea71bc535e8f9) @@ -80,7 +80,7 @@ /// /// Create a with default styling based on the . /// - /// The entry point for which to create . + /// The distance along the at which to place the entry point. /// The to place the entry point on. /// based on the . /// Thrown when is NaN. @@ -109,8 +109,8 @@ /// /// Create a with default styling based on the . /// - /// The entry point for which to create . - /// The to place the entry point on. + /// The distance along the at which to place the exit point. + /// The to place the exit point on. /// based on the . /// Thrown when is NaN. /// Thrown when is null. @@ -138,99 +138,116 @@ /// /// Create a with default styling based on the . /// - /// The to place the ditch polder side on. + /// The which contains a point which + /// characterizes the ditch at polder side, to create for. /// based on the . - /// /// Thrown when is null. + /// Thrown when is null or + /// the contains no . public static ChartData CreateDitchPolderSide(RingtoetsPipingSurfaceLine surfaceLine) { if (surfaceLine == null) { throw new ArgumentNullException("surfaceLine"); } - return CreateLocalPoint(surfaceLine.DitchPolderSide, surfaceLine, PipingDataResources.CharacteristicPoint_DitchPolderSide, new ChartPointStyle(Color.Red, 8, Color.Transparent, 0, ChartPointSymbol.Circle)); + return CreateCharacteristicPoint(surfaceLine.DitchPolderSide, surfaceLine, PipingDataResources.CharacteristicPoint_DitchPolderSide, Color.Red); } /// /// Create a with default styling based on the . /// - /// The to place the bottom ditch polder side on. + /// The which contains a point which + /// characterizes the bottom ditch at polder side, to create for. /// based on the . - /// /// Thrown when is null. + /// Thrown when is null or + /// the contains no . public static ChartData CreateBottomDitchPolderSide(RingtoetsPipingSurfaceLine surfaceLine) { if (surfaceLine == null) { throw new ArgumentNullException("surfaceLine"); } - return CreateLocalPoint(surfaceLine.BottomDitchPolderSide, surfaceLine, PipingDataResources.CharacteristicPoint_BottomDitchPolderSide, new ChartPointStyle(Color.Blue, 8, Color.Transparent, 0, ChartPointSymbol.Circle)); + return CreateCharacteristicPoint(surfaceLine.BottomDitchPolderSide, surfaceLine, PipingDataResources.CharacteristicPoint_BottomDitchPolderSide, Color.Blue); } /// /// Create a with default styling based on the . /// - /// The to place the bottom ditch dike side on. + /// The which contains a point which + /// characterizes the bottom ditch at dike side, to create for. /// based on the . - /// /// Thrown when is null. + /// Thrown when is null or + /// the contains no . public static ChartData CreateBottomDitchDikeSide(RingtoetsPipingSurfaceLine surfaceLine) { if (surfaceLine == null) { throw new ArgumentNullException("surfaceLine"); } - return CreateLocalPoint(surfaceLine.BottomDitchDikeSide, surfaceLine, PipingDataResources.CharacteristicPoint_BottomDitchDikeSide, new ChartPointStyle(Color.Green, 8, Color.Transparent, 0, ChartPointSymbol.Circle)); + return CreateCharacteristicPoint(surfaceLine.BottomDitchDikeSide, surfaceLine, PipingDataResources.CharacteristicPoint_BottomDitchDikeSide, Color.Green); } /// /// Create a with default styling based on the . /// - /// The to place the ditch dike side on. + /// The which contains a point which + /// characterizes the ditch at diek side, to create for. /// based on the . - /// /// Thrown when is null. + /// Thrown when is null or + /// the contains no . public static ChartData CreateDitchDikeSide(RingtoetsPipingSurfaceLine surfaceLine) { if (surfaceLine == null) { throw new ArgumentNullException("surfaceLine"); } - return CreateLocalPoint(surfaceLine.DitchDikeSide, surfaceLine, PipingDataResources.CharacteristicPoint_DitchDikeSide, new ChartPointStyle(Color.Purple, 8, Color.Transparent, 0, ChartPointSymbol.Circle)); + return CreateCharacteristicPoint(surfaceLine.DitchDikeSide, surfaceLine, PipingDataResources.CharacteristicPoint_DitchDikeSide, Color.Purple); } /// /// Create a with default styling based on the . /// - /// The to place the dike toe at river on. + /// The which contains a point which + /// characterizes the dike toe at river side, to create for. /// based on the . - /// /// Thrown when is null. + /// Thrown when is null or + /// the contains no . public static ChartData CreateDikeToeAtRiver(RingtoetsPipingSurfaceLine surfaceLine) { if (surfaceLine == null) { throw new ArgumentNullException("surfaceLine"); } - return CreateLocalPoint(surfaceLine.DikeToeAtRiver, surfaceLine, PipingDataResources.CharacteristicPoint_DikeToeAtRiver, new ChartPointStyle(Color.Orange, 8, Color.Transparent, 0, ChartPointSymbol.Circle)); + return CreateCharacteristicPoint(surfaceLine.DikeToeAtRiver, surfaceLine, PipingDataResources.CharacteristicPoint_DikeToeAtRiver, Color.Orange); } /// /// Create a with default styling based on the . /// - /// The to place the dike toe at polder on. + /// The which contains a point which + /// characterizes the dike toe at polder side, to create for. /// based on the . - /// /// Thrown when is null. + /// Thrown when is null or + /// the contains no . public static ChartData CreateDikeToeAtPolder(RingtoetsPipingSurfaceLine surfaceLine) { if (surfaceLine == null) { throw new ArgumentNullException("surfaceLine"); } - return CreateLocalPoint(surfaceLine.DikeToeAtPolder, surfaceLine, PipingDataResources.CharacteristicPoint_DikeToeAtPolder, new ChartPointStyle(Color.Silver, 8, Color.Transparent, 0, ChartPointSymbol.Circle)); + return CreateCharacteristicPoint(surfaceLine.DikeToeAtPolder, surfaceLine, PipingDataResources.CharacteristicPoint_DikeToeAtPolder, Color.Silver); } + 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)); + } + private static ChartData CreateLocalPoint(Point3D worldPoint, RingtoetsPipingSurfaceLine surfaceLine, string name, ChartPointStyle style) { Point2D firstPoint = Point3DToPoint2D(surfaceLine.Points.First());