【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; }
效果: