예제 #1
0
 /// <summary>
 /// 创建part档
 /// </summary>
 /// <returns></returns>
 private NXOpen.Assemblies.Component CreateElePart()
 {
     NXOpen.Assemblies.Component eleComp = elePart.Create();
     if (eleComp != null)
     {
         PartUtils.SetPartWork(eleComp);
         NXOpen.Features.Feature feat = AssmbliesUtils.WaveBodys(this.head.ConditionModel.Bodys.ToArray());
         this.waveBodys = (feat as NXOpen.Features.BodyFeature).GetBodies();
     }
     return(eleComp);
 }
예제 #2
0
 /// <summary>
 ///连接电极
 /// </summary>
 /// <param name="headBodys"></param>
 /// <returns></returns>
 public List <Body> WaveEleHeadBody(List <Body> headBodys)
 {
     try
     {
         PartUtils.SetPartWork(this.EleComp);
         List <Body>      waveBodys = AssmbliesUtils.WaveBodys(headBodys.ToArray()).GetBodies().ToList();
         Matrix4          inv       = this.info.Matr.GetInversMatrix();
         CoordinateSystem csys      = BoundingBoxUtils.CreateCoordinateSystem(this.info.Matr, inv);
         NXObject         obj       = MoveObject.MoveObjectOfCsys(csys, waveBodys.ToArray());
         return(waveBodys);;
     }
     catch (NXException ex)
     {
         ClassItem.WriteLogFile("连接体错误!");
         throw ex;
     }
 }