NX9+VS2012 #include <uf.h> #include <uf_ui.h> #include <uf_ui_ont.h> #include <uf_camgeom.h> static int select_filter_proc_fn(tag_t object, int type[3], void* user_data, UF_UI_selection_p_t select) { if (object == NULL) { return UF_UI_SEL_REJECT; } else { return UF_UI_SEL_ACCEPT; } } static int init_proc(UF_UI_selection_p_t select, void* user_data) { int num_triples = 1;//可选类型的数量 UF_UI_mask_t mask_triples[] = {UF_solid_type, UF_solid_body_subtype, UF_UI_SEL_FEATURE_ANY_FACE};//可选对象类型 UF_UI_set_sel_mask(select, UF_UI_SEL_MASK_CLEAR_AND_ENABLE_SPECIFIC, num_triples, mask_triples); if ((UF_UI_set_sel_procs(select, select_filter_proc_fn, NULL, user_data)) == 0) { return UF_UI_SEL_SUCCESS; } else { return UF_UI_SEL_FAILURE; } } UF_initialize(); //获取当前加工导航器选中的对象数量和TAG int count = 0; tag_t* objects = NULL_TAG; UF_UI_ONT_ask_selected_nodes(&count, &objects); for (int i = 0; i < count; i++) { //单对象选择对话框 char sCue[] = "单对象选择对话框"; char sTitle[] = "单对象选择对话框"; int iScope = UF_UI_SEL_SCOPE_NO_CHANGE; int iResponse; tag_t faceTag = NULL_TAG; tag_t tView = NULL_TAG; double adCursor[3]; UF_UI_select_with_single_dialog(sCue, sTitle, iScope, init_proc, NULL, &iResponse, &faceTag, adCursor, &tView); //设置切削区域 tag_t faceEntity[1] = {faceTag}; UF_CAMGEOM_append_items(objects[i], UF_CAM_cut_area, 1, faceEntity, NULL); } //释放 UF_free(objects); UF_terminate(); Caesar卢尚宇 2020年5月22日
NX CAM二次开发-UF_CAMGEOM_append_items设置切削区域
转载本文章为转载内容,我们尊重原作者对文章享有的著作权。如有内容错误或侵权问题,欢迎原作者联系我们进行内容更正或删除文章。
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
WPS二次开发系列:WPS SDK功能效果展示
WPS二次开发,WPS SDk功能效果展示
Word WPS 二次开发 Office -
NX二次开发UF_CAM_ask_cam_preferences 函数介绍
此函数提供 CAM 首选项的当前设置。
java 开发语言 二次开发 #include UI -
NX二次开发UF_CAM_init_session 函数介绍
此函数根据 $UGII _ CAM _ CONFIG 指定的配置文件的内容初始化当前 CAM 会话。如果 CAM 会话当前存在,则首先卸载它。
java 开发语言 二次开发 #include UI -
NX二次开发UF_CAM_opt_ask_object 函数介绍
Templates.此函数提供 NX 对象的标记,该标记对应于指定的 Object Parameter Template 类型和子类型。模板。
java 数据库 jvm NX二次开发 UG二次开发 -
NX二次开发UF_CAM_opt_add_type 函数介绍
此函数将指定的零件文件作为新类型添加到现有的对象参数模板中。包含在指定部件文件中的所有子类型都作为对象参数模板子类型添加。
java 开发语言 NX二次开发 UG二次开发 二次开发 -
NX二次开发UF_CAM_ask_auto_blank 函数介绍
查询自动空白的类型和数据。
java jvm 开发语言 偏移量 二次开发 -
NX二次开发UF_CAM_opt_ask_subtypes 函数介绍
此函数提供指定的对象参数类型的可用对象参数模板子类型的名称。只返回具有指定的对象参数模板子类的子类型。
java 数据库 jvm NX二次开发 UG二次开发 -
NX二次开发UF_CAM_opt_ask_types 函数介绍
此函数提供可用的对象参数模板类型的名称。
java 数据库 jvm NX二次开发 UG二次开发 -
NX二次开发UF_CAM_ask_leastsq_sphere 函数介绍
描述: 这个效用函数计算给定一组点的最小二乘球的中心点和半径。
java 开发语言 二次开发 #include UI -
NX二次开发UF_CAM_ask_config_file 函数介绍
此函数提供当前 CAM 会话中使用的 CAM 配置文件的名称。
java jvm 开发语言 二次开发 #include