internal M11Branch(branch BranchFromPFS, SortedDictionary <int, point> Points) { _pfsdata = BranchFromPFS; //Loop the POINTS for (int i = 0; i < _pfsdata.points.NumberOfParameters; i++) { M11Point mp = new M11Point(Points[_pfsdata.points.GetValue(i)]); _points.Add(mp); } //Sort by chainage _points.Sort(new Comparison <M11Point>((var1, var2) => var1.Chainage.CompareTo(var2.Chainage))); //Add to polyline Line = new XYPolyline(); foreach (var mp in _points) { Line.Points.Add(mp); } ID = new BranchID { Branchname = Name, StartChainage = ChainageStart }; CrossSections = new ObservableCollection <CrossSection>(); }
/// <summary> /// Set the two POINTS that defines the line where the CrossSection is located /// </summary> /// <param name="P1"></param> /// <param name="P2"></param> internal void SetPoints(M11Point P1, M11Point P2) { SetPoints(P1, P2, P1.Chainage, P2.Chainage, Chainage); }
internal M11Branch(branch BranchFromPFS, SortedDictionary<int, point> Points) { _pfsdata = BranchFromPFS; //Loop the POINTS for (int i=0; i<_pfsdata.points.NumberOfParameters;i++) { M11Point mp =new M11Point(Points[_pfsdata.points.GetValue(i)]); _points.Add(mp); } //Sort by chainage _points.Sort(new Comparison<M11Point>((var1,var2) => var1.Chainage.CompareTo(var2.Chainage))); //Add to polyline Line = new XYPolyline(); foreach (var mp in _points) Line.Points.Add(mp); ID = new BranchID { Branchname = Name, StartChainage = ChainageStart }; CrossSections = new ObservableCollection<CrossSection>(); }