59 lines
2.0 KiB
C#
59 lines
2.0 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using VisionAligner;
|
|
using VisionCommon;
|
|
|
|
namespace MaWeldingCommon.Vision.Aligner {
|
|
// 장비에서 필요한 얼라인 모드를 구현한다.
|
|
// class 이름을 변경하면 정상동작 하지 않는다.
|
|
/// <summary>
|
|
/// 장비 얼라인 모드 B
|
|
/// </summary>
|
|
public class MachineAlign_B : AlignMode {
|
|
/// <summary>
|
|
/// 생성자
|
|
/// </summary>
|
|
/// <param name="alignInfo">얼라인 정보</param>
|
|
public MachineAlign_B(AlignInfo alignInfo) : base(alignInfo) {
|
|
}
|
|
|
|
// 장비에서 필요한 얼라인을 구현한다.
|
|
// 1-Point 얼라인이 아니라면, N-Point 얼라인을 구현하면 된다.
|
|
#region N-Point Align
|
|
protected override AlignDelta CalculateT(List<DoublePoint> meaPoints, List<DoublePoint> refPoints, int flipY) {
|
|
return new AlignDelta() {
|
|
T = Angle.CreateWithDegree(3)
|
|
};
|
|
}
|
|
|
|
protected override AlignDelta CalculateT_ICP(
|
|
List<DoublePoint> meaPoints,
|
|
List<DoublePoint> refPoints,
|
|
int flipY) {
|
|
return new AlignDelta() {
|
|
T = Angle.CreateWithDegree(9)
|
|
};
|
|
}
|
|
|
|
protected override AlignDelta CalculateXY(List<DoublePoint> meaPoints, List<DoublePoint> refPoints, int flipY, DoublePoint thetaOrigin, Angle alignT) {
|
|
return new AlignDelta() {
|
|
Translation = new StaticPoint(1, 2),
|
|
T = Angle.CreateWithDegree(3)
|
|
};
|
|
}
|
|
#endregion
|
|
|
|
#region 1-Point Align
|
|
protected override AlignDelta CalculateXYT(DoublePoint meaPoint, DoublePoint refPoint, int flipY, DoublePoint thetaOrigin, Angle theta) {
|
|
return new AlignDelta() {
|
|
Translation = new StaticPoint(4, 5),
|
|
T = Angle.CreateWithDegree(6)
|
|
};
|
|
}
|
|
#endregion
|
|
}
|
|
}
|