Beispiel #1
0
        public void GetLineWordResults(CornerLine cornerLine, ref ezLine line)
        {
            try
            {
                float result_CenterX = 0;
                float result_CenterY = 0;
                float result_Angle   = 0;
                FindCorner[cornerLine].FindLine(ref result_CenterX, ref result_CenterY, ref result_Angle);

                EPoint localSensor = eFixture.GetPoint(new EPoint(result_CenterX, result_CenterY), CoordinateHook.NotHook);
                EPoint world       = eCalibration.Fixture.GetPoint(new EPoint(localSensor.X, localSensor.Y), CoordinateHook.Hook);

                line = new ezLine(world.X, world.Y, result_Angle + eFixture.Angle);
            }
            catch (EException exc)
            {
                StackFrame[] stackFrames = new StackTrace(true).GetFrames();
                clsLogFile.LogTryCatch(stackFrames, exc.Message, true, true);
            }
            catch (Exception ex)
            {
                StackFrame[] stackFrames = new StackTrace(true).GetFrames();
                clsLogFile.LogTryCatch(stackFrames, ex.Message, true, true);
            }
        }
Beispiel #2
0
        private void btnLine_1_GetSample_Click(object sender, EventArgs e)
        {
            eFindLine_1.SetROIEnd();

            float result_CenterX = 0;
            float result_CenterY = 0;
            float result_Angle   = 0;

            eFindLine_1.FindLine(ref result_CenterX, ref result_CenterY, ref result_Angle);

            EPoint localSensor = eFixture.GetPoint(new EPoint(result_CenterX, result_CenterY), CoordinateHook.NotHook);
            EPoint world       = eCalibration.Fixture.GetPoint(new EPoint(localSensor.X, localSensor.Y), CoordinateHook.Hook);

            txtLine_1_Results_Center.Text = "X:" + world.X.ToString("0.000") + " " + "Y:" + world.Y.ToString("0.000");
            txtLine_1_Results_Angle.Text  = result_Angle.ToString("0.000");
            eFindLine_1.GetSample();
            eFindLine_1.ShowResult();

            line_1 = new ezLine(world.X, world.Y, result_Angle);
        }