trimesh_collapse_edge

compas.datastructures.trimesh_collapse_edge(mesh, 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 the start of the edge. If t == 1.0 collapse to the end of the edge. If 0.0 < t < 1.0, collapse to a point between start and end.

allow_boundarybool, optional

If True, allow collapses involving vertices on the boundary.

fixedlist, optional

Identifiers of the vertices that should stay fixed.

Returns:
None
Raises:
ValueError

If the edge is not part of the mesh.