其他分享
首页 > 其他分享> > 【NX二次开发】ufun分割体

【NX二次开发】ufun分割体

作者:互联网

分割体

int doWork()
{
    //创建block
    UF_FEATURE_SIGN sign = UF_NULLSIGN;
    double douPt[3] = { 0.0, 0.0, 0.0 };
    char *Edge_Len[3] = { "99", "98", "97.1256" };
    tag_t tagBlock = NULL_TAG;
    UF_MODL_create_block1(sign, douPt, Edge_Len, &tagBlock);
    tag_t tagBody = NULL_TAG;
    UF_MODL_ask_feat_body(tagBlock, &tagBody);

    //创建基准平面
    double douPointOrigin[3] = { 0, 50, 0 };
    double dpuPlaneDir[3] = { 0, 1, 0 };
    tag_t tagPlane = NULL_TAG;
    UF_MODL_create_fixed_dplane(douPointOrigin, dpuPlaneDir, &tagPlane);

    //分割体
    tag_t bodies = { tagBody };
    int num_split_bodies = 0;
    tag_t* split_bodies = NULL_TAG;
    UF_MODL_split_body(1, &bodies, tagPlane, &num_split_bodies, &split_bodies);

    return 0;
}

效果:

 

标签:ufun,NULL,NX,tag,split,二次开发,TAG,UF,bodies
来源: https://www.cnblogs.com/KMould/p/16433494.html