OrthogonalBox

References
public struct OrthogonalBox
Represents a world-aligned rectangular volume.

Constructors

OrthogonalBox

#
Create a new spatial box from a rhinocommon bounding box.
public OrthogonalBox(
box
Box.
)

OrthogonalBox

#
Create a new box.
public OrthogonalBox(
x0,
Minimum x coordinate.
y0,
Minimum y coordinate.
z0,
Minimum z coordinate.
x1,
Maximum x coordinate.
y1,
Maximum y coordinate.
z1
Maximum z coordinate.
)

OrthogonalBox

#
Create a new box.
public OrthogonalBox(
min,
Minimum point.
max
Maximum point.
)

Properties

Area

#
Gets the area of this box.
public double Area { get; }

Centre

#
Gets the centre of this box.
public Locus Centre { get; }

Corners

#
Enumerate over all corners of this box.
public IEnumerable<Locus> Corners { get; }

Edges

#
Enumerate over all edges of this box.
public IEnumerable<LinearSegment> Edges { get; }

Faces

#
Enumerate over all faces of this box.
public IEnumerable<InfinitePlane> Faces { get; }

IsDegenerate

#
Gets whether at least one box dimension is less than the coincidence tolerance.
public bool IsDegenerate { get; }

IsInfinite

#
Gets whether this box is infinite.
public bool IsInfinite { get; }

IsSingular

#
Gets whether the largest box dimension is less than the coincidence tolerance.
public bool IsSingular { get; }

IsUnset

#
Gets whether this box is unset.
public bool IsUnset { get; }

LargestDimension

#
Gets the largest dimension (width, depth or height).
public double LargestDimension { get; }

SmallestDimension

#
Gets the smallest dimension (width, depth or height).
public double SmallestDimension { get; }

Unset

#
Create an empty region.
public static OrthogonalBox Unset { get; }

Volume

#
Gets the volume of this region.
public double Volume { get; }

X0

#
Gets the x lower limit.
public double X0 { get; }

X1

#
Gets the x upper limit.
public double X1 { get; }

XSize

#
Gets the width of this region (the size along X).
public double XSize { get; }

Y0

#
Gets the y lower limit.
public double Y0 { get; }

Y1

#
Gets the y upper limit.
public double Y1 { get; }

YSize

#
Gets the depth of this region (the size along Y).
public double YSize { get; }

Z0

#
Gets the z lower limit.
public double Z0 { get; }

Z1

#
Gets the z upper limit.
public double Z1 { get; }

ZSize

#
Gets the height of this region (the size along Z).
public double ZSize { get; }

Methods

ClosestPoint

#
Find the coordinate on or in the box closest to a point.
public Locus ClosestPoint(
point
Point.
)

Corner

#
Gets the corner associated with the given index.
public Locus Corner(
index
Index of corner.
)
Corner point.

DistanceToFurthestPoint

#
Measure the distance to the furthest point on the box.
public double DistanceToFurthestPoint(
point
Point.
)
Distance to interior.

DistanceToNearestPoint

#
Measure the distance to the interior of the box.
public double DistanceToNearestPoint(
point
Point.
)
Distance to interior.

Edge

#
Gets the edge associated with the given index.
public LinearSegment Edge(
index
Index of edge.
)
Edge line.

Face

#
Gets the face associated with the given index. 0=bottom, 1=front, 2=right, 3=back, 4=left, 5=top.
public InfinitePlane Face(
index
Index of face.
)
Face.

FurthestPoint

#
Find the coordinate on the box furthest from a point.
public Locus FurthestPoint(
point
Point.
)

Grow

#
Gros this region until it encompasses the given coordinates.
public OrthogonalBox Grow(
point
Point.
)
Modified region.

Intersection

#
Create the intersection of a collection of regions.
public OrthogonalBox Intersection(
params OrthogonalBox[]
regions
Regions to intersect.
)
Largest region which is contained inside all specified regions.

IntersectsWith

#
Finds whether two regions intersect.
public bool IntersectsWith(
other
Other region.
)
True if the intersection between two regions would not be empty.

IsCoincident

#
Test whether a coordinate triplet is exactly coincident with the boundary region. If you need a tolerance based test, you must write your own.
public bool IsCoincident(
point
Point.
)
True if the coordinate is exactly on the boundary region.

IsInside

#
Test whether a coordinate triplet is inside this region. Coincidence is assumed to mean inclusion along the min faces, but not along the max faces. This allows distinct inclusion amongst precisely stacked regions.
public bool IsInside(
point
Point.
)
True if the coordinate is inside this region.

QuadranceToFurthestPoint

#
Measure the quadrance (ie. distance squared) to the furthest point on the box.
public double QuadranceToFurthestPoint(
point
Point.
)
Quadrance to interior.

QuadranceToLine

#
Measure the minimum and maximum quadrance to a line.
public void QuadranceToLine(
line,
Line.
out double
min,
Minimum quadrance.
out double
max
Maximum quadrance.
)

QuadranceToNearestPoint

#
Measure the quadrance (ie. distance squared) to the interior of the box.
public double QuadranceToNearestPoint(
point
Point.
)
Quadrance to interior.

QuadranceToPoint

#
Measure the minimum and maximum quadrance to a point.
public void QuadranceToPoint(
point,
Point.
out double
min,
Minimum quadrance.
out double
max
Maximum quadrance.
)

QuadranceToSlice

#
Measure the minimum and maximum quadrance to a slice.
public void QuadranceToSlice(
slice,
Slice.
out double
min,
Minimum quadrance.
out double
max
Maximum quadrance.
)

QuadranceToSphere

#
Measure the minimum and maximum quadrance to a sphere.
public void QuadranceToSphere(
sphere,
Sphere.
out double
min,
Minimum quadrance.
out double
max
Maximum quadrance.
)

ToString

#
Returns the fully qualified type name of this instance.
public override string ToString()
A String containing a fully qualified type name.

Union

#
Create the union of a collection of regions.
public OrthogonalBox Union(
params OrthogonalBox[]
regions
Regions to union.
)
Region which contains all specified regions.