Exemplo n.º 1
0
 private bool Equals(MacroStabilityInwardsSurfaceLine other)
 {
     return(string.Equals(Name, other.Name) &&
            Equals(ReferenceLineIntersectionWorldPoint, other.ReferenceLineIntersectionWorldPoint) &&
            EqualGeometricPoints(other.Points) &&
            EqualCharacteristicPoints(other));
 }
Exemplo n.º 2
0
        /// <summary>
        /// Copies the property values of the <paramref name="fromSurfaceLine"/> to
        /// the <see cref="MacroStabilityInwardsSurfaceLine"/>.
        /// </summary>
        /// <param name="fromSurfaceLine">The <see cref="MacroStabilityInwardsSurfaceLine"/>
        /// to get the property values from.</param>
        /// <exception cref="ArgumentNullException">Thrown when <paramref name="fromSurfaceLine"/>
        /// is <c>null</c>.</exception>
        public void CopyProperties(MacroStabilityInwardsSurfaceLine fromSurfaceLine)
        {
            if (fromSurfaceLine == null)
            {
                throw new ArgumentNullException(nameof(fromSurfaceLine));
            }

            Name = fromSurfaceLine.Name;
            ReferenceLineIntersectionWorldPoint = fromSurfaceLine.ReferenceLineIntersectionWorldPoint != null
                                                      ? new Point2D(fromSurfaceLine.ReferenceLineIntersectionWorldPoint)
                                                      : null;
            SetGeometry(fromSurfaceLine.Points);
            SetCharacteristicPoints(fromSurfaceLine);
        }
Exemplo n.º 3
0
 private bool EqualCharacteristicPoints(MacroStabilityInwardsSurfaceLine other)
 {
     return(Equals(SurfaceLevelInside, other.SurfaceLevelInside) &&
            Equals(SurfaceLevelOutside, other.SurfaceLevelOutside) &&
            Equals(DikeTopAtPolder, other.DikeTopAtPolder) &&
            Equals(DikeTopAtRiver, other.DikeTopAtRiver) &&
            Equals(ShoulderBaseInside, other.ShoulderBaseInside) &&
            Equals(ShoulderTopInside, other.ShoulderTopInside) &&
            Equals(DikeToeAtPolder, other.DikeToeAtPolder) &&
            Equals(DikeToeAtRiver, other.DikeToeAtRiver) &&
            Equals(DitchDikeSide, other.DitchDikeSide) &&
            Equals(DitchPolderSide, other.DitchPolderSide) &&
            Equals(BottomDitchDikeSide, other.BottomDitchDikeSide) &&
            Equals(BottomDitchPolderSide, other.BottomDitchPolderSide));
 }
Exemplo n.º 4
0
 private void SetCharacteristicPoints(MacroStabilityInwardsSurfaceLine fromSurfaceLine)
 {
     SurfaceLevelOutside   = PointFromGeometryOrNull(fromSurfaceLine.SurfaceLevelOutside);
     DikeTopAtPolder       = PointFromGeometryOrNull(fromSurfaceLine.DikeTopAtPolder);
     DikeTopAtRiver        = PointFromGeometryOrNull(fromSurfaceLine.DikeTopAtRiver);
     ShoulderBaseInside    = PointFromGeometryOrNull(fromSurfaceLine.ShoulderBaseInside);
     ShoulderTopInside     = PointFromGeometryOrNull(fromSurfaceLine.ShoulderTopInside);
     BottomDitchDikeSide   = PointFromGeometryOrNull(fromSurfaceLine.BottomDitchDikeSide);
     BottomDitchPolderSide = PointFromGeometryOrNull(fromSurfaceLine.BottomDitchPolderSide);
     DikeToeAtPolder       = PointFromGeometryOrNull(fromSurfaceLine.DikeToeAtPolder);
     DikeToeAtRiver        = PointFromGeometryOrNull(fromSurfaceLine.DikeToeAtRiver);
     DitchDikeSide         = PointFromGeometryOrNull(fromSurfaceLine.DitchDikeSide);
     DitchPolderSide       = PointFromGeometryOrNull(fromSurfaceLine.DitchPolderSide);
     SurfaceLevelInside    = PointFromGeometryOrNull(fromSurfaceLine.SurfaceLevelInside);
 }