openmc.BoundingBox

class openmc.BoundingBox(lower_left: Iterable[float], upper_right: Iterable[float])[source]

Axis-aligned bounding box.

New in version 0.14.0.

Parameters
  • lower_left (iterable of float) – The x, y, z coordinates of the lower left corner of the bounding box in [cm]

  • upper_right (iterable of float) – The x, y, z coordinates of the upper right corner of the bounding box in [cm]

Variables
  • center (numpy.ndarray) – x, y, z coordinates of the center of the bounding box in [cm]

  • lower_left (numpy.ndarray) – The x, y, z coordinates of the lower left corner of the bounding box in [cm]

  • upper_right (numpy.ndarray) – The x, y, z coordinates of the upper right corner of the bounding box in [cm]

  • volume (float) – The volume of the bounding box in [cm^3]

  • extent (dict) – A dictionary of basis as keys and the extent (left, right, bottom, top) as values. Intended use in Matplotlib plots when setting extent

  • width (iterable of float) – The width of the x, y and z axis in [cm]

expand(padding_distance: float, inplace: bool = False) BoundingBox[source]

Returns an expanded bounding box

Parameters
  • padding_distance (float) – The distance to enlarge the bounding box by

  • inplace (bool) – Whether or not to return a new BoundingBox instance or to modify the current BoundingBox object.

Return type

An expanded bounding box

classmethod infinite() BoundingBox[source]
Create an infinite box. Useful as a starting point for determining

geometry bounds.

Return type

An infinitely large bounding box.