几何尺寸与公差论坛------致力于产品几何量公差标准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)
-   -   【转帖】controlling od3dsolid triangulation using modelerproperties (http://www.dimcax.com/hust/showthread.php?t=15466)

yang686526 2009-05-04 06:09 PM

【转帖】controlling od3dsolid triangulation using modelerproperties
 
controlling od3dsolid triangulation using "modelerproperties
controlling od3dsolid triangulation using "modelerproperties"
hello,
i'm trying to affect the triangulation of odgigeometrysimplifier. after looking through the help and through the forum, it would seem that the only way of doing this is to call the "modelerproperties" command, as suggested by the odamfcapp sample. i've set up my code as follows:
code:
class baseio : public odedbaseio
{
void addref()
{
}
void release()
{
}

odstring getstring( const odstring& prompt, int options = oded::kinpdefault, odedstringtracker* ptracker = 0)
{
odstring s;
return s;
}
void putstring( const odstring& string )
{
}
};
^a very basic implementation of the abstract odedbaseio
code:
odedcommandstackptr cs = ::odedregcmds();
baseio io;
oddbcommandcontextptr cc = exdbcommandcontext::createobject( &io, carspacedd::pdb );

exdbcommandcontext* excc = static_cast<exdbcommandcontext*>( cc.get() );
cs->executecommand( "modelerproperties nurbsparam 100 finish", excc );
cs->executecommand( "modelerproperties normaltolerance 100 finish", excc );
^and this is what i do right after allocating the geometry simplifier and right before vectorization. as the code is right now, i'm trying to provoke any kind of change in vectorization, but it isn't happening. my od3dsolids triangulate exactly the same way as before. what am i missing?
attached you will find a screenshot of my current triangulation as well as the test example dwg.
attached images
hi
modelermodule also has
code:
static odresult settriangulationparams(const wrtriangulationparams &triangulationparams);
static void gettriangulationparams(wrtriangulationparams &triangulationparams);
and normal tolerance should be 1 degree, 2 degree ... 15 by default.
worked like a charm, thank you


所有的时间均为北京时间。 现在的时间是 06:14 PM.