使用UFun函数创建圆柱的方法,请看此篇:https://blog.csdn.net/WangPaiFeiXingYuan/article/details/89508949
说明:通过CylinderBuilder类,创建一个简单的圆柱
测试代码:
//创建圆柱
#include <uf_defs.h>
#include <NXOpen/Session.hxx>
#include <NXOpen/Features_CylinderBuilder.hxx>
#include <NXOpen/Features_FeatureCollection.hxx>
#include <NXOpen/Part.hxx>
#include <NXOpen/PartCollection.hxx>
#include <NXOpen/Point.hxx>
#include <NXOpen/PointCollection.hxx>
using namespace NXOpen;
extern "C" DllExport int ufusr_ask_unload()
{
return (int)Session::LibraryUnloadOptionImmediately;
}
extern "C" DllExport void ufusr(char *param, int *retCode, int paramLen)
{
Session *theSession = Session::GetSession(); //获得会话
Part *workPart(theSession->Parts()->Work()); //获得工作部件
Featu