求助,ug二次开发中使用uf
答案:1 悬赏:60 手机版
解决时间 2021-11-12 01:51
- 提问者网友:锁深秋
- 2021-11-11 14:00
求助,ug二次开发中使用uf
最佳答案
- 五星知识达人网友:独行浪子会拥风
- 2021-11-11 15:11
直接复制需的代码,生成即可,分别创建一个块与一个圆柱,对其执行求和。
double blk_corner[3] = { 0, 0, 0 };
char * blk_edg_len[3] = { "20", "20", "20" };
tag_t blk_obj_id;
tag_t blk_body_id;
double cyl_origin[3] = { 0, 0, 0 };
char * cyl_height = "20";
char * cyl_diam = "10";
double cyl_direction[3]{0, 0, 1};
tag_t cyl_obj_id;
tag_t cyl_body_id;
UF_MODL_create_block1(UF_NULLSIGN, blk_corner, blk_edg_len, &blk_obj_id);
UF_MODL_ask_feat_body(blk_obj_id, &blk_body_id);
UF_MODL_create_cyl1(UF_NULLSIGN, cyl_origin, cyl_diam,cyl_height,cyl_direction, &cyl_obj_id);
UF_MODL_ask_feat_body(cyl_obj_id, &cyl_body_id);
tag_t view_tag = NULL_TAG;
UF_VIEW_ask_work_view(&view_tag);
UF_VIEW_fit_view(view_tag, 0.7);
UF_MODL_unite_bodies(blk_body_id, cyl_body_id);
double blk_corner[3] = { 0, 0, 0 };
char * blk_edg_len[3] = { "20", "20", "20" };
tag_t blk_obj_id;
tag_t blk_body_id;
double cyl_origin[3] = { 0, 0, 0 };
char * cyl_height = "20";
char * cyl_diam = "10";
double cyl_direction[3]{0, 0, 1};
tag_t cyl_obj_id;
tag_t cyl_body_id;
UF_MODL_create_block1(UF_NULLSIGN, blk_corner, blk_edg_len, &blk_obj_id);
UF_MODL_ask_feat_body(blk_obj_id, &blk_body_id);
UF_MODL_create_cyl1(UF_NULLSIGN, cyl_origin, cyl_diam,cyl_height,cyl_direction, &cyl_obj_id);
UF_MODL_ask_feat_body(cyl_obj_id, &cyl_body_id);
tag_t view_tag = NULL_TAG;
UF_VIEW_ask_work_view(&view_tag);
UF_VIEW_fit_view(view_tag, 0.7);
UF_MODL_unite_bodies(blk_body_id, cyl_body_id);
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯