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

yang686526 2009-05-06 09:55 PM

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


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