zhangyusheng 发表于 2008-4-10 20:33:00

[求助]怎么样使用AcDbPolyline里面的SegType Enum来画圆弧多段线

<p>怎么样使用AcDbPolyline里面的SegType Enum,进而画出出圆弧多段线,默认的枚举等于kLine,请问怎么样改变为kArc画出圆弧多段线呢</p><p>万分感激</p><p></p><p>我的部分代码如下:</p><p>&nbsp;&nbsp;AcDbPolyline* pPl = new AcDbPolyline(12);<br/>&nbsp;&nbsp;AcDbPolyline::SegType = AcDbPolyline::kArc;<br/>&nbsp;&nbsp;pPl-&gt;addVertexAt(0,polylinePts.convert2d(AcGePlane::kXYPlane));<br/>&nbsp;&nbsp;pPl-&gt;addVertexAt(1,cntrPt1.convert2d(AcGePlane::kXYPlane));<br/>&nbsp;&nbsp;pPl-&gt;addVertexAt(2,polylinePts.convert2d(AcGePlane::kXYPlane));</p><p>&nbsp;&nbsp;AcDbBlockTable* pBT;<br/>&nbsp;&nbsp;acdbHostApplicationServices()-&gt;workingDatabase()-&gt;getBlockTable(pBT,AcDb::kForRead);<br/>&nbsp;&nbsp;AcDbBlockTableRecord* pBTR;<br/>&nbsp;&nbsp;pBT-&gt;getAt(ACDB_MODEL_SPACE,pBTR,AcDb::kForWrite);<br/>&nbsp;&nbsp;pBT-&gt;close();<br/>&nbsp;&nbsp;pBTR-&gt;appendAcDbEntity(pPl);<br/>&nbsp;&nbsp;pPl-&gt;close();<br/>&nbsp;&nbsp;pBTR-&gt;close();</p>

xgready 发表于 2011-5-27 18:05:20

addVertexAt()函数中第三个参数设置一下bulge值就可以了。
页: [1]
查看完整版本: [求助]怎么样使用AcDbPolyline里面的SegType Enum来画圆弧多段线