Finds the point on an infinite line that is closest to a test point.
Rhino.LineClosestPoint (arrLine, arrPoint)
arrLine |
Required. Array. Two 3-D points identifying the starting and ending points of the line. |
arrPoint |
Required. Array. The test point. |
Array |
The point on the line that is closest to the test point is successful. |
Null |
If not successful, or on error. |
Dim arrFrom, arrTo, arrPoint, arrResult
arrFrom = Array(0, 0, 0)
arrTo = Array(5, 5, 0)
arrPoint = Array(15, 10, 0)
arrResult = Rhino.LineClosestPoint(Array(arrFrom, arrTo), arrPoint)
If IsArray(arrResult) Then Rhino.AddPoint(arrResult)