UF_MODL_split_body这个函数创建出来的分割体是消参的,如果想要有参数的,得录NXOPEN去做。
NX9+VS2012 #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", "200", "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, 100, 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 bodies = {BodyTag}; int num_split_bodies = 0; tag_t* split_bodies = NULL_TAG; UF_MODL_split_body(1, &bodies, Plane_Tag, &num_split_bodies, &split_bodies); UF_terminate(); Caesar卢尚宇 2020年9月18日