首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 企业软件 > 行业软件 >

NX CAM Cambnd.AskBoundaries的施用

2012-07-15 
NX CAM Cambnd.AskBoundaries的使用string operName FACE_MILLING? ? ? ? ? ? NXOpen.CAM.Operation

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

?

? ? ? ? ? ? }

热点排行