tag_t part_tag; part_tag=UF_PART_ask_part_tag(PrtPath);
tag_t first_plan;
int count=0;
tag_t FeaTag=NULL_TAG;
uf_list_p_t face_list=NULL;
uf_list_p_t p1=NULL;
int type=UF_solid_type;
UF_OBJ_cycle_objs_in_part(part_tag,type,&FeaTag);
while(FeaTag!=NULL_TAG)
{
UF_MODL_ask_body_faces(FeaTag,&face_list);
UF_MODL_ask_list_count(face_list,&count);
p1=face_list;
do
{
int type2,norm_dir;
double center[3],dir[3],box[6],radius,rad_data;
UF_MODL_ask_face_data(p1->eid,&type2,center,dir,box,&radius,&rad_data,&norm_dir);
if(type2==UF_cylinder_type&&radius==5)
{
first_plan=p1->eid;
}
p1=p1->next;
}while(p1!=NULL);
}
UF_DISP_set_highlight(first_plan,1);
UF_MODL_delete_list(&face_list);
int ret;
tag_t to_part_occ; UF_ASSEM_ask_parent_component(first_plan,&to_part_occ); //得到的to_part_occ的值是0,这是为何啊啊??
int b=0;
b=UF_ASSEM_is_occurrence(to_part_occ); //这句运行后,得到的值是0,说明不是occ类型啊