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

need some initial guidelines with tesselating solid
need some initial guidelines with tesselating solid
hi all and thanks in advance,
we are trying to create our own photorealistic render using some external libraries (vtk or vrs3d - check out them, they are great pieces of software).
however, we have some problems in teh 'acis' stage.
we need to convert them to a simplier form.
i searched older post but it is still not clear for me.
i know about existence of gigeometrysimplifier, decomposeforsave, ...
i think using the breprenderer/isatconverter functionalities maybe is the way to achive it.
that's the problem, i have no idea on using it.
i just try to convert solids to small triangles so i can use it in whatever library i use.
i tried this code that crash our host application:
bool ret;
odflatmemstreamptr wf;
pent->acisout(wf);
odarray<isatconverter*> out;
ret = abbreaktosinglebody(wf, null, true, out);
if ( ret )
{
if ( !out.isempty() )
{
// it shows 1 body if i select a solid entity, so i suppose it is ok
odstring buffer;
buffer.format(dd_t("number of bodies: %d"), (int)out.size());
messagebox(null, buffer, _t("info"), mb_ok);
double tolerance = 25.0;
int degreeinu, degreeinv, propsinu, propsinv, ninu, ninv, nknotsinu, nknotsinv;
odgedoublearray weights;
odgepoint3darray cpoints;
odgeknotvector uknots, vknots;
odgepoint3d vert;
odbrbrep brep;
odbrbrepfacetraverser bft;
odcmcolor l_color = pent->color();
brep.set((const void *)out.first());
if ( brep.isvalid() )
{
// here host app crash
bft.setbrep(brep);
while ( !bft.done() )
{
.......
please, any help? guidelines?
regards,
israel
hi,
these functionality was broken in the last release. please, don't use it.
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)