获取体的面
1 extern DllExport void ufsta(char *param, int *returnCode, int rlen) 2 { 3 UF_initialize(); 4 tag_t tagBody=50735; 5 uf_list_p_t bodyFaces; 6 UF_MODL_ask_body_faces(tagBody, &bodyFaces); //获得相邻面 7 int list_count = 0; 8 UF_MODL_ask_list_count(bodyFaces, &list_count); 9 for (int i = 0; i < list_count; i++) 10 { 11 tag_t tFace = NULL_TAG; 12 UF_MODL_ask_list_item(bodyFaces, i, &tFace); 13 UF_DISP_set_highlight(tFace, TRUE); 14 } 15 UF_MODL_delete_list(&bodyFaces); 16 17 UF_terminate(); 18 } 19 20 extern int ufusr_ask_unload(void) 21 { 22 return (UF_UNLOAD_IMMEDIATELY); 23 }
效果: