ConnectedMeshFaces

Finds all connected faces of a joined mesh based at a break angle. This can be used to extract a series of faces that make up a planar surface in a mesh or to extract set of faces that make up a coherent feature in the mesh.

Syntax

Rhino.ConnectedMeshFaces (strObject, intFaceIndex, dblBreakAngle, blnGreaterThan)

Parameters

strObject

Required.  String.  The identifier of a mesh object.

intFaceIndex

Required.  Number.  The index of the mesh to begin the search.

dblBreakAngle

Required.  Number.  The break angle, or the angle between adjacent face normals, in degrees.

blnGreaterThan

Required.  Boolean.  If True, angles greater than or equal to are consider.  If False, angles less than or equal to are considered.

Returns

Array

An array of face indices that identify the connected faces if successful.

Null

If not successful, or on error.

Example

Const rhObjectMesh = 32

Dim strMesh, arrIndices, arrFaces

strMesh = Rhino.GetObject("Select mesh", rhObjectMesh)

If Not IsNull(strMesh) Then

  arrIndices = Rhino.GetMeshFaces(strMesh, "Select mesh face", 1, 1)

  If IsArray(arrIndices) Then

    arrFaces = Rhino.ConnectedMeshFaces(strMesh, arrIndices(0), 1.0, true)

    If IsArray(arrFaces) Then

      Call Rhino.Print(CStr(UBound(arrFaces) + 1) & " connected faces found.")

    End If

  End If

End If

Also See

MeshFaceCount

MeshFaces

MeshFaceVertices

MeshPart