import os
import compas

from compas.datastructures import Mesh
from compas_rhino.artists import MeshArtist

HERE = os.path.dirname(__file__)
DATA = os.path.join(HERE, 'data')
FILE = os.path.join(DATA, 'faces.obj')

mesh = Mesh.from_obj(FILE)

artist = MeshArtist(mesh, layer="Mesh")

artist.draw_vertices(
    color={key: (255, 0, 0) for key in mesh.vertices_on_boundary()})

artist.draw_vertexlabels(
    text={key: str(mesh.vertex_degree(key)) for key in mesh.vertices()})

artist.draw_edges(
    keys=list(mesh.edges_on_boundary()),
    color=(255, 0, 0))

artist.draw_faces(
    color={key: (150, 255, 150) for key in mesh.faces() if not mesh.is_face_on_boundary(key)})

[((7, 7, 7, 32), 'os.path.dirname', 'os.path.dirname', ({(7, 23, 7, 31): '__file__'}, {}), '(__file__)', False, 'import os\n'), ((8, 7, 8, 33), 'os.path.join', 'os.path.join', ({(8, 20, 8, 24): 'HERE', (8, 26, 8, 32): '"""data"""'}, {}), "(HERE, 'data')", False, 'import os\n'), ((9, 7, 9, 38), 'os.path.join', 'os.path.join', ({(9, 20, 9, 24): 'DATA', (9, 26, 9, 37): '"""faces.obj"""'}, {}), "(DATA, 'faces.obj')", False, 'import os\n'), ((11, 7, 11, 26), 'compas.datastructures.Mesh.from_obj', 'Mesh.from_obj', ({(11, 21, 11, 25): 'FILE'}, {}), '(FILE)', False, 'from compas.datastructures import Mesh\n'), ((13, 9, 13, 39), 'compas_rhino.artists.MeshArtist', 'MeshArtist', (), '', False, 'from compas_rhino.artists import MeshArtist\n')]