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.CreateOperationOfPlanarMilling(this.nameModel, template);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            try
            {
                this.operModel.Create(this.nameModel.OperName);
            }
            catch (NXException ex)
            {
                throw ex;
            }
            if (conditions.Count != 0)
            {
                try
                {
                    (this.operModel as PlanarMillingModel).SetBoundary(floorPt, conditions.ToArray());
                }
                catch (NXException ex)
                {
                    err.Add("设置边界错误!           " + ex.Message);
                }
            }
            if (burring)
            {
                try
                {
                    (this.operModel as PlanarMillingModel).SetBurringDepth();
                }
                catch (NXException ex)
                {
                    err.Add("设置下刀量错误!           " + ex.Message);
                }
            }
            try
            {
                this.operModel.SetStock(-this.Inter, 0.05);
            }
            catch (NXException ex)
            {
                err.Add("设置余量错误!            " + ex.Message);
            }
            return(err);
        }
 public override void CreateOperation(ElectrodeCAM eleCam, double inter)
 {
     this.Oper = ElectrodeOperationTemplate.CreateOperationOfPlanarMilling(this.NameModel, eleCam);
     this.Oper.Create(this.NameModel.OperName);
     if (conditions.Count > 0)
     {
         (this.Oper as PlanarMillingModel).SetBoundary(floorPt, conditions.ToArray());
     }
     this.Oper.SetStock(-inter, 0.05);
 }
 public override void CreateOperation(ElectrodeCAM eleCam, double inter)
 {
     this.Oper = ElectrodeOperationTemplate.CreateOperationOfFaceMilling(this.NameModel, eleCam);
     this.Oper.Create(this.NameModel.OperName);
     if (Conditions.Count != 0)
     {
         (this.Oper as FaceMillingModel).SetBoundary(Conditions.ToArray());
     }
     this.Oper.SetStock(0.05, -inter);
 }
Пример #4
0
        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.CreateOperationOfFaceMilling(this.nameModel, template);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            try
            {
                this.operModel.Create(this.nameModel.OperName);
            }
            catch (NXException ex)
            {
                throw ex;
            }

            if (Conditions.Count != 0)
            {
                try
                {
                    (this.operModel as FaceMillingModel).SetBoundary(Conditions.ToArray());
                }
                catch (NXException ex)
                {
                    err.Add("设置边界错误!           " + ex.Message);
                }
            }
            try
            {
                this.operModel.SetStock(0.05, -this.Inter);
            }
            catch (NXException ex)
            {
                err.Add("设置余量错误!            " + ex.Message);
            }
            try
            {
                this.operModel.SetFeeds(600);
            }
            catch (NXException ex)
            {
                err.Add("设置切削进给错误!            " + ex.Message);
            }
            return(err);
        }
Пример #5
0
        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.CreateOperationOfCavityMilling(this.nameModel, template);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            try
            {
                this.operModel.Create(this.nameModel.OperName);
            }
            catch (NXException ex)
            {
                throw ex;
            }
            try
            {
                if ((0.05 - this.Inter) > 0)
                {
                    if (0.03 - this.Inter > 0)
                    {
                        this.operModel.SetStock(0.05 - this.Inter, 0.03 - this.Inter);
                    }
                    else
                    {
                        this.operModel.SetStock(0.05 - this.Inter, 0);
                    }
                }
                else
                {
                    this.operModel.SetStock(0, 0);
                }
            }
            catch (NXException ex)
            {
                err.Add("设置余量错误!            " + ex.Message);
            }
            return(err);
        }
Пример #6
0
 public override void CreateOperation(ElectrodeCAM eleCam, double inter)
 {
     this.Oper = ElectrodeOperationTemplate.CreateOperationOfSurfaceContour(this.NameModel, eleCam);
     this.Oper.Create(this.NameModel.OperName);
     (this.Oper as SurfaceContourModel).SetDriveMethod(SurfaceContourBuilder.DriveMethodTypes.AreaMilling);
     if (Faces.Count > 0)
     {
         (this.Oper as SurfaceContourModel).SetGeometry(Faces.ToArray());
     }
     if (steep)
     {
         (this.Oper as SurfaceContourModel).SetSteep();
     }
     this.Oper.SetStock(-inter, -inter);
 }
 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);
 }
Пример #8
0
 public override void CreateOperation(ElectrodeCAM eleCam, double inter)
 {
     this.Oper = ElectrodeOperationTemplate.CreateOperationOfCavityMilling(this.NameModel, eleCam);
     this.Oper.Create(this.NameModel.OperName);
     if ((0.05 - inter) > 0)
     {
         if (0.03 - inter > 0)
         {
             this.Oper.SetStock(0.05 - inter, 0.03 - inter);
         }
         else
         {
             this.Oper.SetStock(0.05 - inter, 0);
         }
     }
     else
     {
         this.Oper.SetStock(0, 0);
     }
 }
        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);
        }
        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.CreateOperationOfSurfaceContour(this.nameModel, template);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            try
            {
                this.operModel.Create(this.nameModel.OperName);
            }
            catch (NXException ex)
            {
                throw ex;
            }
            try
            {
                (this.operModel as SurfaceContourModel).SetDriveMethod(SurfaceContourBuilder.DriveMethodTypes.AreaMilling);
            }
            catch (NXException ex)
            {
                err.Add("设置加工驱动方式错误!           " + ex.Message);
            }
            if (Faces.Count > 0)
            {
                try
                {
                    (this.operModel as SurfaceContourModel).SetGeometry(Faces.ToArray());
                }
                catch (NXException ex)
                {
                    err.Add("设置加工错误!           " + ex.Message);
                }
            }
            if (this.flat)
            {
                try
                {
                    (this.operModel as SurfaceContourModel).SetSteep(60.0);
                }
                catch (NXException ex)
                {
                    err.Add("设置陡峭角错误!           " + ex.Message);
                }
            }
            try
            {
                this.operModel.SetStock(-this.Inter, -this.Inter);
            }
            catch (NXException ex)
            {
                err.Add("设置余量错误!            " + ex.Message);
            }

            return(err);
        }
Пример #11
0
        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.CreateOperationOfSurfaceContour(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 SurfaceContourModel).SetGeometry(Faces.ToArray());
                }
                catch (NXException ex)
                {
                    err.Add("设置加工错误!           " + ex.Message);
                }
            }

            if (ReferencetoolName != "")
            {
                try
                {
                    NCGroup toolGroup = template.FindTool(ReferencetoolName);
                    if (toolGroup == null)
                    {
                        err.Add("设置参考刀具错误!           " + "无法在模板中找到参考刀具");
                    }
                    else
                    {
                        Tool tool = toolGroup as Tool;
                        (this.operModel as SurfaceContourModel).SetReferenceTool(tool);
                    }
                }
                catch (NXException ex)
                {
                    err.Add("设置参考刀具错误!           " + ex.Message);
                }
            }
            try
            {
                this.operModel.SetStock(-this.Inter, -this.Inter);
            }
            catch (NXException ex)
            {
                err.Add("设置余量错误!            " + ex.Message);
            }
            return(err);
        }
        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.CreateOperationOfCavityMilling(this.nameModel, template);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            try
            {
                this.operModel.Create(this.nameModel.OperName);
            }
            catch (NXException ex)
            {
                throw ex;
            }
            try
            {
                NCGroup toolGroup = template.FindTool(ReferenceTool);
                if (toolGroup == null)
                {
                    err.Add("设置参考刀具错误!           " + "无法在模板中找到参考刀具");
                }
                else
                {
                    (this.operModel as CavityMillingModel).SetReferenceTool(toolGroup as Tool);
                }
            }
            catch (NXException ex)
            {
                err.Add("设置参考刀具错误!           " + ex.Message);
            }
            try
            {
                if ((0.05 - this.Inter) > 0)
                {
                    if (0.03 - this.Inter > 0)
                    {
                        this.operModel.SetStock(0.05 - this.Inter, 0.03 - this.Inter);
                    }
                    else
                    {
                        this.operModel.SetStock(0.05 - this.Inter, 0);
                    }
                }
                else
                {
                    this.operModel.SetStock(0, 0);
                }
            }
            catch (NXException ex)
            {
                err.Add("设置余量错误!            " + ex.Message);
            }
            return(err);
        }