MeshFaceCenters

Returns the center point of each face of a mesh object.  

Syntax

rhinoscriptsyntax.MeshFaceCenters (mesh_id)

rhinoscript.mesh.MeshFaceCenters (mesh_id)

Parameters

mesh_id

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

Returns

List

A list of 3-D points that define the face center points of the mesh if successful.  The number of elements in the list will be equal to the value returned by MeshFaceCount. In which case, the list will identify the center points for each face return by MeshFaces.

None

If not successful, or on error.

Example

import rhinoscriptsyntax as rs

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

centers = rs.MeshFaceCenters(obj)

if centers:

    for point in centers: rs.AddPoint(point)

Also See

IsMesh

MeshFaceCount

MeshFaces