1 NX9+VS2012 2 3 #include <uf.h> 4 #include <uf_modl.h> 5 #include <uf_obj.h> 6 7 8 UF_initialize(); 9 10 //创建块 11 UF_FEATURE_SIGN Sign = UF_NULLSIGN;//设置布尔 12 double Corner_pt[3] = {0.0, 0.0, 0.0};//设置原点 13 char *Edge_Len[3] = {"100", "100", "100"};//设置长宽高 14 tag_t BlkTag = NULL_TAG; 15 UF_MODL_create_block1(Sign, Corner_pt, Edge_Len, &BlkTag); 16 17 //特征找体 18 tag_t BodyTag = NULL_TAG; 19 UF_MODL_ask_feat_body (BlkTag,&BodyTag); 20 21 //设置透明度 22 UF_OBJ_set_translucency(BodyTag, 50); 23 24 UF_terminate();