最简单的AcDbHatch

来源:互联网 发布:道友请留步突破数据 编辑:程序博客网 时间:2024/06/06 20:21
软件架构师何志丹


AcDbObjectId id = CAddEntity().AddCircle(0,0,300);
 AcDbObjectIdArray ids;
 ids.append(id);

  AcDbHatch*  hatch = new AcDbHatch();
 hatch->setPattern(AcDbHatch::kPreDefined, _T("HONEY"));
 hatch->setDatabaseDefaults();
    hatch->setAssociative(Adesk::kTrue);    // BUG: doesn't do squat! have to set the reactor yourself to get associativity!
 hatch->setNormal(AcGeVector3d(0,0,1) );
 hatch->appendLoop(AcDbHatch::kExternal,ids);
    hatch->evaluateHatch();   
 CAddEntity().AddEntity(hatch);
 hatch->close();

原创粉丝点击