Пример #1
0
        //BMGR-0069 cal ol points info by block link
        private void GeneratePathPtList(GENERIC_SYSTEM_PARAMETERS.BLOCKS.BLOCK curB,string dir,string pos,ref List <PointInfo> ptList)
        {
            int nextID = SyDB.GetNextBlkID(curB,dir,pos);

            if (nextID == curB.ID)//there is a coo, then change dir
            {
                dir    = SyDB.GetReverseDir(dir);
                nextID = SyDB.GetNextBlkID(curB,dir,pos);
            }

            if (-1 != m_Ol.Overlap_Block_ID_List.Block_ID.FindIndex(x => nextID == Convert.ToInt32(x.Value)))
            {
                var nextB = (GENERIC_SYSTEM_PARAMETERS.BLOCKS.BLOCK)Sys.GetNode(nextID,SyDB.GetInstance().blockInfoList.Cast <Node>().ToList());
                if (null != curB.Point_ID && null != nextB.Point_ID && curB.Point_ID == nextB.Point_ID)
                {//get a valid point
                    var       pt     = (GENERIC_SYSTEM_PARAMETERS.POINTS.POINT)Sys.GetNode((int)curB.Point_ID,SyDB.GetInstance().pointInfoList.Cast <Node>().ToList());
                    PointInfo ptInfo = new PointInfo(pt,SyDB.GetPosByBlocks(curB,nextB),SyDB.GetOrientByBlocks(curB,nextB),PointLocation.Overlap,this.m_Ol);
                    ptList.Add(ptInfo);
                }
                //go on search next
                GeneratePathPtList(nextB,dir,pos,ref ptList);
            }
        }