几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   ObjectARX(C++) (http://www.dimcax.com/hust/forumdisplay.php?f=34)
-   -   大家能不能帮忙看看这个程序有什么问题?都好多天了还没有解决 (http://www.dimcax.com/hust/showthread.php?t=7312)

yang686526 2009-04-16 10:30 PM

大家能不能帮忙看看这个程序有什么问题?都好多天了还没有解决
 
大家能不能帮忙看看这个程序有什么问题?都好多天了还没有解决
大家能不能帮忙看看这个程序有什么问题?都好多天了还没有解决
分别用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[i];
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却会出错?先谢过各位了。


所有的时间均为北京时间。 现在的时间是 07:05 AM.