`
kevinhrw
  • 浏览: 191196 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

NX CAM Cambnd.AskBoundaries的使用

阅读更多

string operName = "FACE_MILLING";

            NXOpen.CAM.Operation operation1 = (NXOpen.CAM.Operation)workPart.CAMSetup.CAMOperationCollection.FindObject(operName);

            int count;

            IntPtr[] boundaries;

            theUfSession.Cambnd.AskBoundaries(operation1.Tag, CamGeomType.CamBlank, out count, out boundaries);

            //theUfSession.Camgeom.AskItems(operation1.Tag, CamGeomType.CamTrim, out count, out boundaries);

 

            theSession.LogFile.WriteLine("boundary count: " + count);

            for (int i = 0; i < count; i++)

            {

                //theUfSession.Camgeom.AskItemEntity(boundaries[i], out entityTag);

                //NXObject obj = (NXObject)NXObjectManager.Get(entityTag);

                //ShowInfo(obj.Name);

 

                UFCambnd.BoundaryData boundaryData;

                theUfSession.Cambnd.AskBoundaryData(boundaries[i], out boundaryData);

                int itemsCount;

                IntPtr[] items;

                theUfSession.Cambnd.AskBoundaryItems(boundaries[i],out itemsCount,out items);

                for (int j = 0; j < itemsCount; j++)

                {

                    Tag entityTag;

                    theUfSession.Cambnd.AskItemEntity(items[j],out entityTag);

                    theUfSession.Disp.SetHighlight(entityTag, 1);

                }

                theSession.LogFile.WriteLine("boundaryData.boundary_type: " + boundaryData.boundary_type);

 

            }

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics