查看单个帖子
旧 2009-05-04, 06:09 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】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 = :dedregcmds();
baseio io;
oddbcommandcontextptr cc = exdbcommandcontext::createobject( &io, carspacedd:db );

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
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)