예제 #1
0
 //------------------------------------------------------------
 // Chuyển đổi Point thành ma trận 3x3
 //------------------------------------------------------------
 public static VisionMatrixObject ConvertPointToMatrix(AlignPointObject inputPoint)
 {
     float[] arrOut = new float[9];
     arrOut[0] = (float)Math.Cos(inputPoint.Theta);
     arrOut[1] = (float)-Math.Sin(inputPoint.Theta);
     arrOut[2] = inputPoint.X;
     arrOut[3] = (float)Math.Sin(inputPoint.Theta);
     arrOut[4] = (float)Math.Cos(inputPoint.Theta);
     arrOut[5] = inputPoint.Y;
     arrOut[6] = 0;
     arrOut[7] = 0;
     arrOut[8] = 1;
     return(new VisionMatrixObject(arrOut));
 }
예제 #2
0
 public bool AddPointRotate(AlignPointObject rbPoint, AlignPointObject visionPoint)
 {
     ListPointRobotRotate.Add(rbPoint);
     ListPointVisionRotate.Add(visionPoint);
     return(true);
 }
예제 #3
0
 public bool AddPointNormal(AlignPointObject rbPoint, AlignPointObject visionPoint)
 {
     ListPointRobotNormal.Add(rbPoint);
     ListPointVisionNormal.Add(visionPoint);
     return(true);
 }
예제 #4
0
 //------------------------------------------------------------
 // Chuyển đổi Point qua phép CalibNPoint
 //------------------------------------------------------------
 public static AlignPointObject ConvertPointCalibNPoint(AlignPointObject inputPoint, CalibrationNPointTool calibTool)
 {
     return(null);
 }
예제 #5
0
 //------------------------------------------------------------
 // Tính toán Offset từ tọa độ Robot cũ - mới
 //------------------------------------------------------------
 public static AlignPointObject CalPointOffset(AlignPointObject newRBPoint, AlignPointObject masterRBPoint)
 {
     return(new AlignPointObject(newRBPoint.X - masterRBPoint.X, newRBPoint.Y - masterRBPoint.Y, newRBPoint.Theta - masterRBPoint.Theta));
 }