Edge

class Edge(vertices, next_edge=None, previous_edge=None)[source]

Bases: ShapeObject

Inits Edge

Parameters:
  • vertices (Tuple[Vertex, Vertex]) – Endpoints of the edge.

  • next_edge (Optional[Edge]) – Next edge

  • previous_edge (Optional[Edge]) – Previous edge

Methods

add_parent(parent)

Adds parent

Parameters:

parent (ShapeObject) – Adds parent

Return type:

None

static create_id()

Creates int as unique ID for ShapeObject instance. ShapeObject class tracks which IDs have previously been used and are thus not available.

Returns:

Unique ID

Return type:

int

Attributes

last_id = 0