Returns the point on a plane that is closest to a test point.
Rhino.PlaneClosestPoint (arrPlane, arrPoint [, blnReturnPoint])
arrPlane |
Required. Array. The plane. The elements of a plane array are as follows:
|
||||||||||
arrPoint |
Required. Array. The 3-D point to test. |
||||||||||
blnReturnPoint |
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. |
Array |
If blnReturnPoint is omitted or True, then the 3-D point if successful. If blnReturnPoint is False, then an array containing the U,V parameters of the point if successful. |
Null |
If not successful, or on error. |
Dim arrPlane, arrPoint
arrPoint = Rhino.GetPoint("Point to test")
If IsArray(arrPoint) Then
arrPlane = Rhino.ViewCPlane
If IsArray(arrPlane) Then
MsgBox Rhino.Pt2Str(Rhino.PlaneClosestPoint(arrPlane, arrPoint))
End If
End If