![]() |
【转帖】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. |