1 //用到的函数 2 //UF_MODL_create_block1 ,UF_MODL_ask_feat_body,UF_OBJ_set_name,UF_CSYS_map_point 3 UF_initialize(); 4 5 //MODL_create_block1 6 UF_FEATURE_SIGN sign=UF_NULLSIGN; 7 double corner_pt[3]={0.0}; 8 char *edge_len [3]={"50.0","80.0","100.0"}; 9 tag_t blk_obj_id=NULL; 10 //ask_feat_body 11 tag_t body_obj_tag=NULL; 12 tag_t body_obj_tag_2=NULL; 13 //OBJ_set_name 14 char obj_name[UF_OBJ_NAME_LEN+1]="块1"; 15 char obj_name_2[UF_OBJ_NAME_LEN+1]="块2"; 16 //CSYS_map_poin 17 int input_csys=UF_CSYS_ROOT_WCS_COORDS; 18 int output_csys=UF_CSYS_WORK_COORDS; 19 double input_point [. 3 ] = { 0.0 }; 20 is Double output_point is [ . 3 ] = { 0.0 }; 21 is // creation block 1 (the origin of absolute about CSYS However, the long side direction relative to the WCS.) 22 is UF_MODL_create_block1 (Sign, corner_pt, edge_len, & blk_obj_id); 23 is // characterized in looking body 24 UF_MODL_ask_feat_body (blk_obj_id, & body_obj_tag); 25 // set the name 26 is UF_OBJ_set_name (body_obj_tag, of obj_name); 27 // coordinate system map 28 UF_CSYS_map_point (input_csys, input_point, output_csys, output_point is ); 29 // block 2 30 UF_FEATURE_SIGN sign_2=UF_NULLSIGN; 31 double corner_pt_2[3]={output_point[0],output_point[1],output_point[2]}; 32 char *edge_len_2[3]={"50.0","80.0","100.0"}; 33 tag_t blk_obj_id_2=NULL; 34 //创建块2 35 UF_MODL_create_block1(sign_2,corner_pt_2,edge_len_2,&blk_obj_id_2); 36 //特征找体 37 UF_MODL_ask_feat_body (blk_obj_id_2, & body_obj_tag_2); 38 // set first name 39 UF_OBJ_set_name (body_obj_tag_2, obj_name_2); 40 // ****************** Note Note ****** **************** // 41 / * 42 to pay attention to the problem create a coordinate system wherein modl in, for example, his creation block 43 the origin of the absolute coordinate system is to follow, however, the edge relative to the length direction of WCS 44 is a coordinate system. 45 Therefore, when the feature creation or modeling environment, preferably a coordinate system, 46 is then performed to create operation. 47 * / 48 49 UF_terminate ();
UFUN function UF_CSYS UF_MODL UF_OBJ function (note modeling coordinate system);
Guess you like
Origin www.cnblogs.com/zzyfym/p/12038635.html
Ranking