Index: DamEngine/trunk/src/Deltares.DamEngine.Data/Geometry/GeometryData.cs
===================================================================
diff -u -r6106 -r6233
--- DamEngine/trunk/src/Deltares.DamEngine.Data/Geometry/GeometryData.cs (.../GeometryData.cs) (revision 6106)
+++ DamEngine/trunk/src/Deltares.DamEngine.Data/Geometry/GeometryData.cs (.../GeometryData.cs) (revision 6233)
@@ -357,15 +357,15 @@
private static void ReplacePointsForLoop(GeometryData clonedGeometryData, GeometryLoop clonedLoop)
{
- for (var i = 0; i < clonedLoop.CalcPoints.Count; i++)
+ for (int i = 0; i < clonedLoop.CalcPoints.Count; i++)
{
clonedLoop.CalcPoints[i] = clonedGeometryData.GetPointAtLocation(clonedLoop.CalcPoints[i]);
}
}
private static void ReplaceCurvesForLoop(GeometryData clonedGeometryData, GeometryLoop clonedLoop)
{
- for (var i = 0; i < clonedLoop.CurveList.Count; i++)
+ for (int i = 0; i < clonedLoop.CurveList.Count; i++)
{
clonedLoop.CurveList[i].HeadPoint = clonedGeometryData.GetPointAtLocation(clonedLoop.CurveList[i].HeadPoint);
clonedLoop.CurveList[i].EndPoint = clonedGeometryData.GetPointAtLocation(clonedLoop.CurveList[i].EndPoint);
Index: DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/CharacteristicPoint.cs
===================================================================
diff -u -r6087 -r6233
--- DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/CharacteristicPoint.cs (.../CharacteristicPoint.cs) (revision 6087)
+++ DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/CharacteristicPoint.cs (.../CharacteristicPoint.cs) (revision 6233)
@@ -26,24 +26,23 @@
namespace Deltares.DamEngine.Data.Geotechnics;
///
-/// Represents a point on a surface line of a particular .
+/// Represents a point on a surface line of a particular .
///
///
-public class CharacteristicPoint: IComparable
+public class CharacteristicPoint : IComparable
{
// Aggregation relationship
///
- /// Initializes a new instance of the class.
- ///
+ /// Initializes a new instance of the class.
///
public CharacteristicPoint()
{
//geometryPoint = new GeometryPoint();
}
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
/// The containing characteristic point set.
/// The geometry point.
@@ -55,7 +54,7 @@
}
///
- /// Gets or sets the characteristic type 'marker' of a geometry point on a surfaceline..
+ /// Gets or sets the characteristic type 'marker' of a geometry point on a surface line.
///
public CharacteristicPointType CharacteristicPointType { get; set; } = CharacteristicPointType.None;
@@ -68,22 +67,84 @@
public Point2D Point { get; set; }
///
- /// Gets or sets the characteristic point set associated containing this point.
+ /// Gets or sets the characteristic point set associated containing this point.
///
public CharacteristicPointSet PointSet { get; set; }
///
- /// Returns a that represents this instance.
+ /// Determines whether is equal to .
///
+ /// The point at the left of the operator.
+ /// The point at the right of the operator.
+ /// true if the point is equal to the point; otherwise, false.
+ public static bool operator ==(CharacteristicPoint left, CharacteristicPoint right)
+ {
+ if (ReferenceEquals(left, null))
+ {
+ return ReferenceEquals(right, null);
+ }
+
+ return left.Equals(right);
+ }
+
+ public static bool operator >(CharacteristicPoint left, CharacteristicPoint right)
+ {
+ throw new NotImplementedException();
+ }
+
+ public static bool operator <(CharacteristicPoint left, CharacteristicPoint right)
+ {
+ throw new NotImplementedException();
+ }
+
+ ///
+ /// Determines whether is different from .
+ ///
+ /// The point at the left of the operator.
+ /// The point at the right of the operator.
+ /// true if the point is different from the point; otherwise, false.
+ public static bool operator !=(CharacteristicPoint left, CharacteristicPoint right)
+ {
+ return !(left == right);
+ }
+
+ ///
+ /// Returns a that represents this instance.
+ ///
///
- /// A that represents this instance.
+ /// A that represents this instance.
///
public override string ToString()
{
return LocalizationManager.GetTranslatedText(GetType(), CharacteristicPointType.ToString());
}
///
+ /// Determines whether the specified , is equal to this instance.
+ ///
+ /// The to compare with this instance.
+ /// true if the specified is equal to this instance; otherwise, false.
+ public override bool Equals(object obj)
+ {
+ if (obj is not CharacteristicPoint other)
+ {
+ return false;
+ }
+
+ return CompareTo(other) == 0;
+ }
+
+ ///
+ /// Returns a hash code for this instance.
+ ///
+ /// A hash code for this instance.
+ ///
+ public override int GetHashCode()
+ {
+ throw new NotImplementedException();
+ }
+
+ ///
/// Compares the Point of the object.
///
///
@@ -93,14 +154,14 @@
var characteristicPoint = obj as CharacteristicPoint;
if (characteristicPoint != null)
{
- var comparePoint = characteristicPoint.Point;
+ Point2D comparePoint = characteristicPoint.Point;
if (comparePoint != null)
{
return Point.X.CompareTo(comparePoint.X);
}
}
- return String.Compare(ToString(), obj.ToString(), StringComparison.Ordinal);
+ return string.Compare(ToString(), obj.ToString(), StringComparison.Ordinal);
}
}
\ No newline at end of file