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 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); }
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); }