Index: Ringtoets/Common/src/Ringtoets.Common.Data/MechanismSurfaceLineBase.cs =================================================================== diff -u -r9b2bb9a809f4b42bd06b910dde1f6eb8e546356f -r7ee48e01aacfa3f10d8bb82380bf4392db16ac59 --- Ringtoets/Common/src/Ringtoets.Common.Data/MechanismSurfaceLineBase.cs (.../MechanismSurfaceLineBase.cs) (revision 9b2bb9a809f4b42bd06b910dde1f6eb8e546356f) +++ Ringtoets/Common/src/Ringtoets.Common.Data/MechanismSurfaceLineBase.cs (.../MechanismSurfaceLineBase.cs) (revision 7ee48e01aacfa3f10d8bb82380bf4392db16ac59) @@ -50,6 +50,7 @@ { throw new ArgumentNullException(nameof(name)); } + Name = name; Points = new Point3D[0]; LocalGeometry = new RoundedPoint2DCollection(numberOfDecimalPlaces, new Point2D[0]); @@ -97,10 +98,12 @@ { throw new ArgumentNullException(nameof(points), Resources.MechanismSurfaceLineBase_Collection_of_points_for_geometry_is_null); } + if (points.Any(p => p == null)) { throw new ArgumentException(Resources.MechanismSurfaceLineBase_A_point_in_the_collection_was_null); } + Points = points.Select(p => new Point3D(p)).ToArray(); if (Points.Any()) @@ -207,6 +210,7 @@ { throw new ArgumentNullException(nameof(point), @"Cannot find a point in geometry using a null point."); } + return Points.FirstOrDefault(p => p.Equals(point)); }