using System; using System.Collections; using System.Collections.Generic; using System.Linq; namespace KinematicsBase { #region BaseClass /// /// Clones the specified list. /// /// /// The list. /// List{``0}. [Serializable] public enum DeviceType { Default = 0, Device = 1, Robot = 2, AGV = 3, Gripper = 4, Err = 1000 } [Serializable] /// /// 接受选择的模型 /// public class ModelSelect { public string ModelCode { get; set; } public string ModelName { get; set; } public string tx { get; set; } public string ty { get; set; } public string rx { get; set; } public string ry { get; set; } public string rz { get; set; } public DeviceType DeviceTypeCode { get; set; } } [Serializable] public enum AxisFlag { X, Y, Z } /// /// 从一个姿态到另一个姿态是时间优先或速度有限 /// [Serializable] public enum MoveToPosePriorType { Time, Velocity } [Serializable] public class Position { public double X { set; get; } public double Y { set; get; } public double Z { set; get; } } [Serializable] public class FixedAngle { public FixedAngle() { } public double R { set; get; } public double P { set; get; } public double Y { set; get; } } /// /// 运动约束单位矩阵 /// [Serializable] public class PositionNormalMatrix { public int x { set; get; } public int y { set; get; } public int z { set; get; } public int rx { set; get; } public int ry { set; get; } public int rz { set; get; } } [Serializable] public class Quaternion { public Quaternion() { } public double X { set; get; } public double Y { set; get; } public double Z { set; get; } public double W { set; get; } } [Serializable] public class PositionFixedAngle { public PositionFixedAngle() { this.Position = new Position(); this.FixedAngle = new FixedAngle(); } public Position Position { set; get; } public FixedAngle FixedAngle { set; get; } } [Serializable] public class PositionQuaternion { public PositionQuaternion() { this.Position = new Position(); this.Quaternion = new Quaternion(); } public Position Position { set; get; } public Quaternion Quaternion { set; get; } } [Serializable] public class PositionQuaternionWithID : PositionQuaternion { public PositionQuaternionWithID() { this.UUID = ""; } public string UUID { set; get; } } [Serializable] public class Point { public Point() { } public Point(double x, double y, double z) { this.X = x; this.Y = y; this.Z = z; } public double X { get; set; } public double Y { get; set; } public double Z { get; set; } } [Serializable] public class Axis { public Axis() { this.Start = new Point(); this.End = new Point(); this.Flip = 0; } public Axis(Point start, Point end) { this.Start = start; this.End = end; this.Flip = 0; } public Point Start { get; set; } public Point End { get; set; } public AxisFlag AxisFlag { get; set; } /// /// 1.反向,0.正常 /// public int Flip { get; set; } public PositionFixedAngle Loaction { get; set; } public PositionQuaternion LoactionQuaternion { get; set; } } #endregion }