我搜索了一些代码,但它不起作用。
Adesk::Boolean CMyGcd::subWorldDraw (AcGiWorldDraw *mode) {
assertReadEnabled () ;
//return (AcDbCurve::subWorldDraw (mode)) ;
Acad::ErrorStatus es;
//......
//wipeout
es = AcDbWipeout::createImageDefinition();
AcDbWipeout *pWipe = new AcDbWipeout();
if(pWipe == NULL) return (Adesk::kFalse);
pWipe->setDatabaseDefaults();
AcGePoint3d originPnt;
getTextPosition(originPnt);
AcGeVector3d Udirection(1,0,0);
AcGeVector3d Vdirection(0,-1,0);
pWipe->setOrientation(originPnt,Udirection,Vdirection);
// Set the clip boundary for the wipeout - this is very important
AcGePoint2dArray *ptArray = new AcGePoint2dArray(5,5);
AcGePoint3dArray vertexArray;
es = getExtentsBox(vertexArray);
AcGePoint2d p0,p1;
p0 = AcGePoint2d(vertexArray.x,vertexArray.y);
p1 = AcGePoint2d(vertexArray.x,vertexArray.y);
//AcGePoint2dArray ptArray;
ptArray->append(p0);
ptArray->append(AcGePoint2d(p1.x,p0.y));
ptArray->append(p1);
ptArray->append(AcGePoint2d(p0.x,p1.y));
ptArray->append(p0);
pWipe->setDisplayOpt(AcDbRasterImage::kTransparent,Adesk::kTrue);
pWipe->setDisplayOpt( AcDbRasterImage::kShow, true);
es = pWipe->setClipBoundaryToWholeImage();
es = pWipe->setClipBoundary(AcDbRasterImage::kPoly,*ptArray);
pWipe->worldDraw(mode);
//mode->geometry().draw(pWipe);
delete pWipe;
pWipe = NULL;
//...
return (Adesk::kTrue);
} 以这种方式是不可能做到的。有一个示例代码是 ADN 站点。相信我。尝试使用孵化或实体。这比创建硬指针和反应器来清除自定义实体中的对象要容易得多。PS:试着解释一下,你打算用wipeout做什么?
页:
1
[2]