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

yang686526 2009-05-06 10:38 PM

【转帖】problem creating oddbellipse 91.080
 
problem creating oddbellipse (1.08)
problem creating oddbellipse (1.08)
dwgdirect 1.08 causes exception "invalid input" on the "set" method of oddbellipse:
code:
oddbellipseptr pellipse = oddbellipse::createobject();
pblock->appendoddbentity(pellipse);
odgepoint3d p(20.0, 30.0, 0.0);
odgevector3d normal(0.0, 0.0, 1.0);
odgevector3d majoraxis(20.0, 0.0, 0.0);
// jh 20040628 - crashes for some stupid reason
pellipse->set(p, normal, majoraxis, 2.0, 0.0, 3.0);
pellipse->setstartparam(0.0);
pellipse->setendparam(3.0);
why are the parameters to set() invalid. please explain a way to get around this problem.
thanks - james

the fourth parameter of oddbellipse::set() method is radius ratio. it is quotient of its minor and major axis lengths. it must belong to the interval (0.0, 1.0], else dd will throw exception invalid input.
sincerely yours,
george udov

btw, setstartparam and setendparam in 1.08 contain a bug, that is fixed only in 1.11 update (expected today-tomorrow). to specify parameters in 1.08, use oddbellipse::set.
sincerely yours,
george udov

many thanks.


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