public CADGeoObject(CADGeoObject oriData, XYZ SHIFT, double Sita)
 {
     this.Data  = null;
     this.Layer = oriData.Layer;
     this.Text  = oriData.Text;
     this.Point = RotationAndShift(Sita, SHIFT, oriData.Point);
 }
Example #2
0
        /// <summary>
        /// 讀取CAD輸出資料
        /// </summary>
        /// <param name="filePath"></param>
        /// <returns></returns>
        private void LoadCADOutCSVData(string filePath, ref List <CADGeoObject> DATA_CAD_GEOM, ref List <CADGeoObject> DATA_CAD_TEXT)
        {
            StreamReader  sr      = new StreamReader(filePath);
            List <string> tmpData = new List <string>();

            while (sr.Peek() != -1)
            {
                tmpData.Add(sr.ReadLine());
            }


            for (int i = 0; i < tmpData.Count; i++)
            {
                CADGeoObject TmpData = new CADGeoObject(tmpData[i]);
                if (TmpData.Text == null && TmpData.Point != null)
                {
                    DATA_CAD_GEOM.Add(TmpData);
                }
                else if (TmpData.Text != null)
                {
                    DATA_CAD_TEXT.Add(TmpData);
                }
            }
            sr.Close();
        }