mesh_split_edge

compas.datastructures.mesh_split_edge(mesh, edge, t=0.5, allow_boundary=False)[source]

Split and edge by inserting a vertex along its length.

Parameters:
meshcompas.datastructures.Mesh

Instance of a mesh.

edgetuple[int, int]

The identifier of the edge to split.

tfloat, optional

The position of the inserted vertex. The value should be between 0.0 and 1.0

allow_boundarybool, optional

If True, also split edges on the boundary.

Returns:
int

The key of the inserted vertex.

Raises:
ValueError

If u and v are not neighbors.