Project point on Plane

Dear all,
I would like to know how to project a point into plane.
could you sketch me an example please?
is the same if I use the method closest point?
kind regards

Here’s a sample:

thanks Alain

Hi Alan,

I couldn’t find a method to project the point on the plane.
should I convert the plane into a brep object?

for the moment
I resolved the problem like this. Is work for now, but I think it could fail at some point.

ln = new Line(ptA, plDef.ZAxis, -1000);
Rhino.Geometry.Intersect.Intersection.LinePlane(ln, plDef, out lnParam);
ptPr = ln.PointAt(lnParam);

Could you help me?

thanks in advance

Hi Carlos,

Sorry I misread your question. If you want to project in a direction normal to the plane then you can use the ClosestPoint method. Or you can use Intersection.LinePlane (like you’re doing) for any direction. The line will be projected if it’s not long enough. Just make sure that LinePlane returns true.

example in Python:

ln = Line(ptA, Vector3d(1,0,1), 1)
b, lnParam = Rhino.Geometry.Intersect.Intersection.LinePlane(ln, plDef);
if b:
  ptPr = ln.PointAt(lnParam);
  print ptPr

HI Alain
Thank you very much.
sorry for the delay.