예제 #1
0
        /// <summary>
        /// 程序加载后需要对Mark点初始化//初始化badmark的模板
        /// </summary>
        public void InitMarks()
        {
            foreach (MarkCmdLine markCmdLine in GetMarkCmdLines2())
            {
                Log.Print("Init ModelFindPrm in pattern " + name);
                markCmdLine.ModelFindPrm.Init();
            }
            BadMarkCmdLine badMarkCmdLine = GetBadMarkCmdLine();

            if (badMarkCmdLine != null)
            {
                badMarkCmdLine.ModelFindPrm.Init();
            }
            foreach (NozzleCheckCmdLine nozzleCheckCmdLine in GetNozzleCmdLines())
            {
                Log.Print("Init nozzle ModelFindPrm in pattern " + name);
                nozzleCheckCmdLine.ModelFindPrm.Init();
            }
        }
예제 #2
0
 /// <summary>
 /// 获取当前pattern的badmark
 /// </summary>
 /// <returns></returns>
 public BadMarkCmdLine GetBadMarkCmdLine()
 {
     foreach (CmdLine cmdLine in cmdLineList)
     {
         if (!cmdLine.Enabled)
         {
             continue;
         }
         if (cmdLine is BadMarkCmdLine)
         {
             BadMarkCmdLine badMarkCmdLine = cmdLine as BadMarkCmdLine;
             return(badMarkCmdLine);
         }
         // 语法约束了Mark点命令行一定在在非Mark指令的前面
         else if (!(cmdLine is CommentCmdLine) && !(cmdLine is MarkCmdLine))
         {
             break;
         }
     }
     return(null);
 }