这里要注意一点,有界平面是body,不是face,以前我刚开始做项目的时候一直以为有界平面是face,后来发现不对.是body NX9+VS2012 #include <uf.h> #include <uf_modl.h> UF_initialize(); //创建四条直线(封闭) UF_CURVE_line_t LineCoods1; LineCoods1.start_point[] = 0.0; LineCoods1.start_point[] = 0.0; LineCoods…
先准备几条曲线如下图所示,我们用这几条线来创建一个有界平面: 效果:  源码: //有界平面 extern DllExport void ufusr(char *param, int *returnCode, int rlen) { UF_initialize(); uc1601("有界平面", 1); tag_t tagLine[6] = { 45888,46337,46215,46015,45057,45256 }; UF_STRING_t generator; UF_STRING…
NX9+VS2012 #include <uf.h> #include <uf_modl.h> UF_initialize(); //创建基准平面 ] = {0.0, 0.0, 10.0};//定义基准平面原点 ] = {0.0, 0.0, 1.0};//定义基准平面矢量方向,Z方向 tag_t PlaneTag = NULL_TAG; UF_MODL_create_plane(OriginPoint, PlaneNormal, &PlaneTag); UF_termina…
NX11+VS2013 #include <uf.h> #include <uf_modl.h> UF_initialize(); //创建块 UF_FEATURE_SIGN Sign = UF_NULLSIGN; ] = {0.0, 0.0, 0.0}; ] = {"}; tag_t BlkTag = NULL_TAG; UF_MODL_create_block1(Sign, Corner_Pt, Edge_Len, &BlkTag); //特征找体 tag_t…
NX11+VS2013 #include <uf.h> #include <uf_modl.h> UF_initialize(); //创建块 UF_FEATURE_SIGN Sign = UF_NULLSIGN; ] = {0.0, 0.0, 0.0}; ] = {"}; tag_t BlkTag = NULL_TAG; UF_MODL_create_block1(Sign, Corner_Pt, Edge_Len, &BlkTag); //特征找体 tag_t…
使用uf5374() 源码: double dP1[3] = { 0.0,0.0,0.0 }; double dP2[3] = { 0.0,1.0,0.0 }; double dP3[3] = { 0.0,0.0,1.0 }; tag_t tagPlane; uf5374(dP1, dP2, dP3, &tagPlane); 使用UF_MODL_create_plane() double dP1[3] = { 0.0,0.0,0.0 }; double dDir[3] = { 1.0,0.0,0…
NX9+VS2012 #include <uf.h> #include <uf_modl.h> #include <uf_obj.h> #include <uf_ui.h> UF_initialize(); //创建圆柱 UF_FEATURE_SIGN Sign = UF_NULLSIGN; ] = {0.0, 0.0, 0.0}; "; "; ] = {0.0, 0.0, 1.0}; tag_t CylTag = NULL_TAG; U…
NX9+VS2012 #include <uf.h> #include <uf_drf.h> #include <NXOpen/Annotations_Note.hxx> #include <NXOpen/NXObjectManager.hxx> UF_initialize(); //创建注释 char* TextString[] = {"Caesar卢尚宇"}; ] = {,,}; tag_t NoteTag = NULL_TAG; U…
NX11+VS2013 #include <uf.h> #include <uf_modl.h> UF_initialize(); //创建球 UF_FEATURE_SIGN Sign = UF_NULLSIGN;//设置布尔 ] = { 0.0, 0.0, 0.0 };//原点 ";//直径 tag_t SphereTag = NULL_TAG; UF_MODL_create_sphere1(Sign, Center, Diam, &SphereTag); UF…
NX11+VS2013 #include <uf.h> #include <uf_modl.h> UF_initialize(); //创建圆锥 UF_FEATURE_SIGN Sign = UF_NULLSIGN;//设置布尔 ] = { 0.0, 0.0, 0.0 };//原点 ";//高度 ] = { " };//顶部直径,底部直径 ] = { 0.0, 0.0, 1.0 };//矢量方向 tag_t ConeTag = NULL_TAG; UF_MODL…