zoukankan      html  css  js  c++  java
  • NXOpen 选面找相邻面

    VS2010 NX8.5

    std::vector<Face *> getadjacentFace(Face *Adjacentface); //相邻面

    std::vector<Face *> HoleTable::getadjacentFace(Face *Adjacentface) //相邻面
    {
    try
    {
    std::vector<Edge *> selectfaceEdge; //边容器
    std::vector<Face *> AdjacentAllFace; //面容器
    std::vector<Face *> AdjacentAllFace1; //面容器
    selectfaceEdge.clear();
    AdjacentAllFace.clear();

    selectfaceEdge=Adjacentface->GetEdges();
    theSession->ListingWindow()->WriteLine("边的数量"+intToNXString(selectfaceEdge.size()));
    for( int i = 0 ; i < selectfaceEdge.size();i++)
    {
    Edge *AdjacentEdge1 = selectfaceEdge[i];
    AdjacentAllFace1.clear();
    AdjacentAllFace1=AdjacentEdge1->GetFaces();
    theSession->ListingWindow()->WriteLine("面的数量"+intToNXString(AdjacentAllFace1.size()));
    for( int j = 0 ; j < AdjacentAllFace1.size();j++)
    {
    Face *Adjacentface1 = AdjacentAllFace1[j];
    if(Adjacentface->Tag() != Adjacentface1->Tag())
    {
    AdjacentAllFace.push_back(Adjacentface1);
    theSession->ListingWindow()->WriteLine("面的TAG"+intToNXString(Adjacentface1->Tag()));
    Adjacentface1->Highlight();
    }
    }
    }

    return std::vector<Face *> (AdjacentAllFace);

    }
    catch(exception& ex)
    {
    //---- Enter your exception handling code here -----
    HoleTableOrigin::theUI->NXMessageBox()->Show("相邻面", NXOpen::NXMessageBox::DialogTypeError, ex.what());
    }
    }

    怡宁塑胶模具设计
  • 相关阅读:
    WCF双工通讯以及客户端间的间接通讯
    认识IoC
    学习“迷你ASP.NET MVC框架”后的小结
    MVP的PV模式与SC模式
    Android学习笔记(九) 视图的应用布局效果
    C# 动态编译
    C#中协变与抗变(逆变)
    线程池ThreadPool的初探
    关于异步的初步认识
    仿Office的程序载入窗体
  • 原文地址:https://www.cnblogs.com/hqsalanhuang/p/14691294.html
Copyright © 2011-2022 走看看