“How can I plot the vertex, edge and face numbers of a datastructure in Rhino?”
For all of the CAD packages in compas, such as compas_rhino and compas_blender, the recommended way to visualise the indices of the vertices, edges or faces is via the Artist objects (NetworkArtist, MeshArtist, …).
These can be imported like so:
from compas_rhino.helpers import MeshArtist
from compas_blender.helpers import MeshArtist
The Artist is then easily made by handing over the datastructure:
meshartist = MeshArtist(mesh=mesh, layer='MeshArtist')
meshartist = MeshArtist(mesh=mesh, layer=1)
You can then plot a variety of things to the layer linked with the Artist.
You can clear anything that was drawn/plotted with:
meshartist.clear_vertices() meshartist.clear_vertexlabels() # Similarly for edges and faces.
You can also plot or clear specific vertices, edges or faces with the
meshartist.clear_edges(keys=[(0, 4)]) meshartist.clear_edgelabels(keys=[(5, 4)])