Mesh.edge_attribute

Mesh.edge_attribute(edge, name, value=None)[source]

Get or set an attribute of an edge.

Parameters
  • edge (tuple[int, int]) – The identifier of the edge as a pair of vertex identifiers.

  • name (str) – The name of the attribute.

  • value (object, optional) – The value of the attribute. Default is None.

Returns

object | None – The value of the attribute, or None when the function is used as a “setter”.

Raises

KeyError – If the edge does not exist.