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

oddbarc::getparamatpoint question
oddbarc::getparamatpoint question
hi i have these data from oddbarc:
double rad = parc->radius();
odgepoint3d center = parc->center();
double startang = parc->startangle();
double endang = parc->endangle();
odgevector3d normal = parc->normal();
odgepoint3d pt = /*....*/;
double par1,par2;
arc.getstartparam(par1);
arc.getendparam(par2);
double param=0;
odresult res = arc.getparamatpoint(pt,param);
the data values are:
rad: 40.414588972907303
center: x=495.89344056266731 y=90.923630137035630 z=0.0
startang: 4.0108237083319391
endang: 3.7379884491134825
normal: x=0.0 y=0.0 z=1.0
pt: x=519.36595613877898 y=123.82317442534203 z=0.0
par1: 4.0108237083319391
par2: 10.021173756293068
param: 0.95109367600887407
res: einvalidinput
distance between pt and center is:
40.414588972907286405343890311823
i think that pt should lie on the arc and getparamatpoint should not return einvalidinput, but should calculate some param.
can someone please help me in determinig whether this is a bug?
i'm using the dwgdirect version 1.10 (but not yet with the new update)
thanks in advance for any help
regards
chudomir
error code is returned because point's parameter does not belong to arc's interval:
start <= parameter <= end
sergey slezkin
hi sergey, on the attached drawing, i receive the same data as indicated in the first post.
the point is in the arc's interval.
can you please take a look.
probably i'm wrong but need to know what it is?..
thanks
chudomir
attached images (6.2 kb, 9 views)
attached files (3.6 kb, 5 views)

this is dd bug in oddbarc::getparamatpoint().
start param 4
end param 9
point's param calculated 0.95
i can send you the fix.
sergey slezkin
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)