BBox Type
A struct of 6 floats representing an immutable 3D bounding box. This implementation guarantees the box to always be valid. That means the Min X, Y, and Z values are always smaller or equal to the respective Max values. The X, Y, and Z axes are also called Width, Depth, and Height3D.
Z-Axis Y-Axis
^ /
| 7 / 6 MaxPt
| +---------------+
| /| / /|
| / | / / |
4 |/ | / 5 / |
+---------------+ |
| |/ | |
| +-----------|---+
| / 3 | / 2
| / | /
|/ |/
+---------------+----> X-Axis
0 MinPt 1
Record fields
| Record Field |
Description
|
Full Usage:
MaxX
Field type: float
|
The fields holding the maximum X value of this 3D bounding box.
|
Full Usage:
MaxY
Field type: float
|
The fields holding the maximum Y value of this 3D bounding box.
|
Full Usage:
MaxZ
Field type: float
|
The fields holding the maximum Z value of this 3D bounding box.
|
Full Usage:
MinX
Field type: float
|
The fields holding the minimum X value of this 3D bounding box.
|
Full Usage:
MinY
Field type: float
|
The fields holding the minimum Y value of this 3D bounding box.
|
Full Usage:
MinZ
Field type: float
|
The fields holding the minimum Z value of this 3D bounding box.
|
Instance members
| Instance member |
Description
|
Full Usage:
this.AsFSharpCode
Returns: string
|
Format bounding box into an F# code string that can be used to recreate the bounding box.
|
Full Usage:
this.AsString
Returns: string
|
Format bounding box into string with nice floating point number formatting of size and position. But without full type name as in bbox.ToString()
|
|
Returns the bottom of the box as a Counter-Clockwise array of 4 Points. Starting at MinPt. Points 0, 1, 2, and 3. Last and first point are NOT the same.
|
|
Returns the bottom of the box as a Counter-Clockwise array of 5 Points, starting at MinPt. Points 0, 1, 2, 3, and again 0. Last and first point are the same.
|
|
The center of this 3D bounding box.
|
|
Returns TRUE if this 3D bounding box is inside or exactly on the other bounding Box.
|
|
|
Full Usage:
this.CountZeroSides
Returns: int
Modifiers: inline |
Counts the amount of sides that are smaller than the zeroLength tolerance. This is 0, 1, 2 or 3.
|
|
The diagonal 3D vector of this 3D bounding box. From MinPnt to MaxPnt.
|
|
Returns the X-aligned edge from point 0 to 1.
|
|
Returns the Y-aligned edge from point 0 to 3.
|
|
Returns the Z-aligned edge from point 0 to 4.
|
|
Returns the Y-aligned edge from point 1 to 2.
|
|
Returns the Z-aligned edge from point 1 to 5.
|
|
Returns the Z-aligned edge from point 2 to 6.
|
|
Returns the X-aligned edge from point 3 to 2.
|
|
Returns the Z-aligned edge from point 3 to 7.
|
|
Returns the X-aligned edge from point 4 to 5.
|
|
Returns the Y-aligned edge from point 4 to 7.
|
|
Returns the Y-aligned edge from point 5 to 6.
|
|
Returns the X-aligned edge from point 7 to 6.
|
|
Returns the 12 edges of this 3D bounding box as an array of 12 Lines. Pairs in this order: 0-1, 1-2, 3-2, 0-3, 0-4, 1-5, 2-6, 3-7, 4-5, 5-6, 7-6, 4-7
|
Full Usage:
this.EvaluateAt
Parameters:
float
yParameter : float
zParameter : float
Returns: Pnt
Modifiers: inline |
Evaluate a X, Y and Z parameter of this 3D bounding box. 0.0, 0.0, 0.0 returns the MinPnt. 1.0, 1.0, 1.0 returns the MaxPnt.
|
Full Usage:
this.Expand
Parameters:
float
yDist : float
zDist : float
Returns: BBox
Modifiers: inline |
Returns a 3D bounding box expanded by a distance for X, Y, and Z-axis each. Does check for underflow if distance is negative and raises EuclidException.
|
|
Returns a 3D bounding box expanded by distance. Does check for underflow if distance is negative and raises EuclidException.
|
|
Returns a 3D bounding box expanded by a distance. If expansion is negative it shrinks the Box without causing underflow. When the negative expansion is bigger than the size on any axis, both Min and Max values on that axis will be set to the midpoint of their original values (the box collapses to a plane or line on that axis).
|
Full Usage:
this.ExpandSafe
Parameters:
float
yDist : float
zDist : float
Returns: BBox
Modifiers: inline |
Returns a 3D bounding box expanded by a distance for X, Y, and Z-axis each. If expansion is negative it shrinks the Box without causing underflow. When the negative expansion is bigger than the size on any axis, both Min and Max values on that axis will be set to the midpoint of their original values (the box collapses to a plane or line on that axis).
|
Full Usage:
this.ExpandXaxis
Parameters:
float
endDist : float
Returns: BBox
Modifiers: inline |
Returns a 3D bounding box expanded only in X direction by different distances for start(minX) and end (maxX). Does check for underflow if distance is negative and raises EuclidException.
|
Full Usage:
this.ExpandYaxis
Parameters:
float
endDist : float
Returns: BBox
Modifiers: inline |
Returns a 3D bounding box expanded only in Y direction by different distances for start(minY) and end (maxY). Does check for underflow if distance is negative and raises EuclidException.
|
Full Usage:
this.ExpandZaxis
Parameters:
float
endDist : float
Returns: BBox
Modifiers: inline |
Returns a 3D bounding box expanded only in Z direction by different distances for start(minZ) and end (maxZ). Does check for underflow if distance is negative and raises EuclidException.
|
Full Usage:
this.HasVolume
Returns: bool
Modifiers: inline |
Tests if none of the X, Y and Z axis is smaller than the zeroLength tolerance. Same as .IsValid
|
|
Returns the intersection of two 3D bounding boxes. The returned BBox is the volume that is inside both input 3D bounding boxes. Returns ValueNone if the two 3D bounding boxes do not overlap. Just touching 3D bounding boxes will return ValueSome with a zero volume collapsed BBox.
|
Full Usage:
this.IsFlat
Returns: bool
Modifiers: inline |
Tests if one of the X, Y and Z axis is smaller than the zeroLength tolerance.
|
Full Usage:
this.IsLine
Returns: bool
Modifiers: inline |
Tests if two of the X, Y and Z axis is smaller than the zeroLength tolerance.
|
Full Usage:
this.IsPoint
Returns: bool
Modifiers: inline |
Tests if all sides are smaller than the zeroLength tolerance. This is the same as IsZero.
|
Full Usage:
this.IsTouching
Parameters:
BBox
-
Other 3D bounding box to test against.
?tol : float
-
Optional. A tolerance for touching test. Default is 1e-6.
Returns: bool
TRUE if the two 3D bounding boxes are touching each other within the given tolerance.
FALSE if the two 3D bounding boxes are overlapping or intersecting
|
Test if 3D bounding boxes are only touching each other from the Outside within a given tolerance.
|
Full Usage:
this.IsValid
Returns: bool
Modifiers: inline |
Tests if no sides of the X, Y and Z axis is smaller than the zeroLength tolerance. Same as .HasVolume
|
Full Usage:
this.IsZero
Returns: bool
Modifiers: inline |
Tests if all sides are smaller than the zeroLength tolerance. This is the same as IsPoint.
|
Full Usage:
this.LongestEdge
Returns: float
Modifiers: inline |
Returns the longest edge of the Box.
|
|
The point where X, Y, and Z are the maximum values.
|
|
The point where X, Y, and Z are the minimum values.
|
Full Usage:
this.OverlapsWith
Parameters:
BBox
-
The bounding box to test for overlap with.
?tol : float
-
The tolerance distance used to shrink both boxes before testing overlap. Default is 1e-6.
The tolerance effectively shrinks both boxes by the given amount before testing overlap.
Returns: bool
Returns TRUE if:
- The boxes overlap with a gap smaller than the tolerance distance
- One box completely surrounds the other
Returns FALSE if:
- The boxes are separated by more than the tolerance distance
- The boxes are just touching (within tolerance)
Modifiers: inline |
Determines whether this bounding box overlaps with another bounding box within a specified tolerance.
|
|
Returns TRUE if the two 3D bounding boxes do overlap or touch. Also returns TRUE if one box is completely inside the other. Also returns TRUE if one box is completely surrounding the other.
|
|
Returns the bottom corners of this 3D bounding box in Counter-Clockwise order, starting at MinPt. Then the top corners starting above MinPt. Returns an array of 8 Points.
|
Returns point 0 of this 3D bounding box, same as member box.MinPnt.
|
|
Returns point 1 of this 3D bounding box.
|
|
Returns point 2 of this 3D bounding box.
|
|
Returns point 3 of this 3D bounding box.
|
|
Returns point 4 of this 3D bounding box.
|
|
Returns point 5 of this 3D bounding box.
|
|
Returns point 6 of this 3D bounding box.
|
|
Returns point 7 of this 3D bounding box.
|
|
Full Usage:
this.ShortestEdge
Returns: float
Modifiers: inline |
Returns the shortest edge of the Box.
|
Full Usage:
this.SizeX
Returns: float
Modifiers: inline |
The size in X direction, often also called Width.
|
Full Usage:
this.SizeY
Returns: float
Modifiers: inline |
The size in Y direction.
|
Full Usage:
this.SizeZ
Returns: float
Modifiers: inline |
The size in Z direction, also called Height.
|
|
Returns the top of the box as a Counter-Clockwise array of 4 Points. Starting at point 4 then 5, 6, and 7. Last and first point are NOT the same.
|
|
Returns the top of the box as a Counter-Clockwise array of 5 Points. Points 4, 5, 6, 7, and again 4. Last and first point are the same.
|
|
|
|
|
Full Usage:
this.Volume
Returns: float
Modifiers: inline |
Returns the volume of this 3D bounding box.
|
|
Returns the 2D part of this 3D bounding box as a bounding rectangle (BRect).
|
Static members
| Static member |
Description
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Full Usage:
BBox.createUnchecked (minX, minY, minZ, maxX, maxY, maxZ)
Parameters:
float
minY : float
minZ : float
maxX : float
maxY : float
maxZ : float
Returns: BBox
Modifiers: inline |
Creates a 3D bounding box from six coordinate values. Does not verify that min values are less than or equal to max values.
|
|
|
|
Returns TRUE if the two a 3D bounding boxes do overlap more than a given tolerance distance. Returns false if the two a 3D bounding boxes are just touching. Also returns TRUE if one box is completely inside the other. Also returns TRUE if one box is completely surrounding the other.
|
|
|
|
|
|
|
|
Returns the 3D bounding box expanded by a relative factor on all six sides, separately for X, Y, Z. Values between 0.0 and 1.0 shrink the box. Values larger than 1.0 expand the box. Does check for underflow if any factor is negative and raises EuclidException.
|
|
Returns a 3D bounding box expanded by distance. If expansion is negative it shrinks the Box without causing underflow. When the negative expansion is bigger than the size on any axis, both Min and Max values on that axis will be set to the midpoint of their original values (the box collapses to a plane or line on that axis).
|
|
|
|
|
|
|
|
Returns the intersection of two 3D bounding boxes. The returned BBox is the volume that is inside both input 3D bounding boxes. Returns ValueNone if the two 3D bounding boxes do not overlap. Just touching 3D bounding boxes will return ValueSome with a zero volume collapsed BBox.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Euclid