Ejemplo n.º 1
0
        public AbstractElectrodeOperation(ElectrodeModel ele, ElectrodeCAMInfo info)
        {
            this.EleModel = ele;
            Part workPart = Session.GetSession().Parts.Work;

            CamInfo = info;
            tool    = new ComputeTool(CamInfo.MinDim, CamInfo.MinDia);
            Cam     = new ElectrodeCAM();
        }
 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);
 }
Ejemplo n.º 4
0
        public AbstractElectrodeOperation(ElectrodeModel ele, bool isInter)
        {
            this.ele = ele;
            Part workPart = Session.GetSession().Parts.Work;

            camInfo = new ElectrodeCAMInfo(ele, isInter);
            tool    = new ComputeTool(camInfo.MinDim, camInfo.MinDia);
            if (workPart.Tag != ele.PartTag.Tag)
            {
                PartUtils.SetPartDisplay(ele.PartTag);
            }
            Cam = new ElectrodeCAM();
        }
Ejemplo n.º 5
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);
 }
Ejemplo n.º 7
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);
     }
 }
        private static NCGroupModel GetNcGroupModelOfName(OperationNameModel model, ElectrodeCAM cam)
        {
            Part         workPart = Session.GetSession().Parts.Work;
            NCGroupModel group    = new NCGroupModel()
            {
                GeometryGroup = cam.FindGeometry("WORKPIECE"),
                MethodGroup   = cam.MethodGroup.Find(a => a.Name.ToUpper().Equals("CU")),
                ToolGroup     = cam.FindTool(model.ToolName)
            };
            NCGroup temp = cam.FindProgram(model.ProgramName);

            if (temp == null)
            {
                NXOpen.CAM.NCGroup nCGroup1 = (NXOpen.CAM.NCGroup)workPart.CAMSetup.CAMGroupCollection.FindObject("AAA");
                NXOpen.CAM.NCGroup nCGroup2 = workPart.CAMSetup.CAMGroupCollection.CreateProgram(nCGroup1, "electrode", "AAA_1", NXOpen.CAM.NCGroupCollection.UseDefaultName.True, model.ProgramName);
                group.ProgramGroup = nCGroup2;
            }
            else
            {
                group.ProgramGroup = temp;
            }
            return(group);
        }
        /// <summary>
        /// 创建等高铣
        /// </summary>
        /// <param name="model"></param>
        /// <param name="cam"></param>
        /// <returns></returns>
        public static AbstractOperationModel CreateOperationOfZLevelMilling(OperationNameModel model, ElectrodeCAM cam)
        {
            NCGroupModel group = GetNcGroupModelOfName(model, cam);

            return(new ZLevelMillingModel(group, model.templateName, model.templateOperName));
        }
        /// <summary>
        /// 创建固定轮廓铣
        /// </summary>
        /// <param name="model"></param>
        /// <param name="cam"></param>
        /// <returns></returns>
        public static AbstractOperationModel CreateOperationOfSurfaceContour(OperationNameModel model, ElectrodeCAM cam)
        {
            NCGroupModel        group = GetNcGroupModelOfName(model, cam);
            SurfaceContourModel sur   = new SurfaceContourModel(group, model.templateName, model.templateOperName);

            return(sur);
        }
 /// <summary>
 /// 创建型腔铣
 /// </summary>
 /// <param name="model"></param>
 /// <param name="cam"></param>
 /// <returns></returns>
 public static AbstractOperationModel CreateOperationOfCavityMilling(OperationNameModel model, ElectrodeCAM cam)
 {
     return(new CavityMillingModel(GetNcGroupModelOfName(model, cam), model.templateName, model.templateOperName));
 }
Ejemplo n.º 12
0
 /// <summary>
 /// 创建刀路
 /// </summary>
 /// <param name="eleCam"></param>
 /// <param name="inter">电极间隙</param>
 public abstract void CreateOperation(ElectrodeCAM eleCam, double inter);