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

yang686526 2009-05-06 05:21 PM

【转帖】lwpolyline bulge calculation
 
lwpolyline bulge calculation
lwpolyline bulge calculation
in odx there was get_odcomputebulge for the computation of bulge from start , end and center point.
how can i do the same in directx ( delphi user).
can i have some help ?
furio

hi,
i don't know whether this should help you, but here is a function in c++ which calculates the center point from given start, end and bulge. even if it don't help you smo else may need something. as to your situation. the dwgdirect guys should help here...
[code] odgepoint2d getbulgedcenterpoint(
const odgepoint2d& ptstart,
const odgepoint2d& ptend,
const double dbulge)
{
const double d1 = (dbulge-1.0/dbulge)*0.5;
return odgepoint2d (
(ptstart.x+ptend.x+d1*(ptend.y-ptstart.y))*0.5,
(ptstart.y+ptend.y-d1*(ptend.x-ptstart.x))*0.5
);
} </pre><hr></blockquote>
regards
chudomir
best regards
chudomir

i need to draw in the polyline some arc and i know the start point , end point and radius.
so i need a routine like odcomputebulge for the computation of bulge .
i try to do but the problem is too complex for me.
has somebody already solved this problem ?
can i have some help ?
furio

bulge = tan(arcsweepangle / 4.);
sergey slezkin


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