- UID
- 12915
- 积分
- 0
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2002-10-26
- 最后登录
- 1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
我在做布局视口时采用多边形作边界.我看CAD本身都把多边形都附有永久的反应器.
我用下面的代码怎么就加不起永久反应器
AcDbViewport *pViewport = new AcDbViewport();
pViewport->setHeight(height);
pViewport->setWidth(width);
pViewport->setViewCenter(AcGePoint2d(rotatemodelcenterpt.x,rotatemodelcenterpt.y));
pViewport->setTwistAngle(twistangle);
pViewport->setLensLength(50.0);
pViewport->setCustomScale(scale);
pViewport->setViewHeight(height*scale);
pViewport->setViewDirection(AcGeVector3d(0,0,1));
pViewport->setNonRectClipEntityId(trimobjectid);
pViewport->setNonRectClipOn();
// 将新的布局对象添加到图纸空间块表记录中
AcDbObjectId viewportId;
pBlkTblRcd->appendAcDbEntity(viewportId, pViewport);
//pViewport->downgradeOpen();
pViewport->setOn();
pViewport->upgradeOpen();
pViewport->setTransparent();
pViewport->close();
pBlkTblRcd->close();
下面这段怎么不起作用呀,请高手们指点
AcDbEntity *pEnt;
Acad::ErrorStatus esadddrecactor;
esadddrecactor = acdbOpenAcDbEntity(pEnt, entId, AcDb::kForWrite);
if (esadddrecactor == Acad::eOk)
{
pEnt->addPersistentReactor(viewportId);
pEnt->close();
}
另外就是下面这两行
pViewport->setNonRectClipEntityId(trimobjectid);
pViewport->setNonRectClipOn();
程序运行时是没有问题,但视口里面怎么不多边形边界不重合,有些地方视口里面应该是有内容的,怎么显示出来是空白的 |
|