//------------------------------------------------------------ // 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)); }
public bool AddPointRotate(AlignPointObject rbPoint, AlignPointObject visionPoint) { ListPointRobotRotate.Add(rbPoint); ListPointVisionRotate.Add(visionPoint); return(true); }
public bool AddPointNormal(AlignPointObject rbPoint, AlignPointObject visionPoint) { ListPointRobotNormal.Add(rbPoint); ListPointVisionNormal.Add(visionPoint); return(true); }
//------------------------------------------------------------ // Chuyển đổi Point qua phép CalibNPoint //------------------------------------------------------------ public static AlignPointObject ConvertPointCalibNPoint(AlignPointObject inputPoint, CalibrationNPointTool calibTool) { return(null); }
//------------------------------------------------------------ // 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)); }