NX二次开发 UFUN创建固定基准平面 UF_MODL_create_fixed_dplane
//VS8.0+VS2010
#include <UF_MODL.h>
//创建固定基准平面
bool CreateDatumPlane(const double point[3], const double dir[3], tag_t& dplane_tag)
{
double pt[3] = { point[0], point[1], point[2] }, vec[3] = { dir[0], dir[1], dir[2] };
dplane_tag = NULL_TAG;
UF_MODL_create_fixed_dplane(pt, vec, &dplane_tag);
if (NULL_TAG == dplane_tag)
return false;
return true;
}
extern DllExport void ufsta(char* param, int* returnCode, int rlen)
{
if (UF_initialize())
return;
tag_t dplane_tag = NULL_TAG;
double point[3] = { 0.0, 0.0, 50.0 };
double dir[3] = { 0.0, 0.0, 1.0 };
CreateDatumPlane(point, dir, dplane_tag);
UF_terminate();
}
//梅雷QQ1821117007