PlaneClosestPoint

Returns the point on a plane that is closest to a test point.

Syntax

rhinoscriptsyntax.PlaneClosestPoint (plane, point, return_point=True)

rhinoscript.plane.PlaneClosestPoint (plane, point, return_point=True)

Parameters

plane

Required. The plane.

point

Required. List of 3 numbers or Point3d.  The 3-D point to test.

return_point

Optional.  Boolean.  If omitted or True, then the point on the plane that is closest to the test point is returned. If False, then the parameter of the point on the plane that is closest to the test point is returned.

Returns

Point3d or List

If return_point is omitted or True, then the 3-D point if successful. If return_point is False, then an array containing the U,V parameters of the point if successful.

None

If not successful, or on error.

Example

import rhinoscriptsyntax as rs

point = rs.GetPoint("Point to test")

if point:

    plane = rs.ViewCPlane()

    if plane:

        print rs.PlaneClosestPoint(plane, point)

Also See

DistanceToPlane

EvaluatePlane