GetMeshFaces

Prompts the user to pick, or select, one or more mesh faces.

Syntax

rhinoscriptsyntax.GetMeshFaces (object_id, message="", min_count=1, max_count=0)

rhinoscript.userinterface.GetMeshFaces (object_id, message="", min_count=1, max_count=0)

Parameters

object_id

Required.  String or Guid.  The mesh object's identifier.

message

Optional.  String.  A prompt or message.

min_count

Optional.  Number.  The minimum number of faces to select.  The default number is 1.

intMaxCount

Optional.  Number.  The maximum number of faces to select.  If max_count is 0, then the user must press enter to finish selection.  If max_count is -1, then selection stops as soon as there are at least min_count faces selected.  If min_count > 0, then the picking stops when there are max_count faces.  The default number is 0.

Returns

List

A list of mesh face indices if successful.

None

If not successful, or on error.

Example

import rhinoscriptsyntax as rs

mesh = rs.GetObject("Select mesh", rs.filter.mesh)

if mesh:

    indices = rs.GetMeshFaces(mesh)

    if indices:

        for index in indices: print index

Also See

GetMeshVertices

MeshFaces

MeshFaceVertices

MeshVertices