<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12

      選擇零件實體加入到選擇的操作里

        1 #include <stdarg.h>
        2 //#include <stdio.h>
        3 #include <uf.h>
        4 #include <uf_object_types.h>
        5 #include <uf_part.h>
        6 #include <uf_ui.h>
        7 #include <uf_ui_ont.h>
        8 #include <uf_disp.h>
        9 #include <uf_retiring.h>
       10 #include <uf_obj.h>
       11 #include <uf_cam.h>
       12 #include <uf_camgeom.h>
       13 #include <uf_param.h>
       14 #include <string.h>
       15 #include <vector>
       16 
       17 //#define  MAX_CAMGEOM   200
       18 
       19 static int init_proc_body(UF_UI_selection_p_t select, void *user_data);
       20 static void init_camgeom_app_data(UF_CAMGEOM_app_data_p_t app_data);
       21 
       22 void ugdebugep(int line, const char* format, ...)
       23 {
       24     static char buf[1024];
       25     va_list     ap;
       26 
       27     sprintf(buf, "(%03d)", line);
       28     UF_UI_open_listing_window();
       29     UF_UI_write_listing_window(buf);
       30     va_start(ap, format);
       31     vsprintf(buf, format, ap);
       32     
       33     va_end(ap);
       34     UF_UI_write_listing_window(buf);
       35     UF_UI_write_listing_window("\n");
       36     
       37 }
       38 void pauseMsgbox(int line)
       39 {
       40     static char buf[16];
       41     sprintf(buf, "at line %d", line);
       42     uc1601(buf, 1);
       43 }
       44 #define  dp(...) ugdebugep(__LINE__ ,__VA_ARGS__);
       45 #define  markline ugdebugep(__LINE__ ,"at line");
       46 #define  dpause pauseMsgbox(__LINE__)
       47 
       48 
       49 static void do_camgeom_api(void)
       50 {
       51     //UF_CAMGEOM_app_data_p_t app_data_list[MAX_CAMGEOM] = { NULL };
       52     UF_CAMGEOM_app_data_p_t* app_data_list=NULL;
       53     tag_t                   *oper_tag = NULL , *entity_list = NULL;
       54     //entity_list[MAX_CAMGEOM] = { NULL_TAG };
       55     int                            i,entity_count = 0, oper_count = 0, err_code = 0, type = 0, subtype = 0;
       56     tag_t                   *entity_eid = NULL_TAG, view = NULL_TAG;
       57     logical                 auto_wall_selection = FALSE;
       58 
       59     //for (i = 0; i < MAX_CAMGEOM; i++) app_data_list[i] = NULL;
       60     if (UF_PART_ask_display_part() != null_tag)
       61     {        
       62         UF_UI_ONT_ask_selected_nodes(&oper_count, &oper_tag);        
       63         if (oper_count > 0)
       64         {
       65 
       66             
       67             
       68             char Cue[] = "選擇";
       69             char Title[] = "功能測試";
       70             int Scope = UF_UI_SEL_SCOPE_NO_CHANGE;
       71             int Response, entity_count = 0;            
       72             UF_UI_select_with_class_dialog(Cue, Title, Scope, init_proc_body, NULL, &Response, &entity_count, &entity_eid);            
       73 
       74             //申請內存 
       75             app_data_list = new UF_CAMGEOM_app_data_p_t[entity_count];        
       76 
       77             
       78 
       79             for (size_t m = 0; m < entity_count; m++)
       80             {    
       81                 //entity_list[m] = entity_eid[m];
       82 
       83                 app_data_list[m] = new UF_CAMGEOM_app_data_t;
       84 
       85                 init_camgeom_app_data(app_data_list[m]);
       86 
       87                 UF_DISP_set_highlight(entity_eid[m], 0);
       88             
       89             }
       90 
       91             
       92 
       93             if (entity_count > 0)
       94             {
       95                 
       96                 for (i = 0; i < oper_count; i++)
       97                 {
       98                     
       99                     UF_OBJ_ask_type_and_subtype(oper_tag[i], &type, &subtype);
      100                     if (type == UF_machining_operation_type)
      101                     {                        
      102                         UF_CAMGEOM_append_items(oper_tag[i], UF_CAM_part, entity_count, entity_eid, app_data_list);
      103                     }
      104                 }
      105             }
      106 
      107             
      108 
      109             for (size_t m = 0; m < entity_count; m++)
      110             {
      111                 delete app_data_list[m];
      112             }
      113             delete []app_data_list;
      114 
      115             UF_free(entity_eid);
      116         }
      117     }
      118 }
      119 
      120 static int init_proc_body(    UF_UI_selection_p_t select,    void* user_data)
      121 {
      122     int nums = 1;
      123     UF_UI_mask_t masks[] = {     UF_solid_type, 0, UF_UI_SEL_FEATURE_BODY };
      124 
      125     if ((UF_UI_set_sel_mask(select,    UF_UI_SEL_MASK_CLEAR_AND_ENABLE_SPECIFIC,    nums, masks)) == 0)
      126     {
      127         return (UF_UI_SEL_SUCCESS);
      128     }
      129     else
      130     {
      131         return (UF_UI_SEL_FAILURE);
      132     }
      133 }
      134 
      135 static void init_camgeom_app_data(UF_CAMGEOM_app_data_p_t app_data)
      136 {
      137     if (app_data)
      138     {
      139         app_data->has_stock = 0;
      140         app_data->has_cut_stock = 0;
      141         app_data->has_tolerances = 0;
      142         app_data->has_feedrate = 0;
      143         app_data->has_offset = 0;
      144         app_data->has_avoidance_type = 0;
      145         app_data->stock = 0.0;
      146         app_data->cut_stock[0] = 0.0;
      147         app_data->cut_stock[1] = 0.0;
      148         app_data->cut_stock[2] = 0.0;
      149         app_data->tolerances[0] = 0.0;
      150         app_data->tolerances[1] = 0.0;
      151         app_data->feedrate_unit = UF_CAM_feedrate_unit_per_minute;
      152         app_data->feedrate_value = 10.0;
      153         app_data->offset = 0.0;
      154         app_data->avoidance_type = UF_CAM_avoidance_type_warning;
      155     }
      156 }
      157 
      158 
      159 void ufusr(char *param, int *retcode, int param_len)
      160 {
      161     UF_initialize();
      162 
      163     do_camgeom_api();
      164 
      165     UF_terminate();
      166 }
      167 
      168 int ufusr_ask_unload(void)
      169 {
      170     return (UF_UNLOAD_IMMEDIATELY);
      171 }
      172 /************************************************************/

      特別感謝"梅子醬"同學的改進

      posted @ 2020-05-11 15:32  老婆餅里有老婆  閱讀(458)  評論(0)    收藏  舉報
      主站蜘蛛池模板: 日本一区午夜艳熟免费| 国产精品美女www爽爽爽视频 | 久热伊人精品国产中文| 国产成人高清亚洲综合| 国偷自产一区二区三区在线视频 | 日本一区二区三区18岁| 亚洲国产美女精品久久久| 重口SM一区二区三区视频| 久久国产精品第一区二区| 国产尤物精品自在拍视频首页| 久久人人爽人人人人爽av| 久久亚洲av成人一二三区| 国产普通话对白刺激| 亚洲精品色在线网站| 熟女视频一区二区三区嫩草| 亚洲日本韩国欧美云霸高清| 天堂一区人妻无码| 国产亚洲精品成人av久| 亚洲色www成人永久网址| 亚洲乱码中文字幕久久孕妇黑人| 人人爽天天碰天天躁夜夜躁| 激情综合色综合久久综合| 18禁在线一区二区三区| 久久婷婷五月综合97色直播| 人人爽人人爽人人片a免费| 久久综合九色综合97婷婷| av午夜福利一片免费看久久| 国产综合久久久久久鬼色| 亚洲国产欧美在线观看片| 国产精品 第一页第二页| 国产对白叫床清晰在线播放| 午夜成人精品福利网站在线观看 | 精品国产亚洲av麻豆特色| 中文字幕国产在线精品| 人妻丰满熟妇av无码区| 亚洲色成人网站www永久下载| 九九热精品免费在线视频| 亚洲 a v无 码免 费 成 人 a v| av午夜福利一片看久久| 四虎国产精品永久入口| 2021精品亚洲中文字幕|