NX二次开发-获取面的法向向量UF_MODL_ask_face_data

NX二次开发-获取面的法向向量UF_MODL_ask_face_data

NX9+VS2012

#include 
#include 
#include 
#include 


UF_initialize();

//创建圆柱
UF_FEATURE_SIGN Sign = UF_NULLSIGN;
double Origin[3] = {0.0, 0.0, 0.0};
char *Height = "100";
char *Diam = "50";
double Direction[3] = {0.0, 0.0, 1.0};
tag_t CylTag = NULL_TAG;
UF_MODL_create_cyl1(Sign, Origin, Height, Diam, Direction, &CylTag);

//特征找体
tag_t BodyTag = NULL_TAG;
UF_MODL_ask_feat_body(CylTag, &BodyTag);

//体找面
uf_list_p_t FaceList;
UF_MODL_ask_body_faces(BodyTag, &FaceList);

//获取链表数量
int Count;
UF_MODL_ask_list_count(FaceList, &Count);

UF_UI_open_listing_window();
//获取链表里的tag
for (int i = 0; i < Count; i++)
{
    tag_t FaceTag = NULL_TAG;
    UF_MODL_ask_list_item(FaceList, i, &FaceTag);

    //获取面的法向
    int Type;
    double Point[3];
    double Dir[3];
    double Box[6];
    double Radius[

你可能感兴趣的:(UG/NX二次开发,UG/NX二次开发,c++)