关于extrude与extrudeAlongPath的问题(附程序)
<P>我想把一个圆沿一跟直线拉生成圆柱,用extrude可以实现,但是用extrudeAlongPath这个函数却出现问题?这是怎么回事?大家帮忙看看,先谢谢大家。</P><P>AcDbBlockTable *pThisBlockTable;<BR> acdbHostApplicationServices()->workingDatabase()->getSymbolTable(pThisBlockTable,<BR> AcDb::kForWrite);<BR> AcDbBlockTableRecord *pOtherBtr;<BR> pThisBlockTable->getAt(ACDB_MODEL_SPACE,pOtherBtr,AcDb::kForWrite);<BR> pThisBlockTable->close();</P>
<P> AcDbCircle *OCircle = new AcDbCircle(AcGePoint3d(0,0,0),AcGeVector3d(1,0,0),80);<BR> AcDbLine *line = new AcDbLine(AcGePoint3d(0,0,0),AcGePoint3d(100,0,0));<BR> AcDb3dSolid *OSolid = new AcDb3dSolid();<BR> AcDbObjectId OSolidId,liId;</P>
<P> pOtherBtr->appendAcDbEntity(liId,line);<BR> AcDbVoidPtrArray OArr,OgnArr;<BR> OArr.append(OCircle);<BR> OCircle->close();</P>
<P> int i;<BR> if (AcDbRegion::createFromCurves(OArr,OgnArr)!=Acad::eOk) <BR> { <BR> for (i=0;i<OgnArr.length();i++) <BR> delete OgnArr;<BR> return;<BR> }<BR> AcDbRegion *oRegion;<BR> oRegion=AcDbRegion::cast((AcRxObject*)OgnArr);</P>
<P> OSolid->extrudeAlongPath(oRegion,line);<BR>// OSolid->extrude(oRegion,100,0);<BR> pOtherBtr->appendAcDbEntity(OSolidId,OSolid);<BR> line->close();<BR> OSolid->close();<BR> pOtherBtr->close();</P>
页:
[1]