public override void CreateOperation(ElectrodeCAM eleCam, double inter)
 {
     this.Oper = ElectrodeOperationTemplate.CreateOperationOfZLevelMilling(this.NameModel, eleCam);
     this.Oper.Create(this.NameModel.OperName);
     if (Faces.Count > 0)
     {
         (this.Oper as ZLevelMillingModel).SetGeometry(Faces.ToArray());
     }
     if (levelFace != null)
     {
         (this.Oper as ZLevelMillingModel).SetCutLevel(levelFace);
     }
     if (steep)
     {
         (this.Oper as ZLevelMillingModel).SetSteep();
     }
     this.Oper.SetStock(-inter, -inter);
 }
        public override List <string> CreateOperation()
        {
            List <string> err = new List <string>();

            this.template = new ElectrodeCAMTemplateModel();
            if (this.nameModel == null)
            {
                throw new Exception("请现创建刀具路径所需要的路径!");
            }
            try
            {
                this.operModel = ElectrodeOperationTemplate.CreateOperationOfZLevelMilling(this.nameModel, template);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            try
            {
                this.operModel.Create(this.nameModel.OperName);
            }
            catch (NXException ex)
            {
                throw ex;
            }
            if (Faces.Count > 0)
            {
                try
                {
                    (this.operModel as ZLevelMillingModel).SetGeometry(Faces.ToArray());
                }
                catch (NXException ex)
                {
                    err.Add("设置加工面错误!           " + ex.Message);
                }
            }

            if (UMathUtils.IsEqual(levelPoint, new Point3d()))
            {
                try
                {
                    (this.operModel as ZLevelMillingModel).SetCutLevel(levelPoint);
                }
                catch (NXException ex)
                {
                    err.Add("设置加工深度错误!           " + ex.Message);
                }
            }

            if (steep)
            {
                try
                {
                    (this.operModel as ZLevelMillingModel).SetSteep();
                }
                catch (NXException ex)
                {
                    err.Add("设置加工陡峭角错误!           " + ex.Message);
                }
            }
            try
            {
                this.operModel.SetStock(-this.Inter, -this.Inter);
            }
            catch (NXException ex)
            {
                err.Add("设置加工余量错误!           " + ex.Message);
            }
            return(err);
        }