Mesh.join
- Mesh.join(other)[source]
Add the vertices and faces of another mesh to the current mesh.
- Parameters
other (
Mesh
) – The other mesh.- Returns
None – The mesh is modified in place.
Examples
>>> from compas.geometry import Box >>> from compas.geometry import Translation >>> from compas.datastructures import Mesh >>> a = Box.from_width_height_depth(1, 1, 1) >>> b = Box.from_width_height_depth(1, 1, 1) >>> T = Translation.from_vector([2, 0, 0]) >>> b.transform(T) >>> a = Mesh.from_shape(a) >>> b = Mesh.from_shape(b) >>> a.number_of_vertices() 8 >>> a.number_of_faces() 6 >>> b.number_of_vertices() 8 >>> b.number_of_faces() 6 >>> a.join(b) >>> a.number_of_vertices() 16 >>> a.number_of_faces() 12