分别用extrude与extrudeAlongPath拉生得到圆柱: AcDbBlockTable *pThisBlockTable; acdbHostApplicationServices()->workingDatabase()->getSymbolTable(pThisBlockTable,AcDb::kForWrite); AcDbBlockTableRecord *pOtherBtr; pThisBlockTable->getAt(ACDB_MODEL_SPACE,pOtherBtr,AcDb::kForWrite); pThisBlockTable->close();
AcDbCircle *OCircle = new AcDbCircle(AcGePoint3(0,0,0),AcGeVector3d(1,0,0),80); AcDbLine *line = new AcDbLine(AcGePoint3d(0,0,0),AcGePoint3d(100,0,0)); AcDb3dSolid *OSolid = new AcDb3dSolid(); AcDbObjectId OSolidId;
AcDbVoidPtrArray OArr,OgnArr; OArr.append(OCircle); OCircle->close(); int i; if (AcDbRegion::createFromCurves(OArr,OgnArr)!=Acad::eOk) { for (i=0;i delete OgnArr; return; } AcDbRegion *oRegion; oRegion=AcDbRegion::cast((AcRxObject*)OgnArr[0]);
//OSolid->extrudeAlongPath(oRegion,line); OSolid->extrude(oRegion,100,0); pOtherBtr->appendAcDbEntity(OSolidId,OSolid);
line->close(); OSolid->close(); pOtherBtr->close();
为什么我用extrude可以得到圆柱,而extrudeAlongPath却会出错?先谢过各位了。
|