ladybug_geometry.bounding module¶
Utility functions for computing bounding boxes and extents around geometry.
- ladybug_geometry.bounding.bounding_box(geometries, axis_angle=0)[source]¶
Get the min and max of an oriented bounding box around 3D geometry.
- Parameters:
geometries – An array of 3D geometry objects. Note that all objects must have a min and max property.
axis_angle – The counter-clockwise rotation angle in radians in the XY plane to represent the orientation of the bounding box extents. (Default: 0).
- Returns:
A tuple with two Point3D objects representing the min point and max point of the bounding box respectively.
- ladybug_geometry.bounding.bounding_box_extents(geometries, axis_angle=0)[source]¶
Get the width, length and height of an oriented bounding box around 3D geometry.
- Parameters:
geometries – An array of 3D geometry objects. Note that all objects must have a min and max property.
axis_angle – The counter-clockwise rotation angle in radians in the XY plane to represent the orientation of the bounding box extents. (Default: 0).
- Returns:
A tuple with 3 values corresponding to the width, length and height of the bounding box.
- ladybug_geometry.bounding.bounding_domain_x(geometries)[source]¶
Get minimum and maximum X coordinates of multiple geometries.
- Parameters:
geometries – An array of any ladybug_geometry objects for which the extents of the X domain will be computed. Note that all objects must have a min and max property.
- Returns:
A tuple with the min and the max X coordinates around the geometry.
- ladybug_geometry.bounding.bounding_domain_y(geometries)[source]¶
Get minimum and maximum Y coordinates of multiple geometries.
- Parameters:
geometries – An array of any ladybug_geometry objects for which the extents of the Y domain will be computed. Note that all objects must have a min and max property.
- Returns:
A tuple with the min and the max Y coordinates around the geometry.
- ladybug_geometry.bounding.bounding_domain_z(geometries)[source]¶
Get minimum and maximum Z coordinates of multiple geometries.
- Parameters:
geometries – An array of any 3D ladybug_geometry objects for which the extents of the Z domain will be computed. Note that all objects must have a min and max property and they cannot be 2D objects.
- Returns:
A tuple with the min and the max Z coordinates around the geometry.
- ladybug_geometry.bounding.bounding_domain_z_2d_safe(geometries)[source]¶
Get minimum and maximum Z coordinates in a manner that is safe for 2D geometries.
- Parameters:
geometries – An array of any ladybug_geometry objects for which the extents of the Z domain will be computed. Any 2D objects within this list will be assumed to have a Z-value of zero.
- Returns:
A tuple with the min and the max Z coordinates around the geometry.
- ladybug_geometry.bounding.bounding_rectangle(geometries, axis_angle=0)[source]¶
Get the min and max of an oriented bounding rectangle around 2D or 3D geometry.
- Parameters:
geometries – An array of 2D or 3D geometry objects. Note that all objects must have a min and max property.
axis_angle – The counter-clockwise rotation angle in radians in the XY plane to represent the orientation of the bounding rectangle extents. (Default: 0).
- Returns:
A tuple with two Point2D objects representing the min point and max point of the bounding rectangle respectively.
- ladybug_geometry.bounding.bounding_rectangle_extents(geometries, axis_angle=0)[source]¶
Get the width and length of an oriented bounding rectangle around 2D or 3D geometry.
- Parameters:
geometries – An array of 2D or 3D geometry objects. Note that all objects must have a min and max property.
axis_angle – The counter-clockwise rotation angle in radians in the XY plane to represent the orientation of the bounding rectangle extents. (Default: 0).
- Returns:
A tuple with 2 values corresponding to the width and length of the bounding rectangle.