MeshFaceVertices

Returns the vertex indices of all faces of a mesh object.

Syntax

rhinoscriptsyntax.MeshFaceVertices (object_id)

rhinoscript.mesh.MeshFaceVertices (object_id)

Parameters

object_id

Required.  String or Guid.  The identifier of a mesh object.

Returns

list

A list containing lists of four numbers that define the vertex indices for each face of the mesh if successful.  Both quad and triangle faces are returned. If the third and forth vertex indices of a face are identical, the face is a triangle. Otherwise the face is a quad.

None

If not successful, or on error.

Example

import rhinoscriptsyntax as rs

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

faceVerts = rs.MeshFaceVertices( obj )

if faceVerts:

    for count, face in enumerate(faceVerts):

        print "face(", count, ") = (", face[0], ",", face[1], ",", face[2], ",", face[3], ")"

Also See

IsMesh

MeshFaceCount

MeshFaces