using A032.Process.Calibration;
|
using Bro.Common.Base;
|
using Bro.Common.Helper;
|
using Bro.Common.Interface;
|
using Bro.Common.Model;
|
using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using System.Threading.Tasks;
|
|
namespace A032.Process
|
{
|
public partial class ProcessControl
|
{
|
[ProcessMethod("CalibrationCollection", "RobotCalibration", "机器人9点标定", true)]
|
public ProcessResponse RobotCalibration(IOperationConfig config)
|
{
|
return new ProcessResponse(true);
|
}
|
|
[ProcessMethod("CalibrationCollection", "StandardPointCalibration", "标准点位标定", true)]
|
public ProcessResponse StandardPointCalibration(IOperationConfig config)
|
{
|
return new ProcessResponse(true);
|
}
|
|
public void SendCalibrationStartSignal(int stepNum)
|
{
|
|
}
|
|
private int MultipleStepsCalibration(CalibrationConfigCollection configs, Action<List<CalibrationConfig>> FinalCalculation)
|
{
|
throw new NotImplementedException();
|
|
//configs.Configs.ForEach(c =>
|
//{
|
// c.Image = null;
|
//});
|
|
//if (string.IsNullOrWhiteSpace(configs.CameraId) || !CameraDict.ContainsKey(configs.CameraId))
|
//{
|
// throw new ProcessException("标定配置未配置正确的相机编号");
|
//}
|
|
//if (string.IsNullOrWhiteSpace(configs.PositionCode))
|
//{
|
// throw new ProcessException("标定配置未指定路径位置");
|
//}
|
|
//CameraBase camera = CameraDict[configs.CameraId];
|
//FrmCalib9PDynamic frm9PDynamic = new FrmCalib9PDynamic(this, camera, configs, FinalCalculation);
|
//frm9PDynamic.ShowDialog();
|
|
//if (configs.InputPara == null || configs.InputPara.Count <= 0)
|
//{
|
// return (int)PLCReplyValue.NG;
|
//}
|
|
//if (configs.InputPara[0] <= 0 || configs.InputPara[0] > configs.Configs.Count)
|
//{
|
// configs.InputPara = null;
|
// return (int)PLCReplyValue.IGNORE;
|
//}
|
|
//int sequence = configs.InputPara[0];
|
|
////第一次
|
//if (sequence == 1)
|
//{
|
// configs.Configs.ForEach(c =>
|
// {
|
// c.Image = null;
|
// c.OfflineImagePath = "";
|
// c.CurrentPlatPoint = new CustomizedPoint();
|
// c.ImageMarkPoint = new CustomizedPoint();
|
// });
|
//}
|
|
//CalibrationConfig stepConfig = configs.Configs[sequence - 1];
|
|
//HDevEngineTool tool = _halconToolDict[]
|
|
//CalibMarkPoint(camera, stepConfig, sequence);
|
|
////获取当前平台点位
|
//stepConfig.CurrentPlatPoint = new CustomizedPoint(_monitorList.Skip(locationStartIndex).Take(4).ToList());
|
////stepConfig.CurrentPlatPoint = new CustomizedPoint(configs.InputPara.Skip(1).Take(4).ToList());
|
|
////最后一次
|
//if (sequence == configs.Configs.Count)
|
//{
|
// FinalCalculation?.Invoke(configs.Configs);
|
//}
|
|
//configs.InputPara = null;
|
//return (int)PLCReplyValue.OK;
|
}
|
}
|
}
|