其他分享
首页 > 其他分享> > 【NX二次开发】获取体的面

【NX二次开发】获取体的面

作者:互联网

获取体的面

int getBodyFaces(tag_t tagBody, int iType, vector<tag_t> *vecFaces)
{
    uf_list_p_t list1 = NULL;
    UF_MODL_create_list(&list1);
    double douFaceBox[6];
    double  douOFaceRadius;
    double  douFaceRadData;
    int  iFaceNormDir;
    int  iFaceType;
    double douFacePoint[3];
    double douFaceDir[3];

    UF_MODL_ask_body_faces(tagBody, &list1);
    int count = 0;
    UF_MODL_ask_list_count(list1, &count);
    for (int i = 0; i < count; i++)
    {
        tag_t tagPlane = NULL_TAG;
        UF_MODL_ask_list_item(list1, i, &tagPlane);
        UF_MODL_ask_face_data(tagPlane, &iFaceType, douFacePoint, douFaceDir, douFaceBox, &douOFaceRadius, &douFaceRadData, &iFaceNormDir);
        if ((iType == -1) || (iFaceType == iType))
        {
            (*vecFaces).push_back(tagPlane);
        }
    }
    UF_free(list1);
    list1 = NULL;
    return 0;
}
iType:

标签:iType,int,double,list1,NX,获取,二次开发,UF,MODL
来源: https://www.cnblogs.com/KMould/p/16385576.html