# Box struct

Namespace: [Rhino.Geometry](https://developer.rhino3d.com/api/rhinocommon/namespace/rhino.geometry.md) · Assembly: [RhinoCommon](https://developer.rhino3d.com/api/rhinocommon/assembly/rhinocommon.md)

```cs
[StructLayout(LayoutKind.Sequential, Pack = 8, Size = 176)]
[Serializable]
public struct Box : IEpsilonComparable<Box>, ICloneable
```

Represents the value of a plane and three intervals in an orthogonal, oriented box that is not necessarily parallel to the world Y, X, Z axes.

## Constructors

- [Box](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.box/ctor.md): (6 overloads) Initializes a new Box that mimics a BoundingBox struct. The orientation plane of the Box is coincident with the World XY plane.

## Properties

- [Area](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.box/area.md): Gets the total surface area of this box, or [RhinoMath.UnsetValue](https://developer.rhino3d.com/api/rhinocommon/type/rhino.rhinomath/unsetvalue.md) for an invalid box.
- [BoundingBox](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.box/boundingbox.md): Gets the world axis aligned Bounding box for this oriented box.
- [Center](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.box/center.md): Gets the point that is in the center of the box.
- [Empty](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.box/empty.md): (static) Empty Box. Empty boxes are considered to be invalid.
- [IsValid](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.box/isvalid.md): Gets the validity of this Box. Boxes are invalid when the base plane or any of the dimension intervals are invalid or decreasing.
- [Plane](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.box/plane.md): Gets or sets the orientation plane for this Box.
- [Unset](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.box/unset.md): (static) Gets a Box whose base plane and axis dimensions are all Unset.
- [Volume](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.box/volume.md): Gets the total volume of this box, or [RhinoMath.UnsetValue](https://developer.rhino3d.com/api/rhinocommon/type/rhino.rhinomath/unsetvalue.md) for an invalid box.
- [X](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.box/x.md): Gets or sets the Interval that describes the dimension of the Box along the orientation plane X-Axis. Otherwise known as the Width of the Box.
- [Y](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.box/y.md): Gets or sets the Interval that describes the dimension of the Box along the orientation plane Y-Axis. Otherwise known as the Depth of the Box.
- [Z](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.box/z.md): Gets or sets the Interval that describes the dimension of the Box along the orientation plane Z-Axis. Otherwise known as the Height of the Box.

## Methods

- [Clone](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.box/clone.md): Returns a deep copy of this instance.
- [ClosestPoint](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.box/closestpoint.md): (2 overloads) Finds the closest point on or in the Box. The box should be Valid for this to work.
- [Contains](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.box/contains.md): (6 overloads) Determines whether a BoundingBox is inside this Box (strict inclusion, if strict is true). Invalid boxes contain nothing. Invalid bounding boxes are never contained.
- [EpsilonEquals](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.box/epsilonequals.md): Check that all values in Box other are within epsilon of the values in this Box.
- [FurthestPoint](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.box/furthestpoint.md): Finds the furthest point on the boundary of this Box. The Box should be Valid for this to work properly.
- [GetCorners](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.box/getcorners.md): Gets an array of the 8 corner points of this box, or an empty array if this box is not valid.
- [Inflate](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.box/inflate.md): (2 overloads) Inflates the box by a given offset in each direction. Inflating with negative amounts may result in decreasing boxes. InValid boxes cannot be inflated.
- [MakeValid](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.box/makevalid.md): (obsolete) DO NOT USE THIS FUNCTION If some of the box's values (Plane origin or axis, intervals bounds) are unset, do nothing. Else, make the Box valid by reversing the non-increasing intervals of this box. This is almost never what you want because it only makes [Empty](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.box/empty.md) boxes not empty and with non-zero length.
- [PointAt](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.box/pointat.md): Evaluates the box at the given unitized parameters. The box is parametrized with a side length of 1x1x1.
- [RepositionBasePlane](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.box/repositionbaseplane.md): Repositions the origin of the Base plane for this box without affecting the physical dimensions.
- [ICloneable.Clone](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.box/system-icloneable-clone.md)
- [ToBrep](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.box/tobrep.md): Constructs a brep representation of this box.
- [ToExtrusion](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.box/toextrusion.md): Constructs an extrusion representation of this box.
- [Transform](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.box/transform.md): Transforms this Box using a Transformation matrix. If the Transform is not a Similarity, the dimensions of the resulting box cannot be trusted.
- [Union](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.box/union.md): Constructs a union between this Box and the given point. This grows the box in directions so it contains the point.
