Halfedge

class m3sh.hds.Halfedge(origin, target)[source]

Halfedge base class.

Halfedges store references to their vertices, the successor, predecessor, and twin halfedge as well as the incident face – the face to its left. A closed loop of halfedges defines a face and its orientation. Successor and predecessor refer to the next and previous halfedge in such a loop.

Parameters:
  • origin (Vertex) – Origin vertex of the halfedge.

  • target (Vertex) – Target vertex of the halfedge.

Note

As halfedges are stored in a dictionary and not in a list, they do not have a canonical index value but a key that is formed by the pair of origin and target vertex.

Attributes

boundary

Topological state.

collapsible

Topological state.

deleted

Internal state.

face

Incident face.

flags

Halfedge flags.

flippable

Topological state.

midpoint

Halfedge midpoint.

next

Successor halfedge.

origin

Halfedge origin vertex.

pair

Opposite halfedge.

prev

Predecessor halfedge.

target

Halfedge target vertex.

vector

Halfedge direction vector.

Special methods

__contains__(vertex)

Incidence test.

__getitem__(index)

Vertex access.

__iter__()

Vertex iterator.