예제 #1
0
        private ArrayList GetArrList(int nTemplateId)
        {
            ArrayList arrRet = new ArrayList();

            DataRow[] rows = npcTable.Select(nTempleteIDColumnName, nTemplateId.ToString());

            foreach (DataRow row in rows)
            {
                Point3d point = new Point3d();
                
                point.nX = GetCellIntValue(row, nXColumnName);
                point.nY = GetCellIntValue(row, nYColumnName);
                point.nZ = 0;

                arrRet.Add(point);
            }
            return arrRet;
        }
예제 #2
0
        /// <summary>
        /// 获取密集点的逻辑坐标
        /// </summary>
        /// <param name="nTemplateId"></param>
        /// <param name="nX"></param>
        /// <param name="nY"></param>
        /// <returns></returns>
        public bool GetFocusLogicalXY(int nTemplateId, ref int nX, ref int nY)
        {
            ArrayList arrPoint = GetArrList(nTemplateId);
            if (arrPoint.Count == 0)
            {
                return false;
            }

            Point3d point = new Point3d();
            if (arrPoint.Count == 1)
            {
                point = (Point3d)arrPoint[0];
            }
            else
            {
                point = GetFocusPoint(arrPoint);
            }

            nX = point.nX;
            nY = point.nY;
            return true;
        }