Skip to content

Box

Public Struct

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.

Namespace: Rhino.Geometry

Assembly: RhinoCommon (in RhinoCommon.dll)

Syntax

[SerializableAttribute]
public struct Box : IEpsilonComparable<Box>, ICloneable

The Box type exposes the following members.

Constructors

Name

Description


Public Method

Initializes a new Box that mimics a BoundingBox struct.

The orientation plane of the Box is coincident with the World XY plane.


Public Method

Copy constructor.


Public Method

Initializes a world aligned box from a base plane and a bounding box.


Public Method

Initializes a box that contains a generic piece of geometry. This box will be aligned with an arbitrary plane.


Public Method

Initializes the smallest box that contains a set of points.


Public Method

Initializes a new box from a base Plane and three Intervals.


Properties

Name

Description


Public Property

Gets the total surface area of this box.


Public Property

Gets the world axis aligned Bounding box for this oriented box.


Public Property

Gets the point that is in the center of the box.


Public Property
Static Member

Empty Box. Empty boxes are considered to be invalid.


Public Property

Gets the validity of this Box. Boxes are invalid when the base plane or any of the dimension intervals are invalid or decreasing.


Public Property

Gets or sets the orientation plane for this Box.


Public Property
Static Member

Gets a Box whose base plane and axis dimensions are all Unset.


Public Property

Gets the total volume of this box.


Public Property

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.


Public Property

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.


Public Property

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

Name

Description


Public Method

Finds the closest point on or in the Box. The box should be Valid for this to work.


Public Method

Test a bounding box for Box inclusion. This is the same as calling Contains(box,false)


Public Method

Test a box for Box inclusion. This is the same as calling Contains(box,false)


Public Method

Determines whether a point is included in this box. This is the same as calling Contains(point,false)


Public Method

Test a bounding box for Box inclusion.


Public Method

Test a box for Box inclusion.


Public Method

Determines whether a point is included in this box.


Public Method

Check that all values in other are within epsilon of the values in this


Public Method

Equals

Indicates whether this instance and a specified object are equal.

(Inherited from ValueType.)


Public Method

Finds the furthest point on the Box. The Box should be Valid for this to work properly.


Public Method

Gets an array of the 8 corner points 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

Inflates the box by a given offset in each direction. Inflating with negative amounts may result in decreasing boxes. InValid boxes cannot be inflated.


Public Method

Inflates the box by a given offset in each direction. Inflating with negative amounts may result in decreasing boxes. InValid boxes cannot be inflated.


Public Method

Attempts to make the Box valid. This is not always possible.


Public Method

Evaluates the box volume at the given unitized parameters.

The box has idealized side length of 1x1x1.


Public Method

Repositions the origin of the Base plane for this box without affecting the physical dimensions.


Public Method

Constructs a brep representation of this box.


Public Method

Constructs an extrusion representation of this box.


Public Method

ToString

Returns the fully qualified type name of this instance.

(Inherited from ValueType.)


Public Method

Transforms this Box using a Transformation matrix. If the Transform does not preserve Similarity, the dimensions of the resulting box cannot be trusted.


Public Method

Constructs a union between this Box and the given point. This grows the box in directions so it contains the point.