赞
踩
在NX中,将所有对象高亮显示,就是通过遍历体-体的面-面的边,将所有的对象高亮显示。
- /// <summary>
- /// 所有对象不高亮显示
- /// </summary>
- public static void AllObjectsUnhightlight()
- {
- workPart = theSession.Parts.Work;
- BodyCollection bodyCollection = workPart.Bodies;
- Body[] bodies = bodyCollection.ToArray();
- foreach (var bd in bodies)
- {
- bd.Unhighlight();
- Face[] faces = bd.GetFaces();
- foreach (var fc in faces)
- {
- fc.Unhighlight();
- Edge[] edges = fc.GetEdges();
- foreach (var eg in edges)
- {
- eg.Unhighlight();
- }
- }
- }
- }
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。