Exemplo n.º 1
0
        public List <Point3d> toPoints()
        {
            if (segments == null || segments.Count <= 0)
            {
                return(null);
            }
            List <Point3d> r           = new List <Point3d>();
            TBPoint        start       = this.startPoint;
            LoopSeg        previousSeg = segments[0];

            r.Add(start.acPoint);
            r.AddRange(previousSeg.getInnerPoints());
            LoopSeg nextSeg = previousSeg;

            for (int i = 1; i < segments.Count; i++)
            {
                nextSeg = segments[i];

                r.Add(nextSeg.startPoint.acPoint);
                r.AddRange(nextSeg.getInnerPoints());
                previousSeg = nextSeg;
            }
            r.Add(nextSeg.endPoint.acPoint);
            return(r);
        }
Exemplo n.º 2
0
 public static Loop getClosedBoundary(TBPLine pl, object userData)
 {
     if (pl.acPline.Closed || pl.IsLooped)
     {
         Loop           l    = new Loop();
         TBPLineSegment tbpl = new TBPLineSegment(pl.acPline);
         LoopSeg        ls   = new LoopSeg(tbpl, LineDirection.positive);
         l.segments.Add(ls);
         l.startPoint = tbpl.StartPoint;
         l.userData   = userData;
         return(l);
     }
     return(null);
 }
Exemplo n.º 3
0
        public List <DBObjectCollection> getInnerLoopObjsList()
        {
            if (neighbourInnerLoops == null)
            {
                return(null);
            }
            List <DBObjectCollection> r = new List <DBObjectCollection>();

            for (int j = 0; j < neighbourInnerLoops.Count; j++)
            {
                DBObjectCollection dbc = new DBObjectCollection();
                LoopSeg.add2DBObjectCollection(dbc, neighbourInnerLoops[j].segments);
                r.Add(dbc);
            }

            return(r);
        }