Index: DamEngine/trunk/src/Deltares.DamEngine.Data/Geometry/Waternet.cs
===================================================================
diff -u -r4000 -r4052
--- DamEngine/trunk/src/Deltares.DamEngine.Data/Geometry/Waternet.cs (.../Waternet.cs) (revision 4000)
+++ DamEngine/trunk/src/Deltares.DamEngine.Data/Geometry/Waternet.cs (.../Waternet.cs) (revision 4052)
@@ -21,91 +21,90 @@
using System.Collections.Generic;
-namespace Deltares.DamEngine.Data.Geometry
+namespace Deltares.DamEngine.Data.Geometry;
+
+///
+/// Class holding the waternet.
+///
+public class Waternet : GeometryObject
{
+ private PhreaticLine phreaticLine;
+
///
- /// Class holding the waternet.
+ /// Initializes a new instance of the class.
///
- public class Waternet : GeometryObject
+ public Waternet()
{
- private PhreaticLine phreaticLine;
+ IsGenerated = false;
+ }
- ///
- /// Initializes a new instance of the class.
- ///
- public Waternet()
+ ///
+ /// Gets or sets the phreatic line.
+ ///
+ ///
+ /// The phreatic line.
+ ///
+ public PhreaticLine PhreaticLine
+ {
+ get
{
- IsGenerated = false;
+ return phreaticLine;
}
-
- ///
- /// Gets or sets the phreatic line.
- ///
- ///
- /// The phreatic line.
- ///
- public PhreaticLine PhreaticLine
+ set
{
- get
+ phreaticLine = value;
+ if (phreaticLine != null)
{
- return phreaticLine;
- }
- set
- {
- phreaticLine = value;
- if (phreaticLine != null)
+ if (phreaticLine.Points.Count == 0 && phreaticLine.CalcPoints.Count > 0)
{
- if (phreaticLine.Points.Count == 0 && phreaticLine.CalcPoints.Count > 0)
- {
- phreaticLine.SyncPoints();
- }
+ phreaticLine.SyncPoints();
}
}
}
+ }
- ///
- /// Gets the head line list.
- ///
- ///
- /// The head line list.
- ///
- public List HeadLineList { get; } = new List();
+ ///
+ /// Gets the head line list.
+ ///
+ ///
+ /// The head line list.
+ ///
+ public List HeadLineList { get; } = new List();
- ///
- /// Gets the waternet line list.
- ///
- ///
- /// The waternet line list.
- ///
- public List WaternetLineList { get; } = new List();
+ ///
+ /// Gets the waternet line list.
+ ///
+ ///
+ /// The waternet line list.
+ ///
+ public List WaternetLineList { get; } = new List();
- ///
- /// Gets or sets the unit weight.
- ///
- ///
- /// The unit weight.
- ///
- public double UnitWeight { get; set; } = GeometryConstants.VolumicWeightOfWater;
+ ///
+ /// Gets or sets the unit weight.
+ ///
+ ///
+ /// The unit weight.
+ ///
+ public double UnitWeight { get; set; } = GeometryConstants.VolumicWeightOfWater;
- ///
- /// Gets or sets a value indicating whether this instance is generated.
- ///
- ///
- /// true if this instance is generated; otherwise, false.
- ///
- public bool IsGenerated { get; set; }
+ ///
+ /// Gets or sets a value indicating whether this instance is generated.
+ ///
+ ///
+ /// true if this instance is generated; otherwise, false.
+ ///
+ public bool IsGenerated { get; set; }
- ///
- /// Adds the waternet line.
- ///
- /// A waternet line.
- public void AddWaternetLine(WaternetLine aWaternetLine)
+ ///
+ /// Adds the waternet line.
+ ///
+ /// A waternet line.
+ public void AddWaternetLine(WaternetLine aWaternetLine)
+ {
+ if (!WaternetLineList.Contains(aWaternetLine))
{
- if (!WaternetLineList.Contains(aWaternetLine))
- {
- aWaternetLine.SyncPoints();
- WaternetLineList.Add(aWaternetLine);
- }
+ aWaternetLine.SyncPoints();
+ WaternetLineList.Add(aWaternetLine);
}
}
}
\ No newline at end of file