iCAx开思工具箱
标题:
CATCreateTopParallel函数怎么用啊,大虾快帮忙啊,急!!!!
[打印本页]
作者:
wndcool
时间:
2005-9-2 16:56
标题:
CATCreateTopParallel函数怎么用啊,大虾快帮忙啊,急!!!!
CATGeoFactory* tmpFactory= MyNeedMuxian3[1]->GetContainer();
CATTopData* tmpParallelToolTopData=new CATTopData();
CATSoftwareConfiguration *tmpParallelToolConf=new CATSoftwareConfiguration ();
tmpParallelToolTopData->SetSoftwareConfiguration(tmpParallelToolConf);
double *tmpCoff=new double[1];
tmpCoff[0]=1.5;
CATMathPolynomX * tmpMathPFuntion=new CATMathPolynomX(0,tmpCoff);
cout<<"tmpMathPFuntion success"<<endl;
const CATMathFunctionX** tmpFuntion=new const CATMathFunctionX*[1];
tmpFuntion[0]=tmpMathPFuntion;
cout<<"tmpFuntion success"<<endl;
double* iBorders =new double[2];
iBorders[0]=0;
iBorders[1]=1;
CATCompositeLaw *tmpComLaw= tmpFactory->CreateCompositeLaw(1,iBorders,tmpFuntion);
cout<<"CATCompositeLaw success"<<endl;
CATDistanceTool * tmpDistanceTool=
ATCreateTopEuclidianDistanceTool(tmpFactory,tmpParallelToolTopData,CATOrientationPositive,tmpComLaw);
cout<<"CATDistanceTool success"<<endl;
CATIGeometricalElement *pGeomEltOnCurFeatJoin3Feat = 0;
rc = CATBodyListOfJoin[3]->QueryInterface(IID_CATIGeometricalElement,
(void**)[$pGeomEltOnCurFeatJoin3Feat)]
CATBody_var Join3FeatResultBody = pGeomEltOnCurFeatJoin3Feat->GetBodyResult();
CATBody* tmpJoin3FeatpCATBody=0;
rc=Join3FeatResultBody->QueryInterface(IID_CATBody,(void**)[$tmpJoin3FeatpCATBody)]
CATExtrapolParallelTool *tmpParallelTool=
reateExtrapolParallelTool (tmpFactory,tmpParallelToolTopData,tmpDistanceTool,tmpJoin3FeatpCATBody);
cout<<"CATExtrapolParallelTool success"<<endl;
CATBody* piTotalWireBody=MyNeedMuxian3[15];
CATTopParallel * tmpTopParallel=
ATCreateTopParallel (tmpParallelTool,piTotalWireBody);
cout<<"CATTopParallel success"<<endl;
tmpTopParallel->Run();
cout<<"tmpTopParallel success"<<endl;
CATBody* TheOneBody=tmpTopParallel->GetResult();
cout<<"TheOneBody success"<<endl;
CATBodyListOfJoin[3]是曲面的特征;
MyNeedMuxian3是曲面上一些线的数组;
现在我想做MyNeedMuxian3中一些线的parallel,
这个程序在
cout<<"CATTopParallel success"<<endl;
后面出错,是TopOperator Internal ERROR!
急切等大虾们指点
作者:
saeba
时间:
2005-9-2 17:09
嗯,你一个NULL pointer都不检查,只要执行过了就敢cout一个"success" (!!!),
谁知道你是在那一步出的问题呢?
作者:
wndcool
时间:
2005-9-2 17:32
CATGeoFactory* tmpFactory= MyNeedMuxian3[1]->GetContainer();
CATTopData* tmpParallelToolTopData=new CATTopData();
CATSoftwareConfiguration *tmpParallelToolConf=new CATSoftwareConfiguration ();
tmpParallelToolTopData->SetSoftwareConfiguration(tmpParallelToolConf);
double *tmpCoff=new double[1];
tmpCoff[0]=1.5;
CATMathPolynomX * tmpMathPFuntion=new CATMathPolynomX(0,tmpCoff);
if(tmpMathPFuntion!=NULL)
{
cout<<"tmpMathPFuntion success"<<endl;
}
else
{
return 10;
}
const CATMathFunctionX** tmpFuntion=new const CATMathFunctionX*[1];
tmpFuntion[0]=tmpMathPFuntion;
cout<<"tmpFuntion success"<<endl;
double* iBorders =new double[2];
iBorders[0]=0;
iBorders[1]=1;
CATCompositeLaw *tmpComLaw= tmpFactory->CreateCompositeLaw(1,iBorders,tmpFuntion);
if(tmpComLaw!=NULL)
{
cout<<"CATCompositeLaw success"<<endl;
}
else
{
return 10;
}
CATDistanceTool * tmpDistanceTool=
ATCreateTopEuclidianDistanceTool(tmpFactory,tmpParallelToolTopData,CATOrientationPositive,tmpComLaw);
if(tmpDistanceTool!=NULL)
{
cout<<"CATDistanceTool success"<<endl;
}
else
{
return 10;
}
CATIGeometricalElement *pGeomEltOnCurFeatJoin3Feat = 0;
rc = CATBodyListOfJoin[3]->QueryInterface(IID_CATIGeometricalElement, (void**)[$pGeomEltOnCurFeatJoin3Feat)]
CATBody_var Join3FeatResultBody = pGeomEltOnCurFeatJoin3Feat->GetBodyResult();
CATBody* tmpJoin3FeatpCATBody=0;
rc=Join3FeatResultBody->QueryInterface(IID_CATBody,(void**)[$tmpJoin3FeatpCATBody)]
if(tmpJoin3FeatpCATBody!=NULL)
{
cout<<"tmpJoin3FeatpCATBody success"<<endl;
}
else
{
return 10;
}
CATExtrapolParallelTool *tmpParallelTool=
reateExtrapolParallelTool (tmpFactory,tmpParallelToolTopData,tmpDistanceTool,tmpJoin3FeatpCATBody);
if(tmpParallelTool!=NULL)
{
cout<<"CATExtrapolParallelTool success"<<endl;
}
else
{
return 10;
}
CATBody* piTotalWireBody=MyNeedMuxian3[15];
if(piTotalWireBody!=NULL)
{
cout<<"piTotalWireBody success"<<endl;
}
else
{
return 10;
}
CATTopParallel * tmpTopParallel=
ATCreateTopParallel (tmpParallelTool,piTotalWireBody);
if(tmpTopParallel!=NULL)
{
cout<<"CATTopParallel success"<<endl;
}
else
{
return 10;
}
tmpTopParallel->Run();
cout<<"tmpTopParallel success"<<endl;
CATBody* TheOneBody=tmpTopParallel->GetResult();
if(TheOneBody!=NULL)
{
cout<<"TheOneBody success"<<endl;
}
else
{
return 10;
}
谢谢这位大哥的指点,
还是那里出错
作者:
wndcool
时间:
2005-9-3 23:03
谁帮个忙啊,请教各位了啊
作者:
wndcool
时间:
2005-9-6 08:44
我已搞定
作者:
wsk_wsk
时间:
2005-9-15 10:29
楼主,成功了把成功的经验也贴出来共享,谢谢.
作者:
wndcool
时间:
2005-9-27 11:54
其实还是参数的问题,给对了就好了。不过还有个问题,对于某些曲线这个函数搞不定,也就是说用这个函数完成不了我所要的功能,只能换个算法代替一下了
欢迎光临 iCAx开思工具箱 (https://t.icax.org/)
Powered by Discuz! X3.3