parq_blockmodel.geometry.Extents#

class parq_blockmodel.geometry.Extents(geometry)[source]#

Read-only geometry view for extent-related queries.

Extents provides axis-aligned and oriented bounding box representations of a RegularGeometry without duplicating any geometry state.

All properties are derived from the underlying RegularGeometry: - Local corner, block size, shape - World rotation matrix and origin - Centroid positions

_geometry#

The RegularGeometry being queried (not owned).

__init__(geometry)[source]#

Initialize Extents as a read-only view over a RegularGeometry.

Parameters:

geometry (RegularGeometry) – The RegularGeometry instance to query.

Methods

__init__(geometry)

Initialize Extents as a read-only view over a RegularGeometry.

Attributes

axis_aligned_bounds

Return axis-aligned bounding box as (min_xyz, max_xyz).

corners

Return world-space oriented bounding box corners.

extent_xy

Return 2D extent as [xmin, xmax, ymin, ymax] (for compatibility).

xmax

Maximum X coordinate.

xmin

Minimum X coordinate.

xy_bbox

Return 2D bounding box in XY as (xmin, ymin, xmax, ymax).

ymax

Maximum Y coordinate.

ymin

Minimum Y coordinate.

zmax

Maximum Z coordinate.

zmin

Minimum Z coordinate.

property axis_aligned_bounds: tuple[tuple[float, float, float], tuple[float, float, float]]#

Return axis-aligned bounding box as (min_xyz, max_xyz).

Computes bounds from centroid cloud expanded by half-block size in the rotated coordinate frame. Works correctly for both orthogonal and rotated geometries.

Returns:

Tuple of (min_point, max_point), each a 3-tuple (x, y, z).

property corners: ndarray[Any, dtype[floating]]#

Return world-space oriented bounding box corners.

Computes the 8 corners of the exact block model extent in world coordinates. Corners are derived from the local grid corner, block size, and shape.

Returns:

Array of shape (8, 3) with corners in world coordinates. Corners ordered as: [0,0,0], [1,0,0], [0,1,0], [1,1,0], [0,0,1], [1,0,1], [0,1,1], [1,1,1] where indices refer to (i, j, k) binary selection.

property extent_xy: list[float]#

Return 2D extent as [xmin, xmax, ymin, ymax] (for compatibility).

property xmax: float#

Maximum X coordinate.

property xmin: float#

Minimum X coordinate.

property xy_bbox: tuple[float, float, float, float]#

Return 2D bounding box in XY as (xmin, ymin, xmax, ymax).

property ymax: float#

Maximum Y coordinate.

property ymin: float#

Minimum Y coordinate.

property zmax: float#

Maximum Z coordinate.

property zmin: float#

Minimum Z coordinate.