Index: DamClients/DamUI/trunk/src/Dam/Forms/DamContext.cs
===================================================================
diff -u -r2968 -r3419
--- DamClients/DamUI/trunk/src/Dam/Forms/DamContext.cs (.../DamContext.cs) (revision 2968)
+++ DamClients/DamUI/trunk/src/Dam/Forms/DamContext.cs (.../DamContext.cs) (revision 3419)
@@ -251,6 +251,11 @@
vr.Repairer = null;
}
+ if (source is CsvExportData && member.Equals("ResultSlices"))
+ {
+ return false;
+ }
+
bool? isVisible = base.IsVisible(source, member);
if (member.Equals("Cohesion"))
{
Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/StabilityResultSlice.cs
===================================================================
diff -u
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/StabilityResultSlice.cs (revision 0)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/StabilityResultSlice.cs (revision 3419)
@@ -0,0 +1,52 @@
+// Copyright (C) Stichting Deltares 2021. All rights reserved.
+//
+// This file is part of the Dam Engine.
+//
+// The Dam Engine is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using Deltares.Mathematics;
+
+namespace Deltares.Dam.Data
+{
+ ///
+ /// Class to hold all result values per slice (stability calculations)
+ ///
+ public class StabilityResultSlice
+ {
+
+ ///
+ /// The top left point
+ ///
+ public Point2D TopLeftPoint;
+
+ ///
+ /// The top right point
+ ///
+ public Point2D TopRightPoint;
+
+ ///
+ /// The bottom left point
+ ///
+ public Point2D BottomLeftPoint;
+
+ ///
+ /// The bottom right point
+ ///
+ public Point2D BottomRightPoint;
+ }
+}
Index: DamClients/DamUI/trunk/src/Dam/Tests/DamEngineIo/FillDamUiFromXmlOutputTests.cs
===================================================================
diff -u -r3413 -r3419
--- DamClients/DamUI/trunk/src/Dam/Tests/DamEngineIo/FillDamUiFromXmlOutputTests.cs (.../FillDamUiFromXmlOutputTests.cs) (revision 3413)
+++ DamClients/DamUI/trunk/src/Dam/Tests/DamEngineIo/FillDamUiFromXmlOutputTests.cs (.../FillDamUiFromXmlOutputTests.cs) (revision 3419)
@@ -424,9 +424,27 @@
dsl.PassiveCircleRadius = 303.3 * (i + 1);
stabilityResults.SlipCircleDefinition = dsl;
break;
-
}
+ var slices = new List();
+ var slice1 = new MinimumSafetyCurveBaseTypeSlice
+ {
+ TopLeftPoint = new Point2DType { X = 11.1, Z = 12.1 },
+ TopRightPoint = new Point2DType { X = 21.1, Z = 22.1 },
+ BottomLeftPoint = new Point2DType { X = 31.1, Z = 32.1 },
+ BottomRightPoint = new Point2DType { X = 41.1, Z = 42.1 },
+ };
+ slices.Add(slice1);
+ var slice2 = new MinimumSafetyCurveBaseTypeSlice
+ {
+ TopLeftPoint = new Point2DType { X = 11.2, Z = 12.2 },
+ TopRightPoint = new Point2DType { X = 21.2, Z = 22.2 },
+ BottomLeftPoint = new Point2DType { X = 31.2, Z = 32.2 },
+ BottomRightPoint = new Point2DType { X = 41.2, Z = 42.2 },
+ };
+ slices.Add(slice2);
+ stabilityResults.SlipCircleDefinition.Slices = slices.ToArray();
+
return stabilityResults;
}
Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Deltares.Dam.Data.csproj
===================================================================
diff -u -r3058 -r3419
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Deltares.Dam.Data.csproj (.../Deltares.Dam.Data.csproj) (revision 3058)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Deltares.Dam.Data.csproj (.../Deltares.Dam.Data.csproj) (revision 3419)
@@ -201,6 +201,7 @@
+
Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/CsvExportData.cs
===================================================================
diff -u -r3412 -r3419
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/CsvExportData.cs (.../CsvExportData.cs) (revision 3412)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/CsvExportData.cs (.../CsvExportData.cs) (revision 3419)
@@ -32,6 +32,7 @@
using Deltares.Geotechnics.Soils;
using Deltares.Geotechnics.SurfaceLines;
using Deltares.Standard.Attributes;
+using System.Collections.Generic;
namespace Deltares.Dam.Data
{
@@ -1591,6 +1592,10 @@
}
}
+ [Browsable(false)]
+ [XmlIgnore]
+ public List ResultSlices { get; set; }
+
[PropertyOrder(2, 1)]
[XmlIgnore]
[ReadOnly(true)]
Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DamEngineIo/FillDamUiFromXmlOutput.cs
===================================================================
diff -u -r3413 -r3419
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DamEngineIo/FillDamUiFromXmlOutput.cs (.../FillDamUiFromXmlOutput.cs) (revision 3413)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DamEngineIo/FillDamUiFromXmlOutput.cs (.../FillDamUiFromXmlOutput.cs) (revision 3419)
@@ -21,11 +21,12 @@
using System.Collections.Generic;
using Deltares.DamEngine.Io.XmlOutput;
-using Deltares.Geometry;
using Deltares.Geotechnics.GeotechnicalGeometry;
using Deltares.Geotechnics.Soils;
using Deltares.Geotechnics.SurfaceLines;
+using Deltares.Mathematics;
using Deltares.Standard.EventPublisher;
+using GeometryPoint = Deltares.Geometry.GeometryPoint;
using SurfaceLine = Deltares.DamEngine.Io.XmlOutput.SurfaceLine;
namespace Deltares.Dam.Data.DamEngineIo
@@ -63,7 +64,7 @@
for (int i = 0; i < output.Results.CalculationMessages.Length; i++)
{
var validationResult = output.Results.CalculationMessages[i];
- var logMessage = new Deltares.Standard.Logging.LogMessage();
+ var logMessage = new Standard.Logging.LogMessage();
logMessage.MessageType = ConversionHelper.ConvertToMessageType(validationResult.MessageType);
logMessage.Subject = null;
logMessage.Message = validationResult.Message1;
@@ -72,7 +73,7 @@
}
// Transfer output time series
- if (output.Results.OperationalOutputTimeSeries != null)
+ if (output != null && output.Results != null && output.Results.OperationalOutputTimeSeries != null)
{
damProjectData.OutputTimeSerieCollection = new TimeSerieCollection();
TransferOutputTimeSeries(output.Results.OperationalOutputTimeSeries, damProjectData.OutputTimeSerieCollection);
@@ -338,6 +339,28 @@
}
break;
}
+
+ if (designResult.StabilityDesignResults.StabilityModelType ==
+ DesignResultStabilityDesignResultsStabilityModelType.Bishop ||
+ designResult.StabilityDesignResults.StabilityModelType ==
+ DesignResultStabilityDesignResultsStabilityModelType.UpliftVan)
+ {
+ if (designResult.StabilityDesignResults.SlipCircleDefinition.Slices != null)
+ {
+ desResult.ResultSlices = new List();
+ foreach (var slice in designResult.StabilityDesignResults.SlipCircleDefinition.Slices)
+ {
+ var resultSlice = new StabilityResultSlice
+ {
+ TopLeftPoint = new Point2D(slice.TopLeftPoint.X, slice.TopLeftPoint.Z),
+ TopRightPoint = new Point2D(slice.TopRightPoint.X, slice.TopRightPoint.Z),
+ BottomLeftPoint = new Point2D(slice.BottomLeftPoint.X, slice.BottomLeftPoint.Z),
+ BottomRightPoint = new Point2D(slice.BottomRightPoint.X, slice.BottomRightPoint.Z)
+ };
+ desResult.ResultSlices.Add(resultSlice);
+ }
+ }
+ }
}
}
}