예제 #1
0
 Stream(XYZ pt1, XYZ pt2)
 {
     if (HasXform)
     {
         StreamWcs(CurrentXform.OfPoint(pt1), CurrentXform.OfPoint(pt2));
     }
     else
     {
         StreamWcs(pt1, pt2);
     }
 }
예제 #2
0
        Stream(IList <XYZ> pts, bool closed)
        {
            if (pts.Count < 2)
            {
                Debug.Assert(false); // have to have at least 2 points!
                return;
            }

            XYZ pt1, pt2;

            int len = pts.Count;

            for (int i = 0; i < (len - 1); i++)
            {
                pt1 = pts[i];
                pt2 = pts[i + 1];

                if (HasXform)
                {
                    StreamWcs(CurrentXform.OfPoint(pt1), CurrentXform.OfPoint(pt2));
                }
                else
                {
                    StreamWcs(pt1, pt2);
                }
            }

            if (closed)
            {
                if (HasXform)
                {
                    StreamWcs(CurrentXform.OfPoint(pts[len - 1]), CurrentXform.OfPoint(pts[0]));
                }
                else
                {
                    StreamWcs(pts[len - 1], pts[0]);
                }
            }
        }