UG爱好者
标题:
如何访问Builder生成的特征
[打印本页]
作者:
Crazy_for
时间:
2018-4-25 16:14
标题:
如何访问Builder生成的特征
大家好!我使用DatumPlaneBuilder创建了一个基准面,想要获得指向这个基准面的指针,该怎么操作?
NXOpen::DatumPlane* CreateDatumPlane(Part* workPart, Point3d origin, Vector3d direction)
{
NXOpen::Features::Feature* nullDatumPlane(NULL);
NXOpen::Features::DatumPlaneBuilder* datumPlanebuilder;
datumPlanebuilder = workPart->Features()->CreateDatumPlaneBuilder(nullDatumPlane);
NXOpen::Direction* dir;
NXOpen::Point* originPoint = workPart->Points()->CreatePoint(origin);
dir = workPart->Directions()->CreateDirection(originPoint, vector0->Vector());
datumPlanebuilder->SetPointAndDirection(originPoint, dir);
NXOpen::Features::Feature* features;
features = datumPlanebuilder->CommitFeature();
DatumPlane* da = dynamic_cast<DatumPlane*>();
char msg[128];
sprintf(msg, "%p", da);
uc1601(msg, 1);
//datumPlanebuilder->Destroy();
return da;
}
复制代码
作者:
Crazy_for
时间:
2018-4-26 10:44
已解决,感谢
欢迎光临 UG爱好者 (https://www.ugsnx.com/)
Powered by Discuz! X3.2