uf_list_p_t face_list;
UF_MODL_ask_body_faces(bodyTAG, &face_list);
int count;
UF_MODL_ask_list_count(face_list, &count);
uf_list_p_t yz_face_list;
UF_MODL_create_list(&yz_face_list);
for (size_t i = 0; i < count; i++)
{
tag_t faceTAG;
UF_MODL_ask_list_item(face_list, i, &faceTAG);
int type_face;
UF_MODL_ask_face_type(faceTAG, &type_face);
if (type_face == UF_MODL_CYLINDRICAL_FACE)
{
//UF_OBJ_set_color(faceTAG, 186);
UF_MODL_put_list_item(yz_face_list, faceTAG);
int Type;
double Point[3];
double Dir[3];
double Box[6];
double Radius;
double RadData;
int NormDir;
UF_MODL_ask_face_data(faceTAG, &Type, Point, Dir, Box, &Radius, &RadData, &NormDir);
UF_UI_open_listing_window();
char msg[256];
sprintf(msg, "直径:%.2f", Radius*2);
UF_UI_write_listing_window("体的TAG:");
UF_UI_write_listing_window(msg);
UF_UI_write_listing_window("\n");
}
}
UF_MODL_ask_list_count(yz_face_list, &count);
}
标签:圆柱,list,face,ask,半径,faceTAG,UF,MODL From: https://www.cnblogs.com/firetuo/p/17132476.html