Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/Views/PipingChartDataFactory.cs =================================================================== diff -u -rc8efe348672fe0ebd3da53f2861c67dce25396f6 -r2206475a63c65a3af17ad81352699de1ca2cadcf --- Ringtoets/Piping/src/Ringtoets.Piping.Forms/Views/PipingChartDataFactory.cs (.../PipingChartDataFactory.cs) (revision c8efe348672fe0ebd3da53f2861c67dce25396f6) +++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/Views/PipingChartDataFactory.cs (.../PipingChartDataFactory.cs) (revision 2206475a63c65a3af17ad81352699de1ca2cadcf) @@ -27,10 +27,11 @@ using Core.Common.Base.Geometry; using Core.Components.Charting.Data; using Core.Components.Charting.Styles; -using Ringtoets.Piping.Data; using Ringtoets.Piping.Forms.Properties; using Ringtoets.Piping.Primitives; +using PipingDataResources = Ringtoets.Piping.Data.Properties.Resources; + namespace Ringtoets.Piping.Forms.Views { /// @@ -105,5 +106,142 @@ Style = new ChartPointStyle(Color.Blue, 8, Color.Gray, 2, ChartPointSymbol.Triangle) }; } + + /// + /// Create a with default styling based on the . + /// + /// The for which to create . + /// based on the . + /// /// Thrown when is null. + public static ChartData CreateDitchPolderSide(Point3D ditchPolderSide) + { + if (ditchPolderSide == null) + { + throw new ArgumentNullException("ditchPolderSide"); + } + + return new ChartPointData(new[] + { + Point3DToPoint2D(ditchPolderSide) + }, PipingDataResources.CharacteristicPoint_DitchPolderSide) + { + Style = new ChartPointStyle(Color.Red, 8, Color.Transparent, 0, ChartPointSymbol.Circle) + }; + } + + /// + /// Create a with default styling based on the . + /// + /// The for which to create . + /// based on the . + /// /// Thrown when is null. + public static ChartData CreateBottomDitchPolderSide(Point3D bottomDitchPolderSide) + { + if (bottomDitchPolderSide == null) + { + throw new ArgumentNullException("bottomDitchPolderSide"); + } + + return new ChartPointData(new[] + { + Point3DToPoint2D(bottomDitchPolderSide) + }, PipingDataResources.CharacteristicPoint_BottomDitchPolderSide) + { + Style = new ChartPointStyle(Color.Blue, 8, Color.Transparent, 0, ChartPointSymbol.Circle) + }; + } + + /// + /// Create a with default styling based on the . + /// + /// The for which to create . + /// based on the . + /// /// Thrown when is null. + public static ChartData CreateBottomDitchDikeSide(Point3D bottomDitchDikeSide) + { + if (bottomDitchDikeSide == null) + { + throw new ArgumentNullException("bottomDitchDikeSide"); + } + + return new ChartPointData(new[] + { + Point3DToPoint2D(bottomDitchDikeSide) + }, PipingDataResources.CharacteristicPoint_BottomDitchDikeSide) + { + Style = new ChartPointStyle(Color.Green, 8, Color.Transparent, 0, ChartPointSymbol.Circle) + }; + } + + /// + /// Create a with default styling based on the . + /// + /// The for which to create . + /// based on the . + /// /// Thrown when is null. + public static ChartData CreateDitchDikeSide(Point3D ditchDikeSide) + { + if (ditchDikeSide == null) + { + throw new ArgumentNullException("ditchDikeSide"); + } + + return new ChartPointData(new[] + { + Point3DToPoint2D(ditchDikeSide) + }, PipingDataResources.CharacteristicPoint_DitchDikeSide) + { + Style = new ChartPointStyle(Color.Purple, 8, Color.Transparent, 0, ChartPointSymbol.Circle) + }; + } + + /// + /// Create a with default styling based on the . + /// + /// The for which to create . + /// based on the . + /// /// Thrown when is null. + public static ChartData CreateDikeToeAtRiver(Point3D dikeToeAtRiver) + { + if (dikeToeAtRiver == null) + { + throw new ArgumentNullException("dikeToeAtRiver"); + } + + return new ChartPointData(new[] + { + Point3DToPoint2D(dikeToeAtRiver) + }, PipingDataResources.CharacteristicPoint_DikeToeAtRiver) + { + Style = new ChartPointStyle(Color.Orange, 8, Color.Transparent, 0, ChartPointSymbol.Circle) + }; + } + + /// + /// Create a with default styling based on the . + /// + /// The for which to create . + /// based on the . + /// /// Thrown when is null. + public static ChartData CreateDikeToeAtPolder(Point3D dikeToeAtPolder) + { + if (dikeToeAtPolder == null) + { + throw new ArgumentNullException("dikeToeAtPolder"); + } + + return new ChartPointData(new[] + { + Point3DToPoint2D(dikeToeAtPolder) + }, PipingDataResources.CharacteristicPoint_DikeToeAtPolder) + { + Style = new ChartPointStyle(Color.Silver, 8, Color.Transparent, 0, ChartPointSymbol.Circle) + }; + } + + private static Point2D Point3DToPoint2D(Point3D point3D) + { + return new Point2D(point3D.X, point3D.Z); + } } } \ No newline at end of file