明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1310|回复: 0

大家能不能帮忙看看这个程序有什么问题?都好多天了还没有解决

[复制链接]
发表于 2006-3-13 20:00:00 | 显示全部楼层 |阅读模式


分别用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却会出错?先谢过各位了。

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-11-26 03:56 , Processed in 1.818702 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表