HalfFace.vertex_attribute

HalfFace.vertex_attribute(vertex, name, value=None)[source]

Get or set an attribute of a vertex.

Parameters
  • vertex (int) – The vertex identifier.

  • name (str) – The name of the attribute

  • value (obj, optional) – The value of the attribute.

Returns

object or None – The value of the attribute, or None if the vertex does not exist or when the function is used as a “setter”.

Raises

KeyError – If the vertex does not exist.