Esempio n. 1
0
 public WorkInfo(MoldInfo mold, UserModel user, int workNum, Matrix4 mat) : base(mold, user)
 {
     this.Type       = PartType.Work;
     this.WorkNumber = workNum;
     this.Matr       = mat;
     this.MatrInfo   = new Matrix4Info(mat);
 }
Esempio n. 2
0
 public ElectrodeInfo(MoldInfo mold, UserModel user, ElectrodeAllInfo allInfo, Matrix4Info matInfo) : base(mold, user)
 {
     this.Type     = PartType.Electrode;
     this.MatrInfo = matInfo;
     this.AllInfo  = allInfo;
     this.Matr     = matInfo.Matr;
 }
Esempio n. 3
0
        public ElectrodeDrawingInfo(MoldInfo mold, UserModel user, ElectrodeAllInfo allInfo) : base(mold, user)
        {
            this.Type    = PartType.Drawing;
            this.AllInfo = allInfo;
            string temp = AllInfo.Preparetion.Preparation[0].ToString() + "*" + AllInfo.Preparetion.Preparation[1].ToString() + "*" + AllInfo.Preparetion.Preparation[2].ToString();

            this.StrPre = temp;
        }
Esempio n. 4
0
 /// <summary>
 /// 以属性得到实体
 /// </summary>
 /// <param name="obj"></param>
 /// <returns></returns>
 public new static WorkPieceInfo GetAttribute(NXObject obj)
 {
     try
     {
         return(new WorkPieceInfo(MoldInfo.GetAttribute(obj), UserModel.GetAttribute(obj)));
     }
     catch (NXException ex)
     {
         throw ex;
     }
 }
Esempio n. 5
0
 /// <summary>
 /// 以属性得到实体
 /// </summary>
 /// <param name="obj"></param>
 /// <returns></returns>
 public new static EDMInfo GetAttribute(NXObject obj)
 {
     try
     {
         return(new EDMInfo(MoldInfo.GetAttribute(obj), UserModel.GetAttribute(obj)));
     }
     catch (NXException ex)
     {
         ClassItem.WriteLogFile("未获取到EdmNumber 属性" + ex.Message);
         return(null);
     }
 }
Esempio n. 6
0
 /// <summary>
 /// 以属性得到实体
 /// </summary>
 /// <param name="obj"></param>
 /// <returns></returns>
 public new static ElectrodeInfo GetAttribute(NXObject obj)
 {
     try
     {
         return(new ElectrodeInfo(MoldInfo.GetAttribute(obj), UserModel.GetAttribute(obj), ElectrodeAllInfo.GetAttribute(obj), Matrix4Info.GetAttribute(obj)));
     }
     catch (NXException ex)
     {
         ClassItem.WriteLogFile("未获取到属性" + ex.Message);
         return(null);
     }
 }
 /// <summary>
 /// 设置属性
 /// </summary>
 /// <param name="objs"></param>
 /// <returns></returns>
 public virtual bool SetAttribute(params NXObject[] objs)
 {
     try
     {
         AttributeUtils.AttributeOperation("PartType", Enum.GetName(this.Type.GetType(), this.Type), objs);
         return(MoldInfo.SetAttribute(objs) && UserModel.SetAttribute(objs));
     }
     catch
     {
         return(false);
     }
 }
 /// <summary>
 /// 以属性得到实体
 /// </summary>
 /// <param name="obj"></param>
 /// <returns></returns>
 public static ParentAssmblieInfo GetAttribute(NXObject obj)
 {
     try
     {
         string             partType = AttributeUtils.GetAttrForString(obj, "PartType");
         ParentAssmblieInfo info     = new ParentAssmblieInfo(MoldInfo.GetAttribute(obj), UserModel.GetAttribute(obj));
         info.Type = (PartType)Enum.Parse(typeof(PartType), partType);
         return(info);
     }
     catch (NXException ex)
     {
         throw ex;
     }
 }
Esempio n. 9
0
        /// <summary>
        /// 以属性得到实体
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public new static WorkInfo GetAttribute(NXObject obj)
        {
            int num = 0;

            Matrix4 mat = new Matrix4();

            mat.Identity();
            try
            {
                num = AttributeUtils.GetAttrForInt(obj, "WorkNumber");
                WorkInfo info = new WorkInfo(MoldInfo.GetAttribute(obj), UserModel.GetAttribute(obj), num, Matrix4Info.GetAttribute(obj).Matr);
                info.Interference = AttributeUtils.GetAttrForBool(obj, "Interference");
                return(info);
            }
            catch (NXException ex)
            {
                ClassItem.WriteLogFile("未获取到属性" + ex.Message);
                return(new WorkInfo(MoldInfo.GetAttribute(obj), UserModel.GetAttribute(obj), num, mat));
            }
        }
Esempio n. 10
0
 /// <summary>
 /// 获取属性
 /// </summary>
 /// <param name="part"></param>
 protected virtual void GetAttribute(Part part)
 {
     this.PartTag = part;
     MoldInfo.GetAttribute(part);
     this.PartType = AttributeUtils.GetAttrForString(part, "PartType");
 }
Esempio n. 11
0
 /// <summary>
 /// 设置属性
 /// </summary>
 protected virtual void SetAttribute()
 {
     MoldInfo.SetAttribute(this.PartTag);
     AttributeUtils.AttributeOperation("PartType", this.PartType, this.PartTag);
 }
Esempio n. 12
0
 public EDMInfo(MoldInfo mold, UserModel user) : base(mold, user)
 {
     this.Type = PartType.EDM;
 }
Esempio n. 13
0
 public WorkPieceInfo(MoldInfo mold, UserModel user) : base(mold, user)
 {
     this.Type = PartType.Workpiece;
 }
 public ParentAssmblieInfo(MoldInfo mold, UserModel user)
 {
     this.MoldInfo  = mold;
     this.UserModel = user;
 }