几何尺寸与公差论坛------致力于产品几何量公差标准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)
-   -   【转帖】need some initial guidelines with tesselating solid (http://www.dimcax.com/hust/showthread.php?t=17307)

yang686526 2009-05-06 06:24 PM

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


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