m3sh.hds.Mesh.
halfedges#
- Mesh.halfedges#
Halfedge dictionary.
Dictionary that maps pairs of
Vertexobjects toHalfedgeinstances.Examples
To visit all
Halfedgeinstances of a mesh one can usefor h in mesh.halfedges.values(): ...
To directly visit halfedges as
Vertexinstance pairs usefor v, w in mesh.halfedges.keys(): ...
To check whether two vertices of a mesh are adjacent (connected by an edge) we can do one of the following. The resulting value depends on the chosen query method:
(v, w) in mesh.halfedges # True or False h = mesh.halfedges[v, w] # may raise KeyError h = mesh.halfedges.get((v, w)) # can result in h = None