iCAx开思工具箱

标题: CAA 特征树上草图是隐藏状态,但草图里面的直线却显示着! [打印本页]

作者: zsong22    时间: 2012-12-18 10:42
标题: CAA 特征树上草图是隐藏状态,但草图里面的直线却显示着!
CATI2DWFFactory_var spWF2DFactOnSketch(spSketch);
double pt1[2] = {0., 0.},
  pt2[2] = {0., 0.},
  pt3[2] = {100., 0.},
  pt4[2] = {0., 100.};
spSketch->OpenEdition();
//创建线
CATISpecObject_var spLine1 = spWF2DFactOnSketch->CreateLine(pt1,pt3);
CATISpecObject_var spLine2 = spWF2DFactOnSketch->CreateLine(pt2,pt4);

CATI2DCurve_var spCurveOnLine1(spLine1);
CATISpecObject_var spPoint1=  spCurveOnLine1->GetStartPoint();
CATISpecObject_var spPoint3=  spCurveOnLine1->GetEndPoint();
CATI2DCurve_var spCurveOnLine2(spLine2);
CATISpecObject_var spPoint2=  spCurveOnLine2->GetStartPoint();
CATISpecObject_var spPoint4=  spCurveOnLine2->GetEndPoint();

spSketch->CloseEdition();// Closes the sketch edition
HideObject(spSketch);//隐藏特征
//将整个Part刷新一次
spSpecPart ->Update();

如上:我在草图中就简单的创建了两条直线,并且在关闭草图后 将草图隐藏 并且刷新Part  。
但是,当我打开Catia调试时,这创建的两条直线 却显示在空间之中。   
只有当我双击打开该草图,什么也不做然后退出草图,这两条直线就隐藏掉了。

求解释,谢谢!


该贴已经同步到 zsong22的微博




欢迎光临 iCAx开思工具箱 (https://t.icax.org/) Powered by Discuz! X3.3