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.CreateOperationOfPlanarMilling(this.nameModel, template); } catch (Exception ex) { throw ex; } try { this.operModel.Create(this.nameModel.OperName); } catch (NXException ex) { throw ex; } if (conditions.Count != 0) { try { (this.operModel as PlanarMillingModel).SetBoundary(floorPt, conditions.ToArray()); } catch (NXException ex) { err.Add("设置边界错误! " + ex.Message); } } if (burring) { try { (this.operModel as PlanarMillingModel).SetBurringDepth(); } catch (NXException ex) { err.Add("设置下刀量错误! " + ex.Message); } } try { this.operModel.SetStock(-this.Inter, 0.05); } catch (NXException ex) { err.Add("设置余量错误! " + ex.Message); } return(err); }
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); }