Prompts the user to pick, or select, one or more mesh vertices.
rhinoscriptsyntax.GetMeshVertices (object_id, message="", min_count=1, max_count=0)
rhinoscript.userinterface.GetMeshVertices (object_id, message="", min_count=1, max_count=0)
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 vertices to select. The default number is 1. |
max_count |
Optional. Number. The maximum number of vertices 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 vertices selected. If min_count > 0, then the picking stops when there are max_count vertices. The default number is 0. |
List |
A list of mesh vertex indices if successful. |
None |
If not successful, or on error. |
import rhinoscriptsyntax as rs
mesh = rs.GetObject("Select mesh", rs.filter.mesh)
if mesh:
indices = rs.GetMeshVertices(mesh)
if indices:
for index in indices: print index