几何尺寸与公差论坛------致力于产品几何量公差标准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)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   【转帖】odgeexternalboundedsurface (http://www.dimcax.com/hust/showthread.php?t=17669)

yang686526 2009-05-06 08:35 PM

【转帖】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


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