capytaine.meshes.collections module¶
A set of meshes that can be used as a Mesh.
- class capytaine.meshes.collections.CollectionOfMeshes(meshes: Iterable[Mesh | CollectionOfMeshes], name=None)[source]¶
Bases:
ClippableMixin
,SurfaceIntegralsMixin
,Abstract3DObject
A tuple of meshes. It gives access to all the vertices of all the sub-meshes as if it were a mesh itself. Collections can be nested to store meshes in a tree structure.
- Parameters:
meshes (Iterable of Mesh or CollectionOfMeshes) – meshes in the collection
name (str, optional) – a name for the collection
- property axis_aligned_bbox¶
Get the axis aligned bounding box of the mesh.
- Returns:
(xmin, xmax, ymin, ymax, zmin, zmax)
- Return type:
tuple
- property center_of_mass_of_nodes¶
- clip(*args, inplace=True, name=None, **kwargs)¶
- property diameter_of_nodes¶
- property faces¶
Return the indices of the vertices forming each of the faces. For the later submeshes, the indices of the vertices has to be shifted to correspond to their index in the concatenated array self.vertices.
- property faces_areas¶
- property faces_centers¶
- property faces_normals¶
- property faces_radiuses¶
- heal_mesh(*args, inplace=True, name=None, **kwargs)¶
- indices_of_mesh(mesh_index: int) slice [source]¶
Return the indices of the faces for the sub-mesh given as argument.
- merged(name=None) Mesh [source]¶
Merge the sub-meshes and return a full mesh. If the collection contains other collections, they are merged recursively. Optionally, a new name can be given to the resulting mesh.
- mirror(*args, inplace=True, name=None, **kwargs)¶
- property nb_faces¶
- property nb_submeshes¶
- property nb_vertices¶
- path_to_leaf()[source]¶
Builds a list of lists of paths from the collection corresponding to the root of the tree to the submeshes corresponding to the leaves
- prune_empty_meshes(*args, inplace=True, name=None, **kwargs)¶
- property quadrature_method¶
- property quadrature_points¶
- rotate(*args, inplace=True, name=None, **kwargs)¶
- translate(*args, inplace=True, name=None, **kwargs)¶
- property vertices¶
- property volume¶
Returns volume of the mesh.
- with_normal_vector_going_down(*args, inplace=True, name=None, **kwargs)¶