马上注册,结交更多同行朋友,交流,分享,学习。
您需要 登录 才可以下载或查看,没有帐号?注册
x
我想选择如下图所示的平面,以下是我的程序
CATBaseUnknown * pSelectPlane=_pSelectPlaneAgent->GetElementValue(_pSelectPlaneAgent->GetValue());
CATPlane * spPlane = NULL;
rc=pSelectPlane->QueryInterface(IID_CATPlane,(void **)& spPlane);
if (SUCCEEDED(rc))
{
cout<<"通过选取对象查询CATPlane成功,选取对象是平面"<<endl;
pSelectPlane->Release();
pSelectPlane=NULL;
CATPlane_var spPlaneTem = spPlane;
CATIFeaturize_var spRPlaneSpec = spPlaneTem;
CATISpecObject_var SpecPlane=NULL_var;
SpecPlane=spRPlaneSpec->FeaturizeF(MfDuplicateFeature | MfPermanentBody | MfSelectingFeatureSupport | MfFunctionalFeaturization );
if (NULL_var !=SpecPlane)
{
cout<<"将选取的平面转化为特征数据成功!!!"<<endl;
SelectPlaneObject=SpecPlane;
}
}
选择的这个平面用于做投影平面时
CATIGSMProject_var _pGSMProject = NULL_var;
_pGSMProject = pGSMProjection->CreateProject(_spSurfaceBoundary,SelectPlaneObject,pGSMDir,TRUE,CATGSMAllSolutions);
if (NULL_var==_pGSMProject)
{
cout<<"通过CATIGSMFactory接口函数CreateProject创建投影曲线失败!!!"<<endl;
return FALSE;
}
运行后的结果这个平面仍然没有选中,请问是我上面选择的平面有问题吗?
|