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

yang686526 2009-05-06 07:23 PM

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


所有的时间均为北京时间。 现在的时间是 11:48 PM.