NX11+VS2013
#include <uf.h>
#include <uf_curve.h>
#include <NXOpen/CurveCollection.hxx>
#include <NXOpen/NXObject.hxx>
#include <NXOpen/Part.hxx>
#include <NXOpen/PartCollection.hxx>
NXOpen::Session *theSession = NXOpen::Session::GetSession();
NXOpen::Part *workPart(theSession->Parts()->Work());
NXOpen::Part *displayPart(theSession->Parts()->Display());
UF_initialize();
//UFUN创建直线
UF_CURVE_line_t Line_coords;
Line_coords.start_point[0] = 0.0;
Line_coords.start_point[1] = 0.0;
Line_coords.start_point[2] = 0.0;
Line_coords.end_point[0] = 100.0;
Line_coords.end_point[1] = 100.0;
Line_coords.end_point[2] = 100.0;
tag_t Line = NULL_TAG;
UF_CURVE_create_line(&Line_coords, &Line);
//NXOpen C++创建直线
NXOpen::Point3d StartPoint1(20.0, 80.0, 60.0);
NXOpen::Point3d EndPoint1(200.0, 600.0, 700.0);
NXOpen::Line *line1;
line1 = workPart->Curves()->CreateLine(StartPoint1, EndPoint1);
UF_terminate();
Caesar卢尚宇 [email protected]
NX二次开发-创建直线UF_CURVE_create_line与NXOpen->CreateLine
猜你喜欢
转载自blog.csdn.net/lu1287580078/article/details/82915801
今日推荐
周排行