Fri, 01/20/2023 - 23:49
Forums:
Hello all,
I have an Ellipse (height 800, width 200) and try to find
a) the point on the ellipse on a given height 60
b) the tangent at the point found
(please see attached sketch)
gp_Pnt center(0.0, 0.0, 0.0);
gp_Dir dir = gp::DX();
gp_Ax2 axis(center, dir);
gp_Elips ellipse_gp = gp_Elips (axis,800/2,200/2);
Geom_Ellipse gEllipse(ellipse_gp);
gEllipse.D0(60, p);
qDebug() << "gEllipse.D0(" << 60 << ", p)" << p.X() << p.Y() << p.Z();
result:
gEllipse.D0( 60 , p) 0 30.4811 -380.965
Correct result would be
0, 98.869, 60
It is obvious that I have no clue what I am doing - any help is much welcome.
Also, how to find the tangent?
Thanks!
Attachments:
Sat, 01/21/2023 - 14:58
Check out GeomLProp_CLProps, GeomAPI_ProjectPointOnCurve and GeomAPI_IntCS(intersect with plane at Z=60) , there should be some answers for you.
Sun, 01/22/2023 - 21:22
Thank you.
Found a complete solution here:
https://dev.opencascade.org/content/line-tangent-3d-curve-point#comment-...