Mesh.merge_faces

Mesh.merge_faces(faces)

Merge two faces of a mesh over their shared edge.

Parameters
Returns

int

Examples

>>> from compas.datastructures import Mesh
>>> mesh = Mesh.from_vertices_and_faces([[0, 0, 0], [1, 0, 0], [1, 1, 0], [0, 1, 0]], [[0, 1, 2, 3]])
>>> mesh = mesh.subdivide(scheme='quad')
>>> mesh_merge_faces(mesh, [1, 2])
>>> mesh_merge_faces(mesh, [3, 5])
>>> mesh_merge_faces(mesh, [4, 6])
>>> mesh.face_vertices(7)
[3, 5, 0, 4, 1, 6, 2, 7]