using System; using System.Collections.Generic; namespace Deltares.Stability.Calculation.Inner { public class TUpliftActiveCentrePoints { // Private Declarations private List FActiveCentrePoints = new List(); public TUpliftActiveCentrePoints() {} public List ActiveCenterpoints { get { return FActiveCentrePoints; } } public void FilldataFromOldCenterpoints(List AHulpCentrePoint, bool HasTangentMoved, bool HasPasiveGridMoved) { double LXMid; double LZMid; double LHelpXMid; double LHelpZmid; for (int i = 0; i < FActiveCentrePoints.Count; i ++) { LXMid = ActiveCenterpoints[i].XMidActive; LZMid = ActiveCenterpoints[i].ZMidActive; int j = 0; bool LFound = false; while (!LFound && (j < AHulpCentrePoint.Count)) { LHelpXMid = AHulpCentrePoint[j].XMidActive; if ((Math.Abs(LXMid - LHelpXMid) < Constants.CGeoAccu)) { LHelpZmid = AHulpCentrePoint[j].ZMidActive; if ((Math.Abs(LZMid - LHelpZmid) < Constants.CGeoAccu)) { // Same Centre point if (HasPasiveGridMoved || HasTangentMoved) { // CopyRelevant circles ActiveCenterpoints[i].CopyCalculatedCircles(AHulpCentrePoint[j], HasTangentMoved); ActiveCenterpoints[i].ActiveCentrePointMessage = ""; } else { ActiveCenterpoints[i].CopyActiveCentrePoint(AHulpCentrePoint[j]); ActiveCenterpoints[i].ActiveCentrePointMessage = AHulpCentrePoint[j].ActiveCentrePointMessage; } } } j ++; } } } public void AddActiveCenterpoint(TUpliftActiveCentrePoint AActiveCenterpoint) { FActiveCentrePoints.Add(AActiveCenterpoint); } } // end TUpliftActiveCentrePoints }