Mesh.split_edge

Mesh.split_edge(u, v, t=0.5, allow_boundary=False)[source]

Split and edge by inserting a vertex along its length.

Parameters
  • mesh (Mesh) – Instance of a mesh.

  • u (int) – The key of the first vertex of the edge.

  • v (int) – The key of the second vertex of the edge.

  • t (float, optional) – The position of the inserted vertex. The value should be between 0.0 and 1.0

  • allow_boundary (bool, 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.