Returns either a world axis-aligned or a construction plane axis-aligned bounding box of an object or of several objects.
rhinoscriptsyntax.BoundingBox ( objects, view_or_plane=None, in_world_coords=True )
rhinoscript.geometry.BoundingBox ( objects, view_or_plane=None, in_world_coords=True )
objects |
Required. String, Guid, list of Guids, or list of Strings. The identifiers of the objects. |
view_or_plane |
Optional. String, Guid, or Plane. The title or Id of the view that contains the construction plane to which the bounding box should be aligned -or- a user defined plane. If omitted, a world axis-aligned bounding box will be calculated. |
in_world_coords |
Optional. Boolean. Whether or not to return the bounding box as world coordinates or construction plane coordinates. The default is to return world coordinates (True). Note, this option does not apply to world axis-aligned bounding boxes. |
List |
A list of eight 3-D points that define the bounding box if successful. Points are returned in counter-clockwise order starting with the bottom rectangle of the box. See the image below for details. |
None |
If not successful, or on error. |
import rhinoscriptsyntax as rs
object = rs.GetObject("Select object")
if object:
box = rs.BoundingBox(object)
if box:
for i, point in enumerate(box):
rs.AddTextDot( i, point )