TA的每日心情 | 开心 6 小时前 |
---|
签到天数: 20 天 [LV.4]偶尔看看III
管理员
- 积分
- 1393
|
- void MyDatabaseReactor::objectModified(const AcDbDatabase * dwg, const AcDbObject * dbObj)
- {
- if (dbObj->isKindOf(AcDbPolyline::desc()))
- {
- AcDbPolyline* pPoly=AcDbPolyline::cast(dbObj);
- int vernum=pPoly->numVerts();
- AcGePoint2d ptCenter;
- AcGePoint2d pt;
- pPoly->getPointAt(0,pt);
- ptCenter.x=pt.x;
- ptCenter.y=pt.y-100;
- pPoly->upgradeOpen();
- for (int i=0;i<vernum;i++)
- {
- pt.rotateBy(2*pi()/vernum,ptCenter);
- pPoly->setPointAt(i,pt);
- }
- pPoly->setClosed(Adesk::kTrue);
- pPoly->setColorIndex(1);
- }
- else if (dbObj->isKindOf(AcDbCircle::desc()))
- {
- AcDbCircle* pCir=AcDbCircle::cast(dbObj);
- pCir->upgradeOpen();
- pCir->setRadius(100);
- pCir->setColorIndex(100);
- }
- }
复制代码 |
|