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
Return axis-aligned bounding box as (min_xyz, max_xyz).
Return world-space oriented bounding box corners.
Return 2D extent as [xmin, xmax, ymin, ymax] (for compatibility).
Maximum X coordinate.
Minimum X coordinate.
Return 2D bounding box in XY as (xmin, ymin, xmax, ymax).
Maximum Y coordinate.
Minimum Y coordinate.
Maximum Z coordinate.
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.