using System; using System.Collections.Generic; /// /// CurrPostion /// 2021.1.~ /// [Serializable] public class CurrPostion { ///// ///// 帧 ///// //public int Index //{ // get; // set; //} public string CraftCode { get; set; } /// /// 模型名 /// public string ModelCode { get; set; } /// /// 模型名 /// public string ModelName { get; set; } /// /// X /// public double X { get; set; } /// /// Y /// public double Y { get; set; } /// /// Z /// public double Z { get; set; } /// /// RX /// public double RX { get; set; } /// /// RY /// public double RY { get; set; } /// /// RZ /// public double RZ { get; set; } /// /// QX /// public double QX { get; set; } /// /// QY /// public double QY { get; set; } /// /// QZ /// public double QZ { get; set; } /// /// QW /// public double QW { get; set; } /// /// X_Base /// public double X_Base { get; set; } /// /// Y_Base /// public double Y_Base { get; set; } /// /// Z_Base /// public double Z_Base { get; set; } /// /// RX_Base /// public double RX_Base { get; set; } /// /// RY_Base /// public double RY_Base { get; set; } /// /// RZ_Base /// public double RZ_Base { get; set; } /// /// QX_Base /// public double QX_Base { get; set; } /// /// QY_Base /// public double QY_Base { get; set; } /// /// QZ_Base /// public double QZ_Base { get; set; } /// /// QW_Base /// public double QW_Base { get; set; } /// /// X_Tool /// public double X_Tool { get; set; } /// /// Y_Tool /// public double Y_Tool { get; set; } /// /// Z_Tool /// public double Z_Tool { get; set; } /// /// RX_Tool /// public double RX_Tool { get; set; } /// /// RY_Tool /// public double RY_Tool { get; set; } /// /// RZ_Tool /// public double RZ_Tool { get; set; } /// /// QX_Tool /// public double QX_Tool { get; set; } /// /// QY_Tool /// public double QY_Tool { get; set; } /// /// QZ_Tool /// public double QZ_Tool { get; set; } /// /// QW_Tool /// 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 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; } /////// /////// 带 currentJoint 信息 /////// ////[Serializable] ////public class CurrJoint : CurrPostion ////{ //// public List currentJoint = null; ////} ///// ///// 带 currentJoint 信息 ///// //[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"; }