查看单个帖子
旧 2009-05-06, 09:55 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】performance oddbsplinegetarea90 exceptionally slow

performance: oddbspline::getarea() exceptionally slow
performance: oddbspline::getarea() exceptionally slow
hi,
we're using dd libs 2.1.0 built with vc8 and xcode. we were investigating some performance issues in our export to autocad formats and found that the call to oddbspline::getarea() is taking an exceptionally long amount of time, considerably slowing down any drawing that has any reasonably number of splines to be exported.
the relevant code we're using is:
code:
oddbsplineptr pspline = oddbspline::createobject();
...
pspline->setnurbsdata(3, // degree
false, // rational
m_isclosed, // closed
false, // periodic
m_property->m_controlpoints, // control points
m_property->m_knots, // knots
weights, // weights
1.0000e-10, // control point tolerance
1.0000e-10); // knot tolerance
...
double area = 0;
odresult result = pspline->getarea(area)fff">;
...
has anyone else seen this?
regards,
varun
control point tolerance is too "fine".
getarea() uses getsamplepoints() with that tolerance.
vladimir
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)