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

    怡宁塑胶模具设计
  • 相关阅读:
    mvc的视图渲染方式
    Numpy系列(六)- 形状操作
    Numpy系列(五)- 复制和视图
    Numpy系列(四)- 索引和切片
    Numpy系列(三)- 基本运算操作
    Numpy系列(二)- 数据类型
    Numpy系列(一)- array
    HTML参考手册
    pkuseg:一个多领域中文分词工具包
    Nginx实现JWT验证-基于OpenResty实现
  • 原文地址:https://www.cnblogs.com/hqsalanhuang/p/14691294.html
Copyright © 2011-2022 走看看