/// <summary> /// 获取刀具路径数据 /// </summary> private void GetOper() { List <OperationData> data = new List <OperationData>(); string toolName = ""; foreach (CAMObject np in this.ProgramGroup.GetMembers()) { if (np is NXOpen.CAM.Operation) { AbstractOperationModel model = CreateOperationFactory.GetOperation(np as NXOpen.CAM.Operation); OperationData od = model.GetOperationData(); data.Add(od); if (toolName == "") { toolName = od.Tool.ToolName; } else if (!toolName.ToUpper().Equals(od.Tool.ToolName.ToUpper())) { Estimate = false; break; } } } this.OperData = data; }
public List <OperationData> GetOperationData() { List <OperationData> data = new List <OperationData>(); foreach (NXOpen.CAM.Operation op in GetOperation()) { AbstractOperationModel model = CreateOperationFactory.GetOperation(op); data.Add(model.GetOperationData()); } return(data); }
/// <summary> /// 获取刀具路径数据 /// </summary> private void GetOper() { foreach (CAMObject np in this.ProgramGroup.GetMembers()) { if (np is NXOpen.CAM.Operation) { AbstractOperationModel model = CreateOperationFactory.GetOperation(np as NXOpen.CAM.Operation); OperationData od = model.GetOperationData(); data.Add(od); } } }
public static AbstractOperationModel GetOperation(NXOpen.CAM.Operation oper) { int type, subtype; AbstractOperationModel model = null; UFSession theUFSession = UFSession.GetUFSession(); theUFSession.Obj.AskTypeAndSubtype(oper.Tag, out type, out subtype); switch (subtype) { case 260: model = new CavityMillingModel(oper); break; case 263: model = new ZLevelMillingModel(oper); break; case 210: model = new SurfaceContourModel(oper); break; case 110: model = new PlanarMillingModel(oper); break; case 261: model = new FaceMillingModel(oper); break; case 450: model = new PointToPointModel(oper); break; default: break; } return(model); }