Face

class m3sh.hds.Face(index)[source]

Face base class.

In a halfedge based mesh representation a face is defined by the closed loop of halfedges starting at the halfedge attribute.

Parameters:

index (int) – Face index.

The vertices of a face can be visited in several ways. Using __len__() and __getitem__()

1 for i in range(len(f)):
2     print(f[i])

is equivalent to using __iter__()

1 for v in f:
2     print(v)

Note

The latter is much more efficient and preferred.

Attributes

barycenter

Face barycenter.

boundary

Topological state.

deleted

Internal state.

flags

Face flags.

halfedge

Incident halfedge.

index

Face index.

valence

Face valence.

Special methods

__contains__(item)

Vertex and halfedge containment test.

__getitem__(index)

Vertex access.

__index__()

Face index.

__int__()

Face index.

__iter__()

Vertex iterator.

__len__()

Face valence.