- 积分
- 1694
- 明经币
- 个
- 注册时间
- 2002-4-21
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
发表于 2002-7-1 22:39:00
|
显示全部楼层
参考
AcDbVoidPtrArray curveSegments; //定义封闭曲线
AcDbEntity *pEnt;
pEnt = new AcDbCircle(
AcGePoint3d(0,0,0),
AcGeVector3d(0,0,1),
da/2.0);
curveSegments.append(pEnt);
AcDbVoidPtrArray regions; //定义面
AcDbRegion *pRegion = new AcDbRegion;
AcDbRegion::createFromCurves(curveSegments,regions);
pRegion = AcDbRegion::cast((AcRxObject*)regions[0]);
delete pEnt;
//定义实体
AcDb3dSolid *p3dSolid = new AcDb3dSolid;
p3dSolid->extrude(pRegion,m_b,0);
AcGeMatrix3d mat;
mat.setCoordSystem(
AcGePoint3d(0,0,-0.5*m_b),
AcGeVector3d(1,0,0),
AcGeVector3d(0,1,0),
AcGeVector3d(0,0,1));
p3dSolid->transformBy(mat);
AcDbObjectId objId;
objId=AddEntityToDbs(p3dSolid); //增加实体到AcDb数据库
delete pRegion; |
|