meshes_join
- compas.datastructures.meshes_join(meshes, cls=None)[source]
Join meshes without welding.
- Parameters
meshes (list) – A list of meshes.
cls (type (None)) – The type of the joined mesh. This defaults to the type of the first mesh in the list.
- Returns
mesh – The joined mesh.
Examples
>>> from compas.datastructures import Mesh >>> from compas.datastructures import meshes_join >>> vertices_1 = [[0, 0, 0], [0, 500, 0], [500, 500, 0], [500, 0, 0]] >>> vertices_2 = [[500, 0, 0], [500, 500, 0], [1000, 500, 0], [1000, 0, 0]] >>> faces = [[0, 1, 2, 3]] >>> mesh_1 = Mesh.from_vertices_and_faces(vertices_1, faces) >>> mesh_2 = Mesh.from_vertices_and_faces(vertices_2, faces) >>> mesh = meshes_join([mesh_1, mesh_2]) >>> mesh.number_of_vertices() 8 >>> mesh.number_of_faces() 2