明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1368|回复: 0

关于extrude与extrudeAlongPath的问题(附程序)

[复制链接]
发表于 2006-3-10 16:51: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(AcGePoint3d(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,liId;

 pOtherBtr->appendAcDbEntity(liId,line);
 AcDbVoidPtrArray OArr,OgnArr;
 OArr.append(OCircle);
 OCircle->close();

 int i;
 if (AcDbRegion::createFromCurves(OArr,OgnArr)!=Acad::eOk)  
 {
  for (i=0;i<OgnArr.length();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();

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

本版积分规则

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

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

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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