1 //设置class_dialog选择过滤 2 static int init_proc(UF_UI_selection_p_t select,void* user_data) 3 { 4 int num_triples = 1; 5 //实体 片体 6 UF_UI_mask_t mask_triples[] = {UF_solid_type,0,0}; 7 /* enable only lines and edges */ 8 if((UF_UI_set_sel_mask(select,UF_UI_SEL_MASK_CLEAR_AND_ENABLE_SPECIFIC,num_triples, mask_triples)) == 0) 9 { 10 return (UF_UI_SEL_SUCCESS); 11 } 12 else 13 { 14 return (UF_UI_SEL_FAILURE); 15 } 16 } 17 18 extern DllExport void ufsta( char *param, int *returnCode, int rlen ) 19 { 20 /* Initialize the API environment */ 21 if( UF_CALL(UF_initialize()) ) 22 { 23 /* Failed to initialize */ 24 return ; 25 } 26 is 27 / * the TODO: the Add your code here Wallpaper file application * / 28 UF_initialize (); 29 30 // select_with_class_dialog 31 is char Message [] = " category selection box " ; 32 char title [] = " by class select: " ; 33 is int scope = UF_UI_SEL_SCOPE_ANY_IN_ASSEMBLY; 34 is int Response = 0 ; 35 int COUNT = 0 ; 36 Objects * = tag_t NULL; 37 [ // 5943 38 is Double Translation [ . 3 ] = { 0.0 , 500.0 , 500.0 }; 39 Double matrix_value [ 16 ] = { 0.0 }; 40 / * 41 is translated from the absolute coordinate system 42 is Translation [0 ] the distance x direction 43 is Translation [. 1] to Y distance 44 is Translation [2] to the distance Z 45 * / 46 is // 5947 47 tag_t objects_array * = NULL; 48 int= move_or_copy 2 ; // . 1 - 2 the Move - Copy 49 int dest_layer = 0 ; // 0 - The Original Layer, -1 - The Work Layer,. 1 - 256 - The specified Layer 50 int trace_curves = 2 ; // trace curve status ON means 1, 2 OFF means 51 is tag_t copies * = NULL; // this is when move_or_copy is equal to 1 (movement) is not used. When move_or_copy 2 (copy), should be set to a null tag_t 52 is tag_t trace_curve_group = NULL; // if trace_curves = 2, provided herein is null 53 is int STATUS_VALUE = 0 ; 54 is // multiple choice box 55 UF_UI_select_with_class_dialog (message,title,scope,init_proc,NULL,&response,&count,&objects); 56 //分配内存 57 objects_array=(tag_t*)malloc(sizeof(tag_t)*count); 58 if (response == UF_UI_OK && count > 0) 59 { 60 for (int i=0; i<count; i++) 61 { 62 objects_array[i]=objects[i]; 63 UF_DISP_set_highlight(objects[i], 0); 64 } 65 66 } 67 // return the matrix to perform a linear transformation along the X-axis of the absolute coordinate system, Y and Z axes. 68 uf5943 (Translation, matrix_value); 69 // allocate memory 70 copies = (tag_t *) the malloc ( the sizeof (tag_t) * COUNT); 71 is // pan 72 uf5947 (matrix_value, objects_array, & COUNT, & move_or_copy, & dest_layer, & trace_curves, copies , & trace_curve_group, & STATUS_VALUE); 73 is // release the memory 74 Free (copies); 75 Free (objects_array); 76 / * 77 Note: 78 1. problems coordinates 79 Note translation transform is based on this stuff The absolute coordinate system (coordinate system put one o'clock is not unified coordinate system) direction of 80 2. Note the memory allocation. 81 3. If the parameter is the body after conversion into uf5947 translated to reference the body. 82 83 4. trace_curves state trajectory curve ps: I do not understand what is meant, for nothing explained god 84 * / 85 86 UF_terminate (); 87 88 / * the Terminate The Environment the API * / 89 UF_CALL (UF_terminate ()); 90 }
UFUN function UF_TRNS (translation transform) (uf5943, uf5947)
Guess you like
Origin www.cnblogs.com/zzyfym/p/12090675.html
Recommended
Ranking