OPENC函数UF_MODL UF_DISP UF_OBJ(name_switch) ( UF_DISP_ask_name_display_status、UF_DISP_set_name_display_status)

 1    /* TODO: Add your application code here */
 2     /*
 3     此程序主要演示的是name_switch (设置名称显示)
 4     */
 5     UF_initialize();
 6 
 7     //MODL_create_block1
 8     UF_FEATURE_SIGN sign=UF_NULLSIGN;
 9     double corner_pt[3]={0.0};
10     char *edge_len [3]={"50.0","80.0","100.0"};
11     tag_t blk_obj_id=NULL;
12     //ask_feat_body
13     tag_t body_obj_tag=NULL;
14     //OBJ_set_name
15     char obj_name[UF_OBJ_NAME_LEN+1]="叫爸爸";
16     //ask_name_display_status
17     int current_status;
18     //创建块1
19     UF_MODL_create_block1(sign,corner_pt,edge_len,&blk_obj_id);
20     //特征找体
21     UF_MODL_ask_feat_body(blk_obj_id,&body_obj_tag);
22     //设置名字
23     UF_OBJ_set_name(body_obj_tag,obj_name);
24     //询问显示状态
25 
26     UF_DISP_ask_name_display_status (&current_status);
27     //设置显示
28     if (current_status==UF_DISP_NAME_DISPLAY_OFF)//当前不显示
29     {
30         UF_DISP_set_name_display_status(UF_DISP_NAME_DISPLAY_ON); 
31     }
32     else
33     {
34         UF_DISP_set_name_display_status(UF_DISP_NAME_DISPLAY_OFF); 
35     }
36 
37     UF_terminate();

posted @ 2019-12-21 13:09  你好我叫赵老师  阅读(436)  评论(2编辑  收藏  举报