Determines if a point is inside of a closed curve, on a closed curve, or outside of a closed curve.
Rhino.PointInPlanarClosedCurve (arrPoint, strCurve [, arrPlane [, dblTolerance]])
arrPoint |
Required. Array. A 3-D point to test. |
strCurve |
Required. String. The object identifier of the planar, closed curve. |
arrPlane |
Optional. Array. The plane containing the closed curve and point. If omitted, the currently active construction plane is used. |
dblTolerance |
Optional. Number. The tolerance. If omitted, the current document absolute tolerance is used. |
Number |
A number identifying the result if successful. The possible values are as follows:
|
||||||||
Null |
If not successful, or on error. |
Const rhObjectCurve = 4
Dim strObject, arrPoint, intResult
strObject = Rhino.GetObject("Select a planar, closed curve", rhObjectCurve)
If Rhino.IsCurveClosed(strObject) And Rhino.IsCurvePlanar(strObject) Then
arrPoint = Rhino.GetPoint("Pick a point")
If IsArray(arrPoint) Then
intResult = Rhino.PointInPlanarClosedCurve(arrPoint, strObject)
If (intResult = 0) Then
Rhino.Print "The point is outside of the closed curve."
ElseIf (intResult = 1) Then
Rhino.Print "The point is inside of the closed curve."
Else
Rhino.Print "The point is on the closed curve."
End If
End If
End If