iCAx开思工具箱
标题:
CAA 循环中出现更新问头
[打印本页]
作者:
hl_nuaa
时间:
2012-11-3 10:34
标题:
CAA 循环中出现更新问头
//通过拓扑获取选定边界上小的边界曲线段的个数,对每个小曲线段进行外插延伸
int index;
for(index=1; index<=LISTCellB.Size();index++)
{
//将每个小曲线段小曲线段特征化
CATIGSMBoundary_var spGSMBoundary = pFact->CreateBoundary(spEdgeElem,SpecObj2,BOUNDARY_NO_PROPAG
if (NULL_var == spGSMBoundary){cout<<"Create Boundary Failed!"<<endl;}
CATIGSMExtrapol_var _spExtrapolSurf = pFact->CreateExtrapOl(spGSMBoundary,SpecObj2,ickStart,CATGSMTangentContinuity,CATGSMTangentBorder,FALSE,CATGSMNoPropagation);//创建外插延伸
if(_spExtrapolSurf==NULL_var)
{
cout<<"创建延伸失败" <<endl;
continue;
}
else
{
cout<<"创建延伸成功"<<endl;
CATISpecObject_var spSpecTmp=_spExtrapolSurf;
if (spSpecTmp==NULL_var){cout<<"获取CATISpecObject类型失败"<<endl;}
CATISpecObject_var ispInputParent=spGsmTool;
rcc=InsertInProceduralView(spSpecTmp,ispInputParent);//放到GSMTOOL里面
HRESULT rc=ExtrapolUpdate(spSpecTmp);
if (FAILED(rc))
{
cout<<"无法更新!!!"<<endl;
CATISpecObject_var ispInputParent=spGsmTool;
ispInputParent->Remove(spSpecTmp);
spSpecTmp=NULL_var;
continue;
}
else
{
cout<<"成功创建外插延伸,开始判断"<<endl;
//判断方法:将外插延伸得到曲面的四个角点投影,并通过直线的夹角判断
if (_piAngle<=0.05)
{
cout<<"第"<<index<<"次试拉伸的曲面片满足要求"<<endl;
break;
}
else
{
cout<<"该试拉伸的曲面片不满足要求,继续拉伸"<<endl;
CATISpecObject_var ispFather = spSpecTmp->GetFather();
ispFather->Remove(spSpecTmp);
spSpecTmp=NULL_var;
}
}
}
}
现在出现的问题就是将第一次外插延伸出的曲面删去以后,从第二次外插延伸开始出现更新问题,说是The Handle is NULL;
请问高手,哪边除了问题。在线等答案
欢迎光临 iCAx开思工具箱 (https://t.icax.org/)
Powered by Discuz! X3.3