BoundingBox
Represents the value of two points in a bounding box defined by the two extreme corner points.
This box is therefore aligned to the world X, Y and Z axes.
Namespace: Rhino.Geometry
Assembly: RhinoCommon (in RhinoCommon.dll)
Syntax
[SerializableAttribute]public struct BoundingBox : ICloneable
The BoundingBox type exposes the following members.
Constructors
Name
Description
Public Method
BoundingBox(IEnumerable.Point3d.)
Constructs a bounding box from a collection of points.
Public Method
BoundingBox(IEnumerable.Point3d., Transform)
Constructs a bounding box from a collection of points.
Public Method
Code Example
BoundingBox(Point3d, Point3d)
Constructs a new bounding box from two corner points.
Public Method
BoundingBox(Double, Double, Double, Double, Double, Double)
Constructs a bounding box from numeric extremes.
Properties
Name
Description
Public Property
Area
Gets the area of this BoundingBox.
Public Property
Center
Gets the point in the center of the bounding box.
Public Property
Diagonal
Gets the diagonal vector of this BoundingBox. The diagonal connects the Min and Max points.
Public Property
Static Member
Empty
Gets an [Empty] bounding box. An Empty box is an invalid structure that has negative width.
Public Property
IsValid
Gets a value that indicates whether or not this bounding box is valid. Empty boxes are not valid, and neither are boxes with unset points.
Public Property
Max
Gets or sets the point in the maximal corner.
Public Property
Min
Gets or sets the point in the minimal corner.
Public Property
Static Member
Unset
Gets a bounding box that has Unset coordinates for Min and Max.
Public Property
Volume
Gets the volume of this BoundingBox.
Methods
Name
Description
Public Method
ClosestPoint(Point3d)
Finds the closest point on or in the bounding box.
Public Method
ClosestPoint(Point3d, Boolean)
Finds the closest point on or in the bounding box.
Public Method
Contains(BoundingBox)
Determines whether this bounding box contains another bounding box.
This is the same as calling Contains(box,false).
Public Method
Contains(Point3d)
Tests a point for bounding box inclusion. This is the same as calling Contains(point, false)
Public Method
Contains(BoundingBox, Boolean)
Determines whether this bounding box contains another bounding box.
The user can choose how to treat bounding boxes with coincident surfaces.
Public Method
Contains(Point3d, Boolean)
Tests a point for BoundingBox inclusion.
Public Method
Corner
Gets one of the eight corners of the box.
Public Method
Equals
Indicates whether this instance and a specified object are equal.
(Inherited from ValueType.)
Public Method
FurthestPoint
Finds the furthest point on the Box.
Public Method
Code Example
GetCorners
Gets an array filled with the 8 corner points of this box.
See remarks for the return order.
Public Method
GetEdges
Gets an array of the 12 edges of this box.
Public Method
GetHashCode
Returns the hash code for this instance.
(Inherited from ValueType.)
Public Method
GetType
Gets the Type of the current instance.
(Inherited from Object.)
Public Method
Inflate(Double)
Inflates the box with equal amounts in all directions. Inflating with negative amounts may result in decreasing boxes.
Invalid boxes can not be inflated.
Public Method
Inflate(Double, Double, Double)
Inflate the box with custom amounts in all directions. Inflating with negative amounts may result in decreasing boxes.
InValid boxes can not be inflated.
Public Method
Static Member
Intersection
Computes the intersection of two bounding boxes.
Public Method
Code Example
IsDegenerate
Determines whether a bounding box is degenerate (flat) in one or more directions.
Public Method
MakeValid
Ensures that the box is defined in an increasing fashion along X, Y and Z axes. If the Min or Max points are unset, this function will not change the box.
Public Method
PointAt
Evaluates the bounding box with normalized parameters.
The box has idealized side length of 1x1x1.
Public Method
Code Example
ToBrep
Constructs a Brep representation of this bounding box.
Public Method
ToString
Constructs the string representation of this aligned bounding box.
(Overrides ValueType.ToString..)
Public Method
Transform
Updates this bounding box to be the smallest axis aligned bounding box that contains the transformed result of its 8 original corner points.
Public Method
Union(BoundingBox)
Updates this BoundingBox to represent the union of itself and another box.
Public Method
Union(Point3d)
Updates this BoundingBox to represent the union of itself and a point.
Public Method
Static Member
Union(BoundingBox, BoundingBox)
Returns a new BoundingBox that represents the union of boxes a and b.
Public Method
Static Member
Union(BoundingBox, Point3d)
Returns a new BoundingBox that represents the union of a bounding box and a point.