// 求2个body间的最短距离
CATDistanceMinBodyBody* pDistanceMinB2B = ::CATCreateDistanceMinTopo( pGeoFactory,pTopData, pBody1, pBody2, ADVANCED );
if ( !pDistanceMinB2B ) rc=E_FAIL;break;
pDistanceMinB2B->SetPointComputationMode( TRUE );
CATTry{
pDistanceMinB2B->Run();
}CATCatch ( CATError, pError){
delete pDistanceMinB2B;
pDistanceMinB2B = NULL;
rc=CATReturnError(pError);
break;
}CATEndTry;
double MiniDistance = pDistanceMinB2B->GetDistance();
delete pDistanceMinB2B;
pDistanceMinB2B = NULL;
//If the distance could not be computed, returns -1.
if ( Temp1 < -ipImplicitGeoFactory->GetResolution() ) rc=E_FAIL;break;
你不是自己写了找点的程序了吗?你自己程序怎么运行的?
我给你的东西不过是参考呀 |