求救:关于三维实体的开发。
求救:利用arx绘制autocad的三维实体。使用什么命令。如何操作。哪位高手有类似的原程序码。能否给参阅一下。谢谢。参考
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);
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;
感谢你啊。我会好好认真看的!
非常感谢你。wxj351.很高兴你能帮助我!希望能和你成为朋友!不要客气
<P>向无私奉献者致敬!</P>
页:
[1]