Returns the point on a mesh that is closest to a test point.
Rhino.MeshClosestPoint (strObject, arrPoint [, dblTolerance])
strObject |
Required. String. The identifier of a mesh object. |
arrPoint |
Required. Array. A 3-D point to test. |
dblTolerance |
Optional. Number. The tolerance. Of omitted, a default tolerance of 0.0 is used. |
Array |
An array containing the results of the calculation, if successful. The array elements are as follows:
|
|||||||||
Null |
If not successful, or on error. |
Const rhMesh = 32
Dim strObject, arrPoint, arrIntersect
strObject = Rhino.GetObject("Select mesh", rhMesh)
arrPoint = Rhino.GetPoint("Pick test point")
arrIntersect = Rhino.MeshClosestPoint(strObject, arrPoint)
If IsArray(arrIntersect) Then
Rhino.AddPoint arrIntersect(0)
End If