请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
国产SMT (源码)各场景高精度视觉引导系统
/// <summary>
/// 绕点旋转
/// </summary>
/// <param name="curPos">当前被旋转的点</param>
/// <param name="rotateCenter">旋转中心</param>
/// <param name="rotateAngle">旋转角度,单位为度</param>
/// <returns></returns>
internal static XYR Rotate_At1(XYR curPos, XYR rotateCenter, double rotateAngle)
{
double rad = rotateAngle * Math.PI / 180;
var res = new XYR();
res.X = rotateCenter.X (curPos.X - rotateCenter.X) * Math.Cos(rad) (curPos.Y - rotateCenter.Y) * Math.Sin(rad);
res.Y = rotateCenter.Y - (curPos.X - rotateCenter.X) * Math.Sin(rad) (curPos.Y - rotateCenter.Y) * Math.Cos(rad);
res.R = curPos.R rotateAngle;
if (res.R < -180)
{
res.R = 360;
}
else if (res.R >= 180)
{
res.R -= 360;
}
return res;
}