m3sh.itertools.

halfs#

halfs(obj)#

Halfedge iterator

Traverse the incident halfedges of obj. For vertex input the halfedges with obj as origin are visited in a counter-clockwise traversal. For a face, the face defining loop of halfedges is traversed in counter-clockwise order.

Parameters:
objVertex or Face or Mesh

The base object.

Yields:
Halfedge

Next halfedge in a traversal of incident halfedges. For mesh input those halfedges are in no particular order.

Examples

When applied to a mesh

import itertools as it

for h in it.halfs(mesh)
    ...

is equivalent to

for h in mesh.halfedges.values():
    ...