Click or drag to resize

BoundingBoxIntersection Method

Computes the intersection of two bounding boxes.

Namespace:  Rhino.Geometry
Assembly:  RhinoCommon (in RhinoCommon.dll)
Since: 5.0
Syntax
public static BoundingBox Intersection(
	BoundingBox a,
	BoundingBox b
)

Parameters

a
Type: Rhino.GeometryBoundingBox
A first bounding box.
b
Type: Rhino.GeometryBoundingBox
A second bounding box.

Return Value

Type: BoundingBox
The intersection bounding box, or Unset if the intersection is empty.
Remarks
The intersection is empty when a and b do not overlap, and when either box is invalid. Invalid boxes are treated as the empty set. Boxes that merely touch do overlap, and produce a valid, degenerate (zero thickness) intersection box.

To test two boxes for overlap without constructing an intersection box, use IsDisjoint(BoundingBox).

See Also