Ejemplo n.º 1
0
        public override void Calculate(InspectedPanel currentPanel, object file)
        {
            try
            {
                _CenterOffsetResult    = null;
                _RotationResult        = null;
                _StretchResult         = null;
                _DefectStatisticResult = null;

                var Boxes = GetCandidateBoxes(currentPanel, PrinterCommonSetting);

                //Calculate
                CenterOffsetCorrectionAlgorithm cocAlgo = new CenterOffsetCorrectionAlgorithm(PrinterCommonSetting.Clone());
                RotationCorrectionAlgorithm     rcAlgo  = new RotationCorrectionAlgorithm(PrinterCommonSetting.Clone());
                StretchAlgorithm sAlgo  = new StretchAlgorithm();
                DefectStatistic  dsAlgo = new DefectStatistic();


                _CenterOffsetResult    = (CenterOffsetResult)cocAlgo.Calculate(Boxes, currentPanel, null);
                _RotationResult        = (RotationResult)rcAlgo.Calculate(Boxes, currentPanel, _CenterOffsetResult);
                _StretchResult         = (StretchResult)sAlgo.Calculate(null, currentPanel, null);
                _DefectStatisticResult = (DefectStatisticResult)dsAlgo.Calculate(Boxes, currentPanel, null);//=>從failbox來
            }
            catch (Exception e)
            {
                throw new CaculateException(e.Message);
            }
        }
Ejemplo n.º 2
0
        public override void Calculate(InspectedPanel currentPanel, object file)
        {
            try
            {
                _CenterOffsetResult    = null;
                _RotationResult        = null;
                _StretchResult         = null;
                _DefectStatisticResult = null;

                var Boxes = GetCandidateBoxes(currentPanel, PrinterCommonSetting);

                //Calculate
                CenterOffsetCorrectionAlgorithm cocAlgo = new CenterOffsetCorrectionAlgorithm(PrinterCommonSetting.Clone());
                RotationCorrectionAlgorithm     rcAlgo  = new RotationCorrectionAlgorithm(PrinterCommonSetting.Clone());
                StretchAlgorithm   sAlgo      = new StretchAlgorithm();
                DefectStatistic    dsAlgo     = new DefectStatistic();
                EkraFiducailOffset ekraFMAlgo = new EkraFiducailOffset();

                _CenterOffsetResult    = (CenterOffsetResult)cocAlgo.Calculate(Boxes, currentPanel, null);
                _RotationResult        = (RotationResult)rcAlgo.Calculate(Boxes, currentPanel, _CenterOffsetResult);
                _StretchResult         = (StretchResult)sAlgo.Calculate(null, currentPanel, null);
                _DefectStatisticResult = (DefectStatisticResult)dsAlgo.Calculate(Boxes, currentPanel, null);

                //Wipe
                _WipeReason = JudgeWipeHelper.JudgeWipeByPriorityStrategy(currentPanel, Boxes);
            }
            catch (Exception e)
            {
                throw new CaculateException(e.Message);
            }
        }
Ejemplo n.º 3
0
        public override void Calculate(InspectedPanel currentPanel, object file)
        {
            try
            {
                _CenterOffsetResult    = null;
                _RotationResult        = null;
                _StretchResult         = null;
                _DefectStatisticResult = null;

                var Boxes = GetCandidateBoxes(currentPanel, PrinterCommonSetting);

                //Calculate
                CenterOffsetCorrectionAlgorithm cocAlgo = new CenterOffsetCorrectionAlgorithm(PrinterCommonSetting.Clone());
                RotationCorrectionAlgorithm     rcAlgo  = new RotationCorrectionAlgorithm(PrinterCommonSetting.Clone());
                StretchAlgorithm sAlgo  = new StretchAlgorithm();
                DefectStatistic  dsAlgo = new DefectStatistic();
                //Yamaha該方法和Ese要計算 each box的HAV percentage 平均功能一致,故重用
                PadHAVAvg padAvgAlgo = new PadHAVAvg();

                _CenterOffsetResult    = (CenterOffsetResult)cocAlgo.Calculate(Boxes, currentPanel, null);
                _RotationResult        = (RotationResult)rcAlgo.Calculate(Boxes, currentPanel, _CenterOffsetResult);
                _StretchResult         = (StretchResult)sAlgo.Calculate(null, currentPanel, null);
                _DefectStatisticResult = (DefectStatisticResult)dsAlgo.Calculate(Boxes, currentPanel, null); //=>從failbox來
                _PadHAVAvgResult       = (PadHAVAvgResult)padAvgAlgo.Calculate(Boxes, null, null);           //YAMAHA需要額外的avg統計
                _WipeReason            = JudgeWipeHelper.JudgeWipeByPriorityStrategy(currentPanel, Boxes);
            }
            catch (Exception e)
            {
                throw new CaculateException(e.Message);
            }
        }