4.6.3. pde.tools.cuboid module¶
An n-dimensional, axes-aligned cuboid
This module defines the Cuboid
class, which represents an n-dimensional
cuboid that is aligned with the axes of a Cartesian coordinate system.
- class Cuboid(pos, size, mutable: bool = True)[source]¶
Bases:
object
class that represents a cuboid in \(n\) dimensions
defines a cuboid from a position and a size vector
- Parameters
- buffer(amount: Union[float, ndarray] = 0, inplace=False) Cuboid [source]¶
dilate the cuboid by a certain amount in all directions
- property centroid¶
- property corners: Tuple[ndarray, ndarray]¶
return coordinates of two extreme corners defining the cuboid
- classmethod from_centerpoint(centerpoint: ndarray, size: ndarray, **kwargs) Cuboid [source]¶
create cuboid from two points
- classmethod from_points(p1: ndarray, p2: ndarray, **kwargs) Cuboid [source]¶
create cuboid from two points