Calculates the intersection of a curve object and a mesh object.
Rhino.CurveMeshIntersection (strCurve, strMesh [, blnReturnFaces])
strCurve |
Required. String. The identifier of the curve to intersect. |
strMesh |
Required. String. The identifier of the mesh to intersect. |
blnReturnFaces |
Optional. Boolean. Return both intersection points and face indices. If omitted or False, then just the intersection points are returned. |
Array |
If blnReturnFaces is either omitted or False, then an array intersection points, if successful. |
|||||||||
Array |
If blnReturnFaces is True, then a one-dimensional array containing information about each intersection if successful. Each array element is a one-dimensional array that contains the following two elements:
|
|||||||||
Null |
If not successful, or on error. |
Const rhCurve = 4
Const rhMesh = 32
Dim strCurve, strMesh, arrCMX, arrEv
strCurve = Rhino.GetObject("Select curve to intersect", rhCurve)
If Not IsNull(strCurve) Then
strMesh = Rhino.GetObject("Select mesh to intersect", rhMesh)
If Not IsNull(strMesh) Then
arrCMX = Rhino.CurveMeshIntersection(strCurve, strMesh, True)
If IsArray(arrCMX) Then
For Each arrEv In arrCMX
Rhino.Print Rhino.Pt2Str(arrEv(0)) & ", Face index = " & CStr(arrEv(1))
Rhino.AddPoint arrEv(0)
Next
End If
End If
End If