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

yang686526 2009-05-06 09:32 PM

【转帖】orthoproject failing for all eliiptical arcs
 
orthoproject failing for all eliiptical arcs
orthoproject failing for all eliiptical arcs
hi,
i have a dwg file having an elliptical arc whose normal is on the x-axis.
the ellitical arc when projected on the xy-plane returns a straight line as expected, but the end-point of the line is incorrect(for example, for the attached file, the length of the line is 1/3rd of the expected length).
we use the following code snippet for projecting ellipse onto xy plane:
code:
odgeplane plane = odgeplane::kxyplane;
odgeentity3d* entity = elliparc.orthoproject(plane);
switch(entity->type())
{
case odge::klineseg3d:
{
odgelineseg3d* lineproj = (odgelineseg3d*)entity;
odgepoint2d pointsout[2];
pointsout[0] = odgepoint2d(lineproj->startpoint().x, lineproj->startpoint().y);
pointsout[1] = odgepoint2d(lineproj->endpoint().x, lineproj->endpoint().y);
break;
case odge::kelliparc3d:
// map ellipse.
break;
in the above code, pointsout[0] comes correctly as expected, but pointsout[1] is incorrect. i am attaching a .dwg file which will exhibit the buggy behaviour.
thanks,
-paresh-
attached files
yes, odgeellipsearc3d project() and orthoproject() work incorrectly in case of line segment to be returned.
this will be fixed in next release/update.
thank you for reporting the problem.
sergey slezkin


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