上等兵
UID3025959
U币2
G币108
技术0
主题1
精华0
阅读权限20
注册时间2018-1-9
最后登录2019-4-20
在线时间11 小时
上等兵
|
大家好!我使用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;
- }
复制代码
|
|