private void CreateOper()
        {
            int count = 1;

            AbstractCreateOperation rough = new RoughCreateOperation(count, tool.GetRoughTool()); //开粗

            this.Oper.Add(rough);
            count++;
            string temp = tool.GetTwiceRoughTool();

            if (temp.Equals(""))
            {
                AbstractCreateOperation twice = new TwiceRoughCreateOperation(count, temp, tool.GetRoughTool()); //二次开粗
                this.Oper.Add(twice);
                count++;
            }
            AbstractCreateOperation face = new FaceMillingCreateOperation(count, tool.GetFinishFlatTool()); //光平面

            this.Oper.Add(face);
            count++;
            AbstractCreateOperation planar = new PlanarMillingCreateOperation(count, tool.GetFinishFlatTool());//光侧面

            this.Oper.Add(planar);
            count++;
            AbstractCreateOperation station = new BaseStationCreateOperation(count, tool.GetBaseStationTool());//光基准台

            this.Oper.Add(station);
        }
        public override AbstractCreateOperation CopyOperation(int programNumber)
        {
            PlanarMillingCreateOperation po = new PlanarMillingCreateOperation(this.site, this.toolName);

            po.CreateOperationName(programNumber);
            return(po);
        }
Пример #3
0
        private void CreateOper()
        {
            int count = 1;

            AbstractCreateOperation rough = new RoughCreateOperation(count, tool.GetRoughTool()); //开粗

            this.Oper.Add(rough);
            count++;
            string temp = tool.GetTwiceRoughTool();

            if (!temp.Equals(""))
            {
                TwiceRoughCreateOperation twice = new TwiceRoughCreateOperation(count, temp); //二次开粗
                twice.SetReferencetool(tool.GetRoughTool());
                this.Oper.Add(twice);
                count++;
            }
            FaceMillingCreateOperation face1 = new FaceMillingCreateOperation(count, tool.GetFinishFlatTool()); //光平面

            face1.SetBoundary(CamInfo.GetPlaneFaces().ToArray());
            this.Oper.Add(face1);
            PlanarMillingCreateOperation planar1 = new PlanarMillingCreateOperation(count, tool.GetFinishFlatTool());//光侧面

            planar1.SetBoundary(new Point3d(0, 0, this.CamInfo.BaseFace.BoxMinCorner.Z), this.CamInfo.BasePlanarPlanarBoundary.GetHoleBoundary().ToArray());
            this.Oper.Add(planar1);
            count++;

            ZLevelMillingCreateOperation zl = new ZLevelMillingCreateOperation(count, "BN0.98");
            List <Face> faces = this.CamInfo.GetSteepFaces();

            if (faces.Count > 0)
            {
                zl.SetFaces(faces.ToArray());
                zl.SetCutLevel(this.CamInfo.BaseFace.Face);
            }
            this.Oper.Add(zl);
            count++;

            FaceMillingCreateOperation face2 = new FaceMillingCreateOperation(count, tool.GetFinishFlatTool()); //光毛刺

            face2.SetBoundary(CamInfo.GetPlaneFaces().ToArray());
            this.Oper.Add(face2);
            PlanarMillingCreateOperation planar2 = new PlanarMillingCreateOperation(count, tool.GetFinishFlatTool());//光毛刺

            planar2.SetBoundary(new Point3d(0, 0, this.CamInfo.BaseFace.BoxMinCorner.Z), this.CamInfo.BasePlanarPlanarBoundary.GetHoleBoundary().ToArray());
            planar2.SetBurringBool(true);
            this.Oper.Add(planar2);
            count++;


            BaseStationCreateOperation station = new BaseStationCreateOperation(count, tool.GetBaseStationTool());//光基准台
            BoundaryModel model;
            double        blank;

            this.CamInfo.BasePlanarPlanarBoundary.GetPeripheralBoundary(out model, out blank);
            model.ToolSide = NXOpen.CAM.BoundarySet.ToolSideTypes.OutsideOrRight;
            station.SetBoundary(new Point3d(0, 0, this.CamInfo.BaseSubfaceFace.BoxMinCorner.Z), model);
            this.Oper.Add(station);
        }
        public override void CreateProgramName()
        {
            int count = 1;

            string rough = tool.GetRoughTool();
            AbstractCreateOperation ro = new RoughCreateOperation(count, rough);  //开粗

            ro.CreateOperationName(1);
            Programs.Add(new ProgramOperationName(count, ro));
            count++;
            string twice = rough;

            foreach (string tl in tool.GetTwiceRoughTool()) //二次开粗
            {
                TwiceRoughCreateOperation to = new TwiceRoughCreateOperation(count, tl);
                to.CreateOperationName(1);
                to.SetReferencetool(twice);
                Programs.Add(new ProgramOperationName(count, to));
                twice = tl;
                count++;
            }


            AbstractCreateOperation fo1 = new FaceMillingCreateOperation(count, tool.GetFinishFlatTool()); //光平面

            fo1.CreateOperationName(1);
            AbstractCreateOperation po1 = new PlanarMillingCreateOperation(count, tool.GetFinishFlatTool()); //光侧面

            po1.CreateOperationName(2);
            Programs.Add(new ProgramOperationName(count, new AbstractCreateOperation[] { fo1, po1 }));
            count++;

            ZLevelMillingCreateOperation zo = new ZLevelMillingCreateOperation(count, tool.GetFinishBallTool()); //等高

            zo.CreateOperationName(1);
            zo.SetSteep(false, false);
            Programs.Add(new ProgramOperationName(count, zo));
            count++;

            AbstractCreateOperation fo2 = new FaceMillingCreateOperation(count, tool.GetFinishFlatTool()); //去毛刺

            fo2.CreateOperationName(1);
            PlanarMillingCreateOperation po2 = new PlanarMillingCreateOperation(count, tool.GetFinishFlatTool()); //去毛刺

            po2.CreateOperationName(2);
            po2.SetBurringBool(true);
            Programs.Add(new ProgramOperationName(count, new AbstractCreateOperation[] { fo2, po2 }));
            count++;

            AbstractCreateOperation bfo = new BaseFaceCreateOperation(count, tool.GetBaseFaceTool()); //光基准平面

            bfo.CreateOperationName(1);
            Programs.Add(new ProgramOperationName(count, bfo));
            count++;
            AbstractCreateOperation bsf = new BaseStationCreateOperation(count, tool.GetBaseStationTool()); //光基准台

            bsf.CreateOperationName(1);
            Programs.Add(new ProgramOperationName(count, bsf));
        }
        public override AbstractCreateOperation CopyOperation()
        {
            PlanarMillingCreateOperation po = new PlanarMillingCreateOperation(this.Site, this.ToolName);

            po.CreateOperationName();
            po.SetBoundary(this.floorPt, this.conditions.ToArray());
            return(po);
        }
Пример #6
0
        public override void CreateProgramName()
        {
            int count = 1;

            AbstractCreateOperation ro = new RoughCreateOperation(count, "EM8");  //开粗

            ro.CreateOperationName(1);
            Programs.Add(new ProgramOperationName(count, ro));
            count++;

            TwiceRoughCreateOperation to = new TwiceRoughCreateOperation(count, "EM3");

            to.CreateOperationName(1);
            to.SetReferencetool("EM8");
            RounghSurfaceCreateOperation rso = new RounghSurfaceCreateOperation(count, "EM3");

            rso.CreateOperationName(2);
            Programs.Add(new ProgramOperationName(count, new AbstractCreateOperation[] { to, rso }));
            count++;

            AbstractCreateOperation fo1 = new FaceMillingCreateOperation(count, "EM2.98"); //光平面

            fo1.CreateOperationName(1);
            AbstractCreateOperation po1 = new PlanarMillingCreateOperation(count, "EM2.98"); //光侧面

            po1.CreateOperationName(2);
            Programs.Add(new ProgramOperationName(count, new AbstractCreateOperation[] { fo1, po1 }));
            count++;


            ZLevelMillingCreateOperation zo = new ZLevelMillingCreateOperation(count, "BN0.98"); //等高

            zo.CreateOperationName(1);
            SurfaceContourCreateOperation so = new SurfaceContourCreateOperation(count, "BN0.98"); //等宽

            so.CreateOperationName(2);
            Programs.Add(new ProgramOperationName(count, new AbstractCreateOperation[] { zo, so }));
            count++;

            AbstractCreateOperation bfo = new BaseFaceCreateOperation(count, "EM7.98"); //光基准平面

            bfo.CreateOperationName(1);
            Programs.Add(new ProgramOperationName(count, bfo));
            count++;
            AbstractCreateOperation bsf = new BaseStationCreateOperation(count, "EM7.98"); //光基准台

            bsf.CreateOperationName(1);
            Programs.Add(new ProgramOperationName(count, bsf));
        }
Пример #7
0
        private void CreateOper()
        {
            int count = 1;

            AbstractCreateOperation rough = new RoughCreateOperation(count, "EM8"); //开粗

            this.Oper.Add(rough);
            count++;

            TwiceRoughCreateOperation twice = new TwiceRoughCreateOperation(count, "EM3"); //二次开粗

            twice.SetReferencetool("EM8");
            this.Oper.Add(twice);
            count++;

            FaceMillingCreateOperation face1 = new FaceMillingCreateOperation(count, "EM2.98"); //光平面

            this.Oper.Add(face1);
            PlanarMillingCreateOperation planar1 = new PlanarMillingCreateOperation(count, "EM2.98");//光侧面

            this.Oper.Add(planar1);
            count++;

            SurfaceContourCreateOperation so = new SurfaceContourCreateOperation(count, "BN1.98");

            this.Oper.Add(so);
            ZLevelMillingCreateOperation zl = new ZLevelMillingCreateOperation(count, "BN1.98");

            this.Oper.Add(zl);
            count++;


            BaseStationCreateOperation station = new BaseStationCreateOperation(count, tool.GetBaseStationTool());//光基准台
            BoundaryModel model;
            double        blank;

            this.CamInfo.BasePlanarPlanarBoundary.GetPeripheralBoundary(out model, out blank);
            model.ToolSide = NXOpen.CAM.BoundarySet.ToolSideTypes.OutsideOrRight;
            station.SetBoundary(new Point3d(0, 0, this.CamInfo.BaseSubfaceFace.BoxMinCorner.Z), model);
            this.Oper.Add(station);
        }
Пример #8
0
        public override void CreateProgramName()
        {
            int count = 1;

            string rough = tool.GetRoughTool();
            AbstractCreateOperation ro = new RoughCreateOperation(count, rough);  //开粗

            ro.CreateOperationName(1);
            Programs.Add(new ProgramOperationName(count, ro));
            count++;
            string twice = rough;

            foreach (string tl in tool.GetTwiceRoughTool()) //二次开粗
            {
                TwiceRoughCreateOperation to = new TwiceRoughCreateOperation(count, tl);
                to.CreateOperationName(1);
                to.SetReferencetool(twice);
                if (twice.Equals(rough, StringComparison.CurrentCultureIgnoreCase))
                {
                    RounghSurfaceCreateOperation rso = new RounghSurfaceCreateOperation(count, tl);
                    rso.CreateOperationName(2);
                    Programs.Add(new ProgramOperationName(count, new AbstractCreateOperation[] { to, rso }));
                    twice = tl;
                    count++;
                    continue;
                }
                Programs.Add(new ProgramOperationName(count, to));
                twice = tl;
                count++;
            }


            AbstractCreateOperation fo1 = new FaceMillingCreateOperation(count, tool.GetFinishFlatTool()); //光平面

            fo1.CreateOperationName(1);
            AbstractCreateOperation po1 = new PlanarMillingCreateOperation(count, tool.GetFinishFlatTool()); //光侧面

            po1.CreateOperationName(2);
            Programs.Add(new ProgramOperationName(count, new AbstractCreateOperation[] { fo1, po1 }));
            count++;

            string toolName = tool.GetFinishBallTool();
            ZLevelMillingCreateOperation zo = new ZLevelMillingCreateOperation(count, toolName); //等高

            zo.CreateOperationName(1);
            zo.SetSteep(true, false);
            SurfaceContourCreateOperation so = new SurfaceContourCreateOperation(count, toolName); //等宽

            so.CreateOperationName(2);
            so.SetFlat(true, false);
            Programs.Add(new ProgramOperationName(count, new AbstractCreateOperation[] { zo, so }));
            count++;

            AbstractCreateOperation fo2 = new FaceMillingCreateOperation(count, tool.GetFinishFlatTool()); //去毛刺

            fo2.CreateOperationName(1);
            PlanarMillingCreateOperation po2 = new PlanarMillingCreateOperation(count, tool.GetFinishFlatTool()); //去毛刺

            po2.CreateOperationName(2);
            po2.SetBurringBool(true);
            Programs.Add(new ProgramOperationName(count, new AbstractCreateOperation[] { fo2, po2 }));
            count++;

            AbstractCreateOperation bfo = new BaseFaceCreateOperation(count, tool.GetBaseFaceTool()); //光基准平面

            bfo.CreateOperationName(1);
            Programs.Add(new ProgramOperationName(count, bfo));
            count++;
            AbstractCreateOperation bsf = new BaseStationCreateOperation(count, tool.GetBaseStationTool()); //光基准台

            bsf.CreateOperationName(1);
            Programs.Add(new ProgramOperationName(count, bsf));
        }