Index: DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/CharacteristicPointSet.cs =================================================================== diff -u -r6087 -r6245 --- DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/CharacteristicPointSet.cs (.../CharacteristicPointSet.cs) (revision 6087) +++ DamEngine/trunk/src/Deltares.DamEngine.Data/Geotechnics/CharacteristicPointSet.cs (.../CharacteristicPointSet.cs) (revision 6245) @@ -146,7 +146,7 @@ { characteristicPoint.Point.Z = double.NaN; } - else if (!geometry.CalcPoints.Contains(characteristicPoint.Point)) + else if (!geometry.Points.Contains(characteristicPoint.Point)) { if (double.IsNaN(characteristicPoint.Point.X)) { @@ -174,7 +174,7 @@ return; } - foreach (Point2D point in geometry.CalcPoints) + foreach (Point2D point in geometry.Points) { Add(new CharacteristicPoint { @@ -190,7 +190,7 @@ // characteristic points should have their height updated: foreach (CharacteristicPoint characteristicPoint in annotations.ToArray()) { - if (geometry != null && geometry.CalcPoints.Contains(characteristicPoint.Point)) + if (geometry != null && geometry.Points.Contains(characteristicPoint.Point)) { Remove(characteristicPoint); } @@ -404,12 +404,12 @@ typeCache.Remove(item.CharacteristicPointType); bool removeGeometryPoint = GeometryMustContainPoint && Geometry != null && - Geometry.CalcPoints.Contains(item.Point) && + Geometry.Points.Contains(item.Point) && !annotations.Any(cp => ReferenceEquals(cp.Point, item.Point)); if (removeGeometryPoint) { - PerformCollectionRemoveWithEvents(Geometry.CalcPoints, item.Point); + PerformCollectionRemoveWithEvents(Geometry.Points, item.Point); } } @@ -434,7 +434,7 @@ if (GeometryMustContainPoint && Geometry != null) { - Geometry.CalcPoints.Clear(); + Geometry.Points.Clear(); } } @@ -486,14 +486,14 @@ Point2D itemAtIndex = index < annotations.Count ? annotations[index].Point : null; PerformListInsertWithEvents(annotations, item, index); - if (GeometryMustContainPoint && Geometry != null && !Geometry.CalcPoints.Contains(item.Point)) + if (GeometryMustContainPoint && Geometry != null && !Geometry.Points.Contains(item.Point)) { - int geometryIndex = Geometry.CalcPoints.Count; + int geometryIndex = Geometry.Points.Count; if (null != itemAtIndex) { - for (var i = 0; i < Geometry.CalcPoints.Count; i++) + for (var i = 0; i < Geometry.Points.Count; i++) { - if (ReferenceEquals(Geometry.CalcPoints[i], itemAtIndex)) + if (ReferenceEquals(Geometry.Points[i], itemAtIndex)) { geometryIndex = i; break; @@ -504,11 +504,11 @@ // Check if point at same position already exists and set that point to the existing point // Do this to avoid points in Surfaceline.Geometry with the same location var IsPointExist = false; - for (var i = 0; i < Geometry.CalcPoints.Count; i++) + for (var i = 0; i < Geometry.Points.Count; i++) { - if (Geometry.CalcPoints[i].LocationEquals(item.Point)) + if (Geometry.Points[i].LocationEquals(item.Point)) { - item.Point = Geometry.CalcPoints[i]; + item.Point = Geometry.Points[i]; IsPointExist = true; break; } @@ -517,7 +517,7 @@ if (!IsPointExist) { // Only add new point if no point on same location was found - PerformListInsertWithEvents(Geometry.CalcPoints, item.Point, geometryIndex); + PerformListInsertWithEvents(Geometry.Points, item.Point, geometryIndex); } }