查看单个帖子
旧 2009-05-06, 08:35 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】odgeexternalboundedsurface

odgeexternalboundedsurface
odgeexternalboundedsurface
help me, please.
i want to extract from oddb3dsolid all odgeexternalboundedsurface;
i not find any examples.
you can use
void oddb3dsolid::brep(odbrbrep &)
and br** functions to get geometry.
sergey slezkin
thank you sergey slezkin.
i used example odbrex.
i want to extract all edge from all surface of 3dsolid.
my code working only for solid type of cylinder
code:

static void improddb3dsolid(oddb3dsolid* psolid)
{
odrxinitmodelergeometry();
odmemorystreamptr mem = odmemorystream::createnew();
psolid->acisout(mem, kaftypeascii|kafver400);
int len=mem->length();
if (!len)
return;
odbinarydata data;
data.resize(mem->length());
mem->seek(0, oddb::kseekfromstart);
mem->getbytes(data.asarrayptr(), mem->length());
odbrbrep brep;
odbrerrorstatus es=brep.set((const char*)data.asarrayptr());
if (es != odbrok)
return ;
odbrbrepedgetraverser bet(brep);
while (!bet.done())
{
odbredge edg;
bet.getedge(edg);
odgecurve3d* thecurve = null;
if (edg.getcurve(thecurve) != odbrok)
return ;
impcurve3d(thecurve, psolid);////do any with thecurve
bet.next();
}
}
for solid type of extrude or box no any edge
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)