高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】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.
|