【NX二次开发】ufun修剪体
修剪体
int doWork() { //创建块 UF_FEATURE_SIGN sign = UF_NULLSIGN;//设置布尔 double douPt[3] = { 0.0, 0.0, 0.0 };//设置原点 char *cEdgeLen[3] = { "100", "100", "100" };//设置长宽高 tag_t tagBlock = NULL_TAG; UF_MODL_create_block1(sign, douPt, cEdgeLen, &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 tagTrimFeature = NULL_TAG; UF_MODL_trim_body(tagBody, tagPlane, 0, &tagTrimFeature); return 0; }
效果: