init: 导入项目到 meswork Gitea
This commit is contained in:
467
DataMirrorTools_Simulator/Foundation/Base.Class/CurrPostion.cs
Normal file
467
DataMirrorTools_Simulator/Foundation/Base.Class/CurrPostion.cs
Normal file
@@ -0,0 +1,467 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
/// <summary>
|
||||
/// CurrPostion
|
||||
/// 2021.1.~
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class CurrPostion
|
||||
{
|
||||
///// <summary>
|
||||
///// 帧
|
||||
///// </summary>
|
||||
//public int Index
|
||||
//{
|
||||
// get;
|
||||
// set;
|
||||
//}
|
||||
public string CraftCode
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 模型名
|
||||
/// </summary>
|
||||
public string ModelCode
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 模型名
|
||||
/// </summary>
|
||||
public string ModelName
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// X
|
||||
/// </summary>
|
||||
public double X
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// Y
|
||||
/// </summary>
|
||||
public double Y
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// Z
|
||||
/// </summary>
|
||||
public double Z
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// RX
|
||||
/// </summary>
|
||||
public double RX
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// RY
|
||||
/// </summary>
|
||||
public double RY
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// RZ
|
||||
/// </summary>
|
||||
public double RZ
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// QX
|
||||
/// </summary>
|
||||
public double QX
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// QY
|
||||
/// </summary>
|
||||
public double QY
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// QZ
|
||||
/// </summary>
|
||||
public double QZ
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// QW
|
||||
/// </summary>
|
||||
public double QW
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// X_Base
|
||||
/// </summary>
|
||||
public double X_Base
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// Y_Base
|
||||
/// </summary>
|
||||
public double Y_Base
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// Z_Base
|
||||
/// </summary>
|
||||
public double Z_Base
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// RX_Base
|
||||
/// </summary>
|
||||
public double RX_Base
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// RY_Base
|
||||
/// </summary>
|
||||
public double RY_Base
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// RZ_Base
|
||||
/// </summary>
|
||||
public double RZ_Base
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// QX_Base
|
||||
/// </summary>
|
||||
public double QX_Base
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// QY_Base
|
||||
/// </summary>
|
||||
public double QY_Base
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// QZ_Base
|
||||
/// </summary>
|
||||
public double QZ_Base
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// QW_Base
|
||||
/// </summary>
|
||||
public double QW_Base
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// X_Tool
|
||||
/// </summary>
|
||||
public double X_Tool
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// Y_Tool
|
||||
/// </summary>
|
||||
public double Y_Tool
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// Z_Tool
|
||||
/// </summary>
|
||||
public double Z_Tool
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// RX_Tool
|
||||
/// </summary>
|
||||
public double RX_Tool
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// RY_Tool
|
||||
/// </summary>
|
||||
public double RY_Tool
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// RZ_Tool
|
||||
/// </summary>
|
||||
public double RZ_Tool
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// QX_Tool
|
||||
/// </summary>
|
||||
public double QX_Tool
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// QY_Tool
|
||||
/// </summary>
|
||||
public double QY_Tool
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// QZ_Tool
|
||||
/// </summary>
|
||||
public double QZ_Tool
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// QW_Tool
|
||||
/// </summary>
|
||||
public double QW_Tool
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
|
||||
public string CurrJoint { get; set; }
|
||||
public string MoveType { get; set; }
|
||||
public double J1 { get; set; }
|
||||
public double J2 { get; set; }
|
||||
public double J3 { get; set; }
|
||||
public double J4 { get; set; }
|
||||
public double J5 { get; set; }
|
||||
public double J6 { get; set; }
|
||||
|
||||
public string ProcessCode { get; set; }
|
||||
public int SequenceNo { get; set; }
|
||||
public string ProcessName { get; set; }
|
||||
public int UseTime { get; set; }
|
||||
|
||||
|
||||
public List<JointData> currentJoint = null;
|
||||
|
||||
|
||||
public void SetCurrJoint()
|
||||
{
|
||||
this.CurrJoint =
|
||||
"["
|
||||
+ J1.ToString("f5") + ","
|
||||
+ J2.ToString("f5") + ","
|
||||
+ J3.ToString("f5") + ","
|
||||
+ J4.ToString("f5") + ","
|
||||
+ J5.ToString("f5") + ","
|
||||
+ J6.ToString("f5")
|
||||
+ "]";
|
||||
}
|
||||
public void SetTcpQ(double[] tcpQ)
|
||||
{
|
||||
X = tcpQ[0];
|
||||
Y = tcpQ[1];
|
||||
Z = tcpQ[2];
|
||||
QX = tcpQ[3];
|
||||
QY = tcpQ[4];
|
||||
QZ = tcpQ[5];
|
||||
QW = tcpQ[6];
|
||||
}
|
||||
public void SetTcpRpy(double[] tcpRpy)
|
||||
{
|
||||
X = tcpRpy[0];
|
||||
Y = tcpRpy[1];
|
||||
Z = tcpRpy[2];
|
||||
RX = tcpRpy[3];
|
||||
RY = tcpRpy[4];
|
||||
RZ = tcpRpy[5];
|
||||
}
|
||||
public void SetJ(double[] p_JList)
|
||||
{
|
||||
J1 = p_JList[0];
|
||||
J2 = p_JList[1];
|
||||
J3 = p_JList[2];
|
||||
J4 = p_JList[3];
|
||||
J5 = p_JList[4];
|
||||
J6 = p_JList[5];
|
||||
SetCurrJoint();
|
||||
}
|
||||
public double[] GetJ()
|
||||
{
|
||||
return new double[] { J1, J2, J3, J4, J5, J6 };
|
||||
}
|
||||
public double[] GetTcpQ()
|
||||
{
|
||||
return new double[] { X, Y, Z, QX, QY, QZ, QW };
|
||||
}
|
||||
public double[] GetTcpRpy()
|
||||
{
|
||||
return new double[] { X, Y, Z, RX, RY, RZ };
|
||||
}
|
||||
public double[] GetTen()
|
||||
{
|
||||
return new double[] { X, Y, Z, QX, QY, QZ, QW, RX, RY, RZ };
|
||||
}
|
||||
public double[] GetBaseTen()
|
||||
{
|
||||
return new double[] { X_Base, Y_Base, Z_Base, QX_Base, QY_Base, QZ_Base, QW_Base, RX_Base, RY_Base, RZ_Base };
|
||||
}
|
||||
public double[] GetBaseQ()
|
||||
{
|
||||
return new double[] { X_Base, Y_Base, Z_Base, QX_Base, QY_Base, QZ_Base, QW_Base };
|
||||
}
|
||||
public double[] GetBaseRpy()
|
||||
{
|
||||
return new double[] { X_Base, Y_Base, Z_Base, RX_Base, RY_Base, RZ_Base };
|
||||
}
|
||||
public double[] GetToolTen()
|
||||
{
|
||||
return new double[] { X_Tool, Y_Tool, Z_Tool, QX_Tool, QY_Tool, QZ_Tool, QW_Tool, RX_Tool, RY_Tool, RZ_Tool };
|
||||
}
|
||||
public double[] GetToolQ()
|
||||
{
|
||||
return new double[] { X_Tool, Y_Tool, Z_Tool, QX_Tool, QY_Tool, QZ_Tool, QW_Tool };
|
||||
}
|
||||
public double[] GetToolRpy()
|
||||
{
|
||||
return new double[] { X_Tool, Y_Tool, Z_Tool, RX_Tool, RY_Tool, RZ_Tool };
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class JointData
|
||||
{
|
||||
public string id;
|
||||
public string name;
|
||||
public string value;
|
||||
public string type;
|
||||
}
|
||||
|
||||
|
||||
/////// <summary>
|
||||
/////// 带 currentJoint 信息
|
||||
/////// </summary>
|
||||
////[Serializable]
|
||||
////public class CurrJoint : CurrPostion
|
||||
////{
|
||||
//// public List<JointData> currentJoint = null;
|
||||
////}
|
||||
|
||||
///// <summary>
|
||||
///// 带 currentJoint 信息
|
||||
///// </summary>
|
||||
//[Serializable]
|
||||
//public class CurrJoint_J : CurrJoint
|
||||
//{
|
||||
|
||||
|
||||
|
||||
//}
|
||||
public class CurrJointName
|
||||
{
|
||||
|
||||
public const string CraftCode = "CraftCode";
|
||||
public const string ProcessCode = "ProcessCode";
|
||||
public const string SequenceNo = "SequenceNo";
|
||||
public const string ProcessName = "ProcessName";
|
||||
public const string UseTime = "UseTime";
|
||||
public const string X = "X";
|
||||
public const string Y = "Y";
|
||||
public const string Z = "Z";
|
||||
public const string RX = "RX";
|
||||
public const string RY = "RY";
|
||||
public const string RZ = "RZ";
|
||||
public const string X_Base = "X_Base";
|
||||
public const string Y_Base = "Y_Base";
|
||||
public const string Z_Base = "Z_Base";
|
||||
public const string RX_Base = "RX_Base";
|
||||
public const string RY_Base = "RY_Base";
|
||||
public const string RZ_Base = "RZ_Base";
|
||||
public const string X_Tool = "X_Tool";
|
||||
public const string Y_Tool = "Y_Tool";
|
||||
public const string Z_Tool = "Z_Tool";
|
||||
public const string RX_Tool = "RX_Tool";
|
||||
public const string RY_Tool = "RY_Tool";
|
||||
public const string RZ_Tool = "RZ_Tool";
|
||||
public const string QX = "QX";
|
||||
public const string QY = "QY";
|
||||
public const string QZ = "QZ";
|
||||
public const string QW = "QW";
|
||||
public const string QX_Base = "QX_Base";
|
||||
public const string QY_Base = "QY_Base";
|
||||
public const string QZ_Base = "QZ_Base";
|
||||
public const string QW_Base = "QW_Base";
|
||||
public const string QX_Tool = "QX_Tool";
|
||||
public const string QY_Tool = "QY_Tool";
|
||||
public const string QZ_Tool = "QZ_Tool";
|
||||
public const string QW_Tool = "QW_Tool";
|
||||
|
||||
public const string ModelCode = "ModelCode";
|
||||
public const string ModelName = "ModelName";
|
||||
public const string Reverse = "Reverse";
|
||||
|
||||
public const string CurrJoint = "CurrJoint";
|
||||
public const string MoveType = "MoveType";
|
||||
public const string J1 = "J1";
|
||||
public const string J2 = "J2";
|
||||
public const string J3 = "J3";
|
||||
public const string J4 = "J4";
|
||||
public const string J5 = "J5";
|
||||
public const string J6 = "J6";
|
||||
}
|
||||
Reference in New Issue
Block a user