Skip to main content

BoundingBox

GitHub source

BoundingBox

evo.objects.typed.types.BoundingBox

A bounding box defined by minimum and maximum coordinates.

min

min: Point3

The minimum point of the bounding box.

max

max: Point3

The maximum point of the bounding box.

from_extent

from_extent(origin: Point3, extent: Size3d, rotation: Rotation | None = None) -> BoundingBox

Create a BoundingBox from an origin point and extent.

Parameters:

NameTypeDescriptionDefault
originPoint3The origin point of the box.required
extentSize3dThe extent (dx, dy, dz) of the box.required
rotationRotation | NoneOptional rotation to apply to the box.None

Returns:

TypeDescription
BoundingBoxThe bounding box that encompasses the rotated box.

from_regular_grid

from_regular_grid(origin: Point3, size: Size3i, cell_size: Size3d, rotation: Rotation | None = None) -> BoundingBox

Create a BoundingBox for a regular 3D grid.

Parameters:

NameTypeDescriptionDefault
originPoint3The origin point of the grid.required
sizeSize3iThe number of cells in each dimension.required
cell_sizeSize3dThe size of each cell in each dimension.required
rotationRotation | NoneOptional rotation to apply to the grid.None

Returns:

TypeDescription
BoundingBoxThe bounding box that encompasses the grid.

What is the reason for your feedback?