You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
2.1 KiB
C#
57 lines
2.1 KiB
C#
using Rs.Framework;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Rs.MotionPlat.Commom
|
|
{
|
|
public class FixtureManager
|
|
{
|
|
/// <summary>
|
|
/// 获取治具的拍照位置
|
|
/// </summary>
|
|
/// <param name="fixtureIndex"></param>
|
|
/// <returns></returns>
|
|
public static TargetPosition GetFixtureGrabPos(int fixtureIndex)
|
|
{
|
|
TargetPosition targetPosition = new TargetPosition();
|
|
switch (fixtureIndex)
|
|
{
|
|
case 1:
|
|
targetPosition.X = GlobalVar.Fixture1GrabImageX;
|
|
targetPosition.Y1 = GlobalVar.FixtureSideY1;
|
|
targetPosition.Y2 = GlobalVar.Fixture1GrabImageY2;
|
|
break;
|
|
case 2:
|
|
targetPosition.X = GlobalVar.Fixture2GrabImageX;
|
|
targetPosition.Y1 = GlobalVar.FixtureSideY1;
|
|
targetPosition.Y2 = GlobalVar.Fixture2GrabImageY2;
|
|
break;
|
|
case 3:
|
|
targetPosition.X = GlobalVar.Fixture3GrabImageX;
|
|
targetPosition.Y1 = GlobalVar.FixtureSideY1;
|
|
targetPosition.Y2 = GlobalVar.Fixture3GrabImageY2;
|
|
break;
|
|
case 4:
|
|
targetPosition.X = GlobalVar.Fixture4GrabImageX;
|
|
targetPosition.Y1 = GlobalVar.FixtureSideY1;
|
|
targetPosition.Y2 = GlobalVar.Fixture4GrabImageY2;
|
|
break;
|
|
case 5:
|
|
targetPosition.X = GlobalVar.Fixture5GrabImageX;
|
|
targetPosition.Y1 = GlobalVar.FixtureSideY1;
|
|
targetPosition.Y2 = GlobalVar.Fixture5GrabImageY2;
|
|
break;
|
|
case 6:
|
|
targetPosition.X = GlobalVar.Fixture6GrabImageX;
|
|
targetPosition.Y1 = GlobalVar.FixtureSideY1;
|
|
targetPosition.Y2 = GlobalVar.Fixture6GrabImageY2;
|
|
break;
|
|
}
|
|
return targetPosition;
|
|
}
|
|
}
|
|
}
|