BoundingBox
- class rhino3dm.BoundingBox
- BoundingBox(min, max)
Constructs a new bounding box from two corner points.
- Parameters:
min (rhino3dm.Point3d) – Point containing all the minimum coordinates.
max (rhino3dm.Point3d) – Point containing all the maximum coordinates.
- BoundingBox(minX, minY, minZ, maxX, maxY, maxZ)
Constructs a bounding box from numeric extremes.
- Parameters:
minX (float) – Lower extreme for box X size.
minY (float) – Lower extreme for box Y size.
minZ (float) – Lower extreme for box Z size.
maxX (float) – Upper extreme for box X size.
maxY (float) – Upper extreme for box Y size.
maxZ (float) – Upper extreme for box Z size.
- IsValid
bool: 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.
- Min
rhino3dm.Point3d: Gets or sets the point in the minimal corner.
- Max
rhino3dm.Point3d: Gets or sets the point in the maximal corner.
- Center
rhino3dm.Point3d: Gets the point in the center of the bounding box.
- Area
float: Gets the area of this BoundingBox.
- Volume
float: Gets the volume of this BoundingBox.
- Diagonal
rhino3dm.Vector3d: Gets the diagonal vector of this BoundingBox. The diagonal connects the Min and Max points.
- ClosestPoint(point)
Finds the closest point on or in the bounding box.
- Parameters:
point (rhino3dm.Point3d) – Sample point.
- Returns:
The point on or in the box that is closest to the sample point.
- Return type:
- Inflate(amount)
Inflates the box with equal amounts in all directions. Inflating with negative amounts may result in decreasing boxes. Invalid boxes can not be inflated.
- Parameters:
amount (float) – Amount (in model units) to inflate this box in all directions.
- Return type:
void
- Inflate(xAmount, yAmount, zAmount)
Inflates the box with equal amounts in all directions. Inflating with negative amounts may result in decreasing boxes. Invalid boxes can not be inflated.
- Return type:
void
- Contains(point)
Tests a point for bounding box inclusion. This is the same as calling Contains(point, false)
- Parameters:
point (rhino3dm.Point3d) – Point to test.
- Returns:
True if the point is on the inside of or coincident with this bounding box; otherwise false.
- Return type:
bool
- IsDegenerate(tolerance)
Determines whether a bounding box is degenerate (flat) in one or more directions.
- Parameters:
tolerance (float) – Distances <= tolerance will be considered to be zero. If tolerance is negative (default), then a scale invariant tolerance is used.
- Returns:
0 = box is not degenerate 1 = box is a rectangle (degenerate in one direction). 2 = box is a line (degenerate in two directions). 3 = box is a point (degenerate in three directions) 4 = box is not valid.
- Return type:
int
- Transform(xform)
Updates this bounding box to be the smallest axis aligned bounding box that contains the transformed result of its 8 original corner points.
- Parameters:
xform (Transform) – A transform.
- Returns:
True if this operation is successful; otherwise false.
- Return type:
bool
- ToBrep()
Constructs a representation of this bounding box.
- Returns:
If this operation is successful, a Brep representation of this box; otherwise null.
- Return type:
- static Union(a, b)
Updates this BoundingBox to represent the union of itself and another box.
- Return type:
void
- Encode()
[todo] add documentation
- static Decode(jsonObject)
[todo] add documentation