Show mesh vertex numbers in viewport

can anybody provide a script that shows a mesh´s vertex numbers in the viewport (and ideally outputs them to dots)
thanks in advance for any help
roberto

Hi Roberto,

this is the simplest version i got which only shows vertices as grouped annotations in python. If you need vbscript let me know:

import rhinoscriptsyntax as rs

def NumerizeMeshVertices():
    m_id = rs.GetObject("Select a mesh", 32, True, False)
    if not m_id: return

    mesh = rs.coercemesh(m_id)
    dots = []
    rs.EnableRedraw(False)

    for i, v in enumerate(mesh.Vertices):
        dots.append(rs.AddTextDot(i, v))

    rs.AddObjectsToGroup(dots, rs.AddGroup())
    rs.EnableRedraw(True)

if __name__=="__main__":
    NumerizeMeshVertices()

Or as script file: NumerizeMeshVerts.py (441 Bytes)
You can use this to load it:

! _-RunPythonScript "C:\YourPathToTheScript\NumerizeMeshVerts.py"

c.

hi clement,
thanks a lot !
(wie gewohnt vom feinsten)

cheers
roberto

1 Like