m3sh.hds.Mesh.

collapse_halfedge#

Mesh.collapse_halfedge(halfedge, point=None, pull=True)#

Perform edge collapse.

Changed in version 1.1.0.

Collapse halfedge into one of its vertices. The other vertex is marked as deleted.

Parameters:
halfedgeHalfedge

Halfedge to be contracted.

pointarray_like, optional

Coordinates of collapse location.

pullbool, optional

If True halfedge is collapsed to its origin vertex, otherwise to its target.

Returns:
Vertex

Reference to the vertex that halfedge was collapsed to.

Warning

The caller is responsible to check the collapsibility of an edge before using this method. Trying to collapse a non-collapsible edge leads to undefined behavior and is likely to break the halfedge data structure.