How to get mesh point ID


#1

Hello!
Is it possible to get the ID(s) of the selected mesh point(s)? The point’s index in the mesh vertex list, I mean.
I need this for analyzing/debugging a python script that generates a mesh.

The ‘What’ command does not work on points, and the ‘EvaluatePt’ command just shows the coordinates.

Thanks!
Best regards
Eugen


(NARUTO) #2

Hi Rugen
You can use the GetMeshVertices function


#3

Hi, thanks!
So, without some lines of script, this is not possible? Allright, I will write me a script then…
Best regards
Eugen


(NARUTO) #4
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

#5

Hi! Thank you!
While you are at it: can you add that only the selected vertices are listed? =)

Best regards
Eugen