Mesh.collapse_edge

Mesh.collapse_edge(edge, t=0.5, allow_boundary=False, fixed=None)[source]

Collapse an edge to its first or second vertex, or to an intermediate point.

Parameters:
meshcompas.datastructures.Mesh

Instance of a mesh.

edgetuple[int, int]

The identifier of the edge.

tfloat, optional

Determines where to collapse to. If t == 0.0 collapse to start of the edge. If t == 1.0 collapse to end of the edge. If 0.0 < t < 1.0, collapse to a point between start and end of the edge.

allow_boundarybool, optional

If True, allow collapses involving boundary vertices.

fixedlist[int], optional

A list of identifiers of vertices that should stay fixed.

Returns:
None
Raises:
ValueError

If the edge is not part of the mesh.