OrthogonalBox

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

Constructors

OrthogonalBox

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

OrthogonalBox

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

OrthogonalBox

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

Properties

Area

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

Centre

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

Corners

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

Edges

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

Faces

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

IsDegenerate

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

IsInfinite

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

IsSingular

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

IsUnset

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

LargestDimension

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

SmallestDimension

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

Unset

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

Volume

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

X0

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

X1

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

XSize

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

Y0

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

Y1

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

YSize

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

Z0

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

Z1

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

ZSize

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

Methods

ClosestPoint

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

Corner

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

DistanceToFurthestPoint

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

DistanceToNearestPoint

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

Edge

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

Face

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

FurthestPoint

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

Grow

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

Intersection

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

IntersectsWith

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

IsCoincident

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

IsInside

#
public bool IsInside(Locus point)
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.
point (Locus)Point.
True if the coordinate is inside this region.

QuadranceToFurthestPoint

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

QuadranceToLine

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

QuadranceToNearestPoint

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

QuadranceToPoint

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

QuadranceToSlice

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

QuadranceToSphere

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

ToString

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

Union

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