Determines the relationship between the regions bounded by two coplanar closed curves.
Rhino.PlanarClosedCurveContainment (strCurve1, strCurve2 [, arrPlane [, dblTolerance]])
strCurve1 |
Required. String. The object identifier of the first planar, closed curve. |
strCurve2 |
Required. String. The object identifier of the second planar, closed curve. |
arrPlane |
Optional. Array. The plane containing the closed curves. 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 relationship if successful. The possible values are as follows:
|
||||||||||
Null |
If not successful, or on error. |
Const rhObjectCurve = 4
Dim strCurve1, strCurve2, intResult
strCurve1 = Rhino.GetObject("Select first curve", rhObjectCurve )
strCurve2 = Rhino.GetObject("Select second curve", rhObjectCurve )
If Rhino.IsCurvePlanar(strCurve1) And Rhino.IsCurvePlanar(strCurve2) Then
If Rhino.IsCurveClosed(strCurve1) And Rhino.IsCurveClosed(strCurve2) Then
If Rhino.IsCurveInPlane(strCurve1) And Rhino.IsCurveInPlane(strCurve2) Then
intResult = Rhino.PlanarClosedCurveContainment(strCurve1, strCurve2)
If (intResult = 0) Then
Rhino.Print "The regions bounded by the curves are disjoint."
ElseIf (intResult = 1) Then
Rhino.Print "The two curves intersect.."
ElseIf (intResult = 2) Then
Rhino.Print "The region bounded by Curve1 is inside of Curve2."
Else
Rhino.Print "The region bounded by Curve2 is inside of Curve1."
End If
End If
End If
End If