查看单个帖子
旧 2009-05-06, 09:32 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】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
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)