qindongjun88 发表于 2011-7-22 10:06
face_list中的面应该是你要开口的那个面吧!
UF_MODL_delete_list_item
UF_MODL_put_list_item
UF_FEATURE_SIGN sign=UF_NULLSIGN;
UF_FEATURE_SIGN sign1=UF_POSITIVE;
UF_FEATURE_SIGN sign2=UF_NEGATIVE;
double block_orig[3]={0.0,0.0,0.0};
double block_orig1[3]={0.0,-18.0,0.0};
double block_orig2[3]={0.0,2.0,2.0};
double block_orig3[3]={2.0,2.0,0.0};
double block_orig4[3]={2.0,-58.0,2.0};
double block_orig5[3]={25.0,-58.0,25.0};
double block_orig6[3]={25.0,-18.0,25.0};
double block_orig7[3]={26.5,-18.0,26.5};
char*block_len[3]={"40","40","58"};
char*block_len1[3]={"58","40","40"};
char*block_len2[3]={"40","58","40"};
char*block_len3[3]={"98","36","36"};
char*block_len4[3]={"36","36","98"};
char*block_len5[3]={"36","98","36"};
char*block_len6[3]={"73","73","73"};
char*block_len7[3]={"33","33","33"};
char*block_len8[3]={"31.5","31.5","31.5"};
tag_t blk_obj,blk1_obj,blk2_obj,blk3_obj,blk4_obj,blk5_obj,blk6_obj,blk7_obj,blk8_obj;
UF_MODL_create_block1(sign,block_orig,block_len,&blk_obj);
UF_MODL_create_block1(sign1,block_orig,block_len1,&blk1_obj);
UF_MODL_create_block1(sign1,block_orig1,block_len2,&blk2_obj);
UF_MODL_create_block1(sign1,block_orig2,block_len3,&blk3_obj);
UF_MODL_create_block1(sign1,block_orig3,block_len4,&blk4_obj);
UF_MODL_create_block1(sign1,block_orig4,block_len5,&blk5_obj);
UF_MODL_create_block1(sign2,block_orig5,block_len6,&blk6_obj);
//建立抽壳参数
char*thickness="1.5";
uf_list_p_t hollow_face_list;
tag_t feature_obj_id;
tag_t pierce_face,npierce_face,mpierce_face;
uf_list_p_t face_list;
UF_MODL_ask_body_faces(blk3_obj,&face_list);
UF_MODL_ask_list_item(face_list,6,&pierce_face);
UF_MODL_delete_list(&face_list);
UF_MODL_ask_body_faces(blk4_obj,&face_list);
UF_MODL_ask_list_item(face_list,6,&npierce_face);
UF_MODL_delete_list(&face_list);
UF_MODL_ask_body_faces(blk5_obj,&face_list);
UF_MODL_ask_list_item(face_list,6,&mpierce_face);
UF_MODL_delete_list(&face_list);
UF_MODL_create_list(&hollow_face_list);
UF_MODL_put_list_item(hollow_face_list,pierce_face);
UF_MODL_put_list_item(hollow_face_list,npierce_face);
UF_MODL_put_list_item(hollow_face_list,mpierce_face);
UF_MODL_create_hollow(thickness,hollow_face_list,&feature_obj_id);
UF_MODL_delete_list(&hollow_face_list);
UF_MODL_create_block1(sign1,block_orig6,block_len7,&blk7_obj);
UF_MODL_create_block1(sign2,block_orig7,block_len8,&blk8_obj);
这是我的源程序,麻烦您给指导下啊 |