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

yang686526 2009-05-07 04:28 PM

【转帖】stroking An Oddbellipse 9arc0
 
stroking an oddbellipse (arc)
stroking an oddbellipse (arc)
i want to retrieve the wcs values for the parameters centerx, centery, lmajaxis, lminaxis, sweepang, startang, rotangle - so that i can stroke the elliptical arc. i get these parameters using appropriate methods on the oddbellipse, but when the arc has a normal vector of (0, 0, -1) - my stroking algorithm fails. is there any stroking function available in dwgdirect that can stroke the oddbellipse entity? has anyone else faced a similar problem?
thanks,
saroja
probably your algorithm do not take into consideration that angles are measured ccw around normal. if normal is (0,0,-1) they are measured cw around z axis (ccw around normal).
you can get the points this way:
code:
oddbellipseptr pdbell;
odgeelliparc3d geellipse(pdbell->center(),
pdbell->majoraxis(), pdbell->minoraxis(),
pdbell->majorradius(), pdbell->minorradius());
odgepoint3darray arrpoints;
geellipse.getsamplepoints(pdbell->startparam(), pdbell->endparam(), deviation, arrpoints);
);
sergey slezkin
last edited by mmuratov; 2nd november 2004 at 06:00 amfff">.
getsamplepoints works great!
sergey, thanks for the prompt reply. getsamplepoints works fine.


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