Index: DamEngine/trunk/src/Deltares.DamEngine.Data/Geometry/GeometryGenerator.cs =================================================================== diff -u -r5687 -r5691 --- DamEngine/trunk/src/Deltares.DamEngine.Data/Geometry/GeometryGenerator.cs (.../GeometryGenerator.cs) (revision 5687) +++ DamEngine/trunk/src/Deltares.DamEngine.Data/Geometry/GeometryGenerator.cs (.../GeometryGenerator.cs) (revision 5691) @@ -520,10 +520,7 @@ #if DEBUG catch (Exception ex) { - //Todo:Show error msg box - //var lm = new LogMessage(LogMessageType.FatalError, this, "DetectSurfaces:" + ex.Message); - //LogManager.Add(lm); - var text = ex.Message; + Debug.WriteLine(ex); return 0; } #else @@ -1054,14 +1051,11 @@ private static double DetermineSlope(GeometryCurve line) { - if (line.HeadPoint.Z.IsNearEqual(line.EndPoint.Z)) + if (line.HeadPoint.X.IsNearEqual(line.EndPoint.X)) { return double.MaxValue; } - else - { - return (line.HeadPoint.X - line.EndPoint.X)/(line.HeadPoint.Z - line.EndPoint.Z); - } + return (line.HeadPoint.Z - line.EndPoint.Z)/(line.HeadPoint.X - line.EndPoint.X); } protected internal static void DeterminePointClosestToLine(Point2D point1, Point2D point2, GeometryCurve line, Index: DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/IssuesTests.cs =================================================================== diff -u -r5600 -r5691 --- DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/IssuesTests.cs (.../IssuesTests.cs) (revision 5600) +++ DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/IssuesTests.cs (.../IssuesTests.cs) (revision 5691) @@ -37,11 +37,11 @@ private const string tutorialStability2D = @"TestFiles\InputTutorialStability2D.xml"; [Test] - [TestCase("DWP_2", 1,15, 97, 83, 1.393)] - [TestCase("DWP_8", 7,26, 129, 104, 1.051)] - [TestCase("DWP_16", 15,26, 117, 92, 0.749)] - [TestCase("DWP_20", 19,23, 113, 91, 1.523)] - public void TestGeometryAndResultForIssueWithDwpsFromTutorial(string location, int segmentIndex, int surfaceCount, int curveCount, int pointCount, double safetyFactor) + [TestCase("DWP_2", 1,15, 97, 83, 46,1.393)] + [TestCase("DWP_8", 7,26, 129, 104, 53, 1.051)] + [TestCase("DWP_16", 15,26, 117, 92, 47, 0.749)] + [TestCase("DWP_20", 19,23, 113, 91, 50, 1.523)] + public void TestGeometryAndResultForIssueWithDwpsFromTutorial(string location, int segmentIndex, int surfaceCount, int curveCount, int pointCount, int surfaceLinePointCount, double safetyFactor) { string inputString = File.ReadAllText(tutorialStability2D); string[] locations = [location]; @@ -65,12 +65,13 @@ // GeometryExporter.ExportToFile(geometry, GeometryExporter.VisualizationFolder + "Geometry.txt"); // GeometryExporter.ExportWithSurfaceLineToJsonFile(GeometryExporter.VisualizationFolder + // GeometryExporter.ExportJasonFile, geometry, surfaceLine.Geometry); - + int surfPoints = soilProfile2D.Geometry.SurfaceLine.Points.Count; Assert.Multiple(() => { Assert.That(soilProfile2D.Geometry.Surfaces, Has.Count.EqualTo(surfaceCount)); Assert.That(soilProfile2D.Geometry.Curves, Has.Count.EqualTo(curveCount)); Assert.That(soilProfile2D.Geometry.Points, Has.Count.EqualTo(pointCount)); + Assert.That(soilProfile2D.Geometry.SurfaceLine.Points.Count, Is.EqualTo(surfaceLinePointCount)); }); GeneralHelper.RunAfterInputValidation(engineInterface, true, outputName); int errorCount = GeneralHelper.DetermineNumberOfCalculationErrors(engineInterface.DamProjectData.CalculationMessages); Index: DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/OperationalHHNKTests.cs =================================================================== diff -u -r5687 -r5691 --- DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/OperationalHHNKTests.cs (.../OperationalHHNKTests.cs) (revision 5687) +++ DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/OperationalHHNKTests.cs (.../OperationalHHNKTests.cs) (revision 5691) @@ -53,7 +53,6 @@ inputString = XmlAdapter.ChangeValueInXml(inputString, "CalculationMap", calcDir); // Current directory will be used var engineInterface = new EngineInterface(inputString); - int segmentIndex = 0; var soilProfile2D = engineInterface.DamProjectData.Dike.Locations[0].Segment.SoilProfileProbabilities[0].SoilProfile2D; GeometryData geometry = soilProfile2D.Geometry; SurfaceLine2 surfaceLine = engineInterface.DamProjectData.Dike.Locations[0].SurfaceLine; Index: DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/SoilProfile2DSurfaceLineHelper.cs =================================================================== diff -u -r5687 -r5691 --- DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/SoilProfile2DSurfaceLineHelper.cs (.../SoilProfile2DSurfaceLineHelper.cs) (revision 5687) +++ DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/SoilProfile2DSurfaceLineHelper.cs (.../SoilProfile2DSurfaceLineHelper.cs) (revision 5691) @@ -99,7 +99,6 @@ var oldSurfaces = new List(); oldSurfaces.AddRange((IEnumerable) soilProfile2D2.Surfaces); - //AddGeometryIntersectionsToSurfaceLine(clonedProfile.Geometry, ref clonedSurfaceLine); // #Bka dit moet weg kunnen, eerst wel even testen var result = new SoilProfile2D(); BuildGeometryModel(clonedSurfaceLine, clonedProfile, ref result);