Mesh.merge_faces
- Mesh.merge_faces(faces)[source]
Merge two faces of a mesh over their shared edge.
- Parameters
mesh (
compas.datastructures.Mesh
) – A mesh data structure.faces (list[int]) – Face identifiers.
- 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]) 5 >>> mesh_merge_faces(mesh, [3, 5]) 6 >>> mesh_merge_faces(mesh, [4, 6]) 7 >>> mesh.face_vertices(7) [3, 5, 0, 4, 1, 6, 2, 7]