public override AbstractCreateOperation CopyOperation(int programNumber) { SurfaceContourCreateOperation fo = new SurfaceContourCreateOperation(this.site, this.toolName); fo.CreateOperationName(programNumber); return(fo); }
public override AbstractCreateOperation CopyOperation() { SurfaceContourCreateOperation so = new SurfaceContourCreateOperation(this.Site, this.ToolName); so.CreateOperationName(); // so.SetFaces(this.faces.ToArray()); return(so); }
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++; } string toolName = tool.GetFinishBallTool(); ZLevelMillingCreateOperation zo = new ZLevelMillingCreateOperation(count, toolName); //等高 zo.CreateOperationName(1); zo.SetSteep(true, true); SurfaceContourCreateOperation so = new SurfaceContourCreateOperation(count, toolName); //等宽 so.CreateOperationName(2); so.SetFlat(true, true); Programs.Add(new ProgramOperationName(count, new AbstractCreateOperation[] { zo, so })); 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 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)); }