Exemplo n.º 1
0
        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>();
        }
Exemplo n.º 2
0
 /// <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);
 }
Exemplo n.º 3
0
 /// <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);
 }
Exemplo n.º 4
0
    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>();
    }