Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/StabilityResultSlices.cs
===================================================================
diff -u
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/StabilityResultSlices.cs (revision 0)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/StabilityResultSlices.cs (revision 3437)
@@ -0,0 +1,48 @@
+// 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 System.Collections.Generic;
+using Deltares.Mathematics;
+
+namespace Deltares.Dam.Data
+{
+ ///
+ /// Class to hold all result values per slice (stability calculations)
+ ///
+ public class StabilityResultSlices
+ {
+
+ ///
+ /// The list of all slices
+ ///
+ public List StabilityResultSlice;
+
+ ///
+ /// The active center point
+ ///
+ public Point2D ActiveCenterPoint;
+
+ ///
+ /// The passive center point
+ ///
+ public Point2D PassiveCenterPoint;
+ }
+}
Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Deltares.Dam.Data.csproj
===================================================================
diff -u -r3419 -r3437
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Deltares.Dam.Data.csproj (.../Deltares.Dam.Data.csproj) (revision 3419)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Deltares.Dam.Data.csproj (.../Deltares.Dam.Data.csproj) (revision 3437)
@@ -202,6 +202,7 @@
+
Index: DamClients/DamUI/trunk/src/Dam/Forms/SlipCircleDrawingObject.cs
===================================================================
diff -u -r3436 -r3437
--- DamClients/DamUI/trunk/src/Dam/Forms/SlipCircleDrawingObject.cs (.../SlipCircleDrawingObject.cs) (revision 3436)
+++ DamClients/DamUI/trunk/src/Dam/Forms/SlipCircleDrawingObject.cs (.../SlipCircleDrawingObject.cs) (revision 3437)
@@ -19,7 +19,6 @@
// Stichting Deltares and remain full property of Stichting Deltares at all times.
// All rights reserved.
-using System.Collections.Generic;
using System.Drawing;
using Deltares.Dam.Data;
using Deltares.Geometry.Forms;
@@ -30,7 +29,7 @@
{
public class SlipCircleDrawingObject : DrawingObject
{
- private StabilityResultSlice slipcircle;
+ private StabilityResultSlices slipcircle;
private Color color = Color.Salmon;
///
@@ -58,7 +57,7 @@
/// The data object.
public override void SetDataObject(object dataObject)
{
- slipcircle = (StabilityResultSlice)dataObject;
+ slipcircle = (StabilityResultSlices)dataObject;
}
///
@@ -83,42 +82,73 @@
DrawingSupport.Pen3D(System.Drawing.Drawing2D.DashStyle.Solid, 3, color);
- var bottomLeftPoint = new Point3D()
+ for (int i = 0; i < slipcircle.StabilityResultSlice.Count; i++)
{
- X = slipcircle.BottomLeftPoint.X,
- Y = 0,
- Z = slipcircle.BottomLeftPoint.Y
- };
+ var stabilityResultSlice = slipcircle.StabilityResultSlice[i];
- var bottomRightPoint = new Point3D()
- {
- X = slipcircle.BottomRightPoint.X,
- Y = 0,
- Z = slipcircle.BottomRightPoint.Y
- };
+ var bottomLeftPoint = new Point3D()
+ {
+ X = stabilityResultSlice.BottomLeftPoint.X,
+ Y = 0,
+ Z = stabilityResultSlice.BottomLeftPoint.Y
+ };
- var topLeftPoint = new Point3D()
+ var bottomRightPoint = new Point3D()
+ {
+ X = stabilityResultSlice.BottomRightPoint.X,
+ Y = 0,
+ Z = stabilityResultSlice.BottomRightPoint.Y
+ };
+
+ var topLeftPoint = new Point3D()
+ {
+ X = stabilityResultSlice.TopLeftPoint.X,
+ Y = 0,
+ Z = stabilityResultSlice.TopLeftPoint.Y
+ };
+
+ var topRightPoint = new Point3D()
+ {
+ X = stabilityResultSlice.TopRightPoint.X,
+ Y = 0,
+ Z = stabilityResultSlice.TopRightPoint.Y
+ };
+
+ GetScaled3DPoint(info.Projection, bottomLeftPoint, ref bottomLeftPoint);
+ GetScaled3DPoint(info.Projection, bottomRightPoint, ref bottomRightPoint);
+ GetScaled3DPoint(info.Projection, topLeftPoint, ref topLeftPoint);
+ GetScaled3DPoint(info.Projection, topRightPoint, ref topRightPoint);
+ DrawingSupport.Line3D(bottomLeftPoint, bottomRightPoint);
+ DrawingSupport.Line3D(bottomRightPoint, topRightPoint);
+ DrawingSupport.Line3D(topRightPoint, topLeftPoint);
+ DrawingSupport.Line3D(topLeftPoint, bottomLeftPoint);
+ }
+
+ if (slipcircle.ActiveCenterPoint != null)
{
- X = slipcircle.TopLeftPoint.X,
- Y = 0,
- Z = slipcircle.TopLeftPoint.Y
+ var activeCenterPoint = new Point3D()
+ {
+ X = slipcircle.ActiveCenterPoint.X,
+ Y = 0,
+ Z = slipcircle.ActiveCenterPoint.Y
+ };
+
+ GetScaled3DPoint(info.Projection, activeCenterPoint, ref activeCenterPoint);
+ DrawingSupport.Cross_Symbol3D(activeCenterPoint.X, activeCenterPoint.Z, 10);
};
- var topRightPoint = new Point3D()
+ if (slipcircle.PassiveCenterPoint != null)
{
- X = slipcircle.TopRightPoint.X,
- Y = 0,
- Z = slipcircle.TopRightPoint.Y
- };
+ var passiveCenterPoint = new Point3D()
+ {
+ X = slipcircle.PassiveCenterPoint.X,
+ Y = 0,
+ Z = slipcircle.PassiveCenterPoint.Y
+ };
- GetScaled3DPoint(info.Projection, bottomLeftPoint, ref bottomLeftPoint);
- GetScaled3DPoint(info.Projection, bottomRightPoint, ref bottomRightPoint);
- GetScaled3DPoint(info.Projection, topLeftPoint, ref topLeftPoint);
- GetScaled3DPoint(info.Projection, topRightPoint, ref topRightPoint);
- DrawingSupport.Line3D(bottomLeftPoint.X, bottomLeftPoint.Y, bottomLeftPoint.Z, bottomRightPoint.X, bottomRightPoint.Y, bottomRightPoint.Z);
- DrawingSupport.Line3D(bottomRightPoint.X, bottomRightPoint.Y, bottomRightPoint.Z, topRightPoint.X, topRightPoint.Y, topRightPoint.Z);
- DrawingSupport.Line3D(topRightPoint.X, topRightPoint.Y, topRightPoint.Z, topLeftPoint.X, topLeftPoint.Y, topLeftPoint.Z);
- DrawingSupport.Line3D(topLeftPoint.X, topLeftPoint.Y, topLeftPoint.Z, bottomLeftPoint.X, bottomLeftPoint.Y, bottomLeftPoint.Z);
+ GetScaled3DPoint(info.Projection, passiveCenterPoint, ref passiveCenterPoint);
+ DrawingSupport.Cross_Symbol3D(passiveCenterPoint.X, passiveCenterPoint.Z, 10);
+ }
}
}
}
Index: DamClients/DamUI/trunk/src/Dam/Forms/DamSpatialEditorDecorator.cs
===================================================================
diff -u -r3436 -r3437
--- DamClients/DamUI/trunk/src/Dam/Forms/DamSpatialEditorDecorator.cs (.../DamSpatialEditorDecorator.cs) (revision 3436)
+++ DamClients/DamUI/trunk/src/Dam/Forms/DamSpatialEditorDecorator.cs (.../DamSpatialEditorDecorator.cs) (revision 3437)
@@ -30,6 +30,7 @@
using Deltares.Geotechnics.Forms;
using Deltares.Geotechnics.Soils;
using Deltares.Geotechnics.SurfaceLines;
+using Deltares.Mathematics;
using Deltares.Standard;
using Deltares.Standard.EventPublisher;
using Deltares.Standard.EventPublisher.Enum;
@@ -122,13 +123,29 @@
///
/// The currently visible slices of the slip circle for this location
///
- internal StabilityResultSlice ResultSlice
+ internal StabilityResultSlices ResultSlice
{
get
{
if (csvExportData != null)
{
- return csvExportData.ResultSlices[index];
+ var resultSlice = new StabilityResultSlices();
+ resultSlice.StabilityResultSlice = new List();
+ for (int sliceIndex = 0; sliceIndex < csvExportData.ResultSlices.Count; sliceIndex++)
+ {
+ resultSlice.StabilityResultSlice.Add(csvExportData.ResultSlices[sliceIndex]);
+ }
+
+ if (csvExportData.ActiveCenterPointX.HasValue && csvExportData.ActiveCenterPointZ.HasValue)
+ {
+ resultSlice.ActiveCenterPoint = new Point2D(csvExportData.ActiveCenterPointX.Value, csvExportData.ActiveCenterPointZ.Value);
+ }
+
+ if (csvExportData.PassiveCenterPointX.HasValue && csvExportData.PassiveCenterPointZ.HasValue)
+ {
+ resultSlice.PassiveCenterPoint = new Point2D(csvExportData.PassiveCenterPointX.Value, csvExportData.PassiveCenterPointZ.Value);
+ }
+ return resultSlice;
}
return null;
}