Returns the vertex unit normal for each vertex of a mesh object.
rhinoscriptsyntax.MeshVertexNormals (mesh_id)
rhinoscript.mesh.MeshVertexNormals (mesh_id)
mesh_id |
Required. String or Guid. The identifier of a mesh object. |
List |
A list of 3-D vectors that define the vertex unit normals of the mesh if successful. The number of elements in the array will be equal to the value returned by MeshVertexCount. In which case, the array will identify the unit normals for each vertex return by MeshVertices. |
None |
If the mesh does not contain vertex normals, if not successful, or on error. |
import rhinoscriptsyntax as rs
obj = rs.GetObject("Select mesh", rs.filter.mesh)
normals = rs.MeshVertexNormals(obj)
if normals:
for normal in normals: print normal