CATIGSMSplit_var spSplit=NULL_var;
CATISpecObject_var spSplit1=NULL_var;
CATISpecObject_var spSplit2=NULL_var;
for (i=1;i<20;i++)
{
CATISpecObject_var spCurrent;
CATISpecObject_var spObject;
//用公式ax+by+cz=d来画参考面
double c=10*i-100;
CAAGsiObjTool.CreateReal("A", 0, spCurrent); aObjectParameters.Append(spCurrent);
CAAGsiObjTool.CreateReal("B", 0, spCurrent); aObjectParameters.Append(spCurrent);
CAAGsiObjTool.CreateReal("C", 1, spCurrent); aObjectParameters.Append(spCurrent);
CAAGsiObjTool.CreateLength("D", c, spCurrent); aObjectParameters.Append(spCurrent);
CATISpecObject_var spPlaneYi = CAAGsiObjTool.CreatePlaneEquation(aObjectParameters);
aObjectParameters.RemoveAll();
if (!spObject)
{
cout<<"spObject=NULL"<<endl;
}
if(NULL_var==spSplit2)
{
spSplit1 = spGSMfactory->CreateSplit(Pad,spPlaneYi,FALSE); //pad为长度为一百的柱体
(aObjectParameters,FALSE);
spSplit=spSplit1;
HRESULT rc= spSplit->GetOtherSide(spSplit2);
}
else
{
aObjectParameters.Append(spSplit2);
aObjectParameters.Append(spPlaneYi);
spSplit1 = CAAGsiObjTool.CreateSplit(spSplit2,spPlaneYi,FALSE);
}
} |