|
大家好!我使用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;
- }
复制代码
|
|