NX二次开发-UFUN相加布尔操作,可保留或删除目标体,工具体UF_MODL_unite_bodies_with_retained_options
NX11+VS2013
#include <uf.h>
#include <uf_modl.h>
UF_initialize();
//创建块
UF_FEATURE_SIGN Sign = UF_NULLSIGN;//设置布尔
double Corner_pt[3] = { 0.0, 0.0, 0.0 };//设置原点
char *Edge_Len[3] = { "100", "100", "100" };//设置长宽高
tag_t BlkTag = NULL_TAG;
UF_MODL_create_block1(Sign, Corner_pt, Edge_Len, &BlkTag);
//特征找体
tag_t BodyTag = NULL_TAG;
UF_MODL_ask_feat_body(BlkTag, &BodyTag);
//创建固定的基准平面
double Origin_Point[3] = { 0, 0, 0 };
double Plane_Normal[3] = { 0, 1, 0 };
tag_t Plane_Tag = NULL_TAG;
UF_MODL_create_fixed_dplane(Origin_Point, Plane_Normal, &Plane_Tag);
//创建镜像体
tag_t MirroredFeature = NULL_TAG;
UF_MODL_create_mirror_body(BodyTag, Plane_Tag, &MirroredFeature);
//特征找体
tag_t MirroredBodyTag = NULL_TAG;
UF_MODL_ask_feat_body(MirroredFeature, &MirroredBodyTag);
//求和
tag_t FiecEid = NULL_TAG;