Nico 发表于 2010-8-22 10:36:04

您是否覆盖 subTransformBy() 或 transformBy() ?

LE3 发表于 2010-8-23 09:39:32

参考polysamp示例,我重写了我的程序,从AcDbCurve派生,然后entget数据列表达到了我想要的结果。感谢大家!

LE3 发表于 2010-9-12 09:16:43

如何在自定义实体中创建 AcDbWipeout?
我搜索了一些代码,但它不起作用。
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);
}

gswang 发表于 2010-9-13 03:32:36

以这种方式是不可能做到的。有一个示例代码是 ADN 站点。相信我。尝试使用孵化或实体。这比创建硬指针和反应器来清除自定义实体中的对象要容易得多。PS:试着解释一下,你打算用wipeout做什么?
页: 1 [2]
查看完整版本: 自定义实体问题