trimesh_split_edge

compas.datastructures.trimesh_split_edge(mesh, u, v, t=0.5, allow_boundary=False)[source]

Split an edge of a triangle mesh.

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

  • u (int) – Identifier of the first vertex.

  • v (int) – Identifier of the second vertex.

  • t (float, optional) – The location of the split point along the original edge. The value should be between 0.0 and 1.0

  • allow_boundary (bool, optional) – If True, allow splits on boundary edges.

Returns

int | None – The identifier of the split vertex, if the split was successful.

Notes

This operation only works as expected for triangle meshes.