capytaine.meshes.mesh_like_protocol module

class capytaine.meshes.mesh_like_protocol.MeshLike(*args, **kwargs)[source]

Bases: Protocol

Minimal API that a class describing a mesh should implement to be usable with the rest of Capytaine.

The goal is two-fold:

1. Use at runtime to identify a mesh for functions that behaves differently depending on the type of the input (e.g. Delhommeau().evaluate). 2. Use as documentation for third-party mesh implementation.

In the future, it could also be used for static typing.

extract_faces(faces_id)[source]
faces: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]
faces_areas: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]
faces_centers: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]
faces_normals: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]
faces_radiuses: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]
join_meshes()[source]
nb_faces: int
nb_vertices: int
quadrature_points: Tuple[Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str], Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]]
vertices: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]
with_normal_vector_going_down(**kwargs)[source]