Table of Contents

Class BoundingBox

Namespace
OpenMEPSandbox.Geometry.Abstract
Assembly
OpenMEPSandbox.dll
public class BoundingBox
Inheritance
BoundingBox
Inherited Members

Methods

Area(BoundingBox)

Get area of bounding box

[NodeCategory("Query")]
public static double Area(BoundingBox boundingBox)

Parameters

boundingBox BoundingBox

the boundingBox

Returns

double

the area value of boundingBox

Examples

BoundingBox.Area.dyn

ByBoundingBoxs(List<BoundingBox>)

Create a bounding box from a list of bounding boxes

[NodeCategory("Create")]
public static BoundingBox ByBoundingBoxs(List<BoundingBox> boundingBoxes)

Parameters

boundingBoxes List<BoundingBox>

the list of boundingBox

Returns

BoundingBox

new boundingBox crete by collection boundingBox

Examples

BoundingBox.ByBoundingBoxs.dyn

ByPoints(List<Point>)

Create a bounding box from a list of points

[NodeCategory("Create")]
public static BoundingBox ByPoints(List<Point> points)

Parameters

points List<Point>

the list point to create new bounding box

Returns

BoundingBox

new boundingBox from list point

Examples

BoundingBox.ByPoints.dyn

Center(BoundingBox)

Get center point of bounding box

[NodeCategory("Query")]
public static Point Center(BoundingBox boundingBox)

Parameters

boundingBox BoundingBox

the boundingBox need get point center

Returns

Point

center point of boundingBox

Examples

BoundingBox.Center.dyn

Corners(BoundingBox)

Get 8 points corners of bounding box

[NodeCategory("Query")]
public static List<Point> Corners(BoundingBox boundingBox)

Parameters

boundingBox BoundingBox

Returns

List<Point>

list point corner of the boundingBox

Examples

BoundingBox.Corners.dyn

Divide(BoundingBox, double)

Divide the bounding box by value

public static List<BoundingBox> Divide(BoundingBox boundingBox, double value)

Parameters

boundingBox BoundingBox

the boundingBox

value double

how many part boundingBox will divide for each edge

Returns

List<BoundingBox>

the collection boundingBoxs divide

Examples

BoundingBox.Divide.dyn

DivideByWidthAndLength(BoundingBox, double, double)

Divides a bounding box into smaller bounding boxes by width and length.

public static List<BoundingBox> DivideByWidthAndLength(BoundingBox boundingBox, double width, double length)

Parameters

boundingBox BoundingBox

The original bounding box to be divided.

width double

The number of divisions along the width.

length double

The number of divisions along the length.

Returns

List<BoundingBox>

A list of smaller bounding boxes resulting from the division.

Examples

BoundingBox.DivideByWidthAndLength.dyn

DivideByWidthLengthHeight(BoundingBox, double, double, double)

Divides a given bounding box into smaller bounding boxes based on specified width, length, and height divisions.

public static List<BoundingBox> DivideByWidthLengthHeight(BoundingBox boundingBox, double width, double length, double height)

Parameters

boundingBox BoundingBox

The original bounding box to be divided.

width double

The number of divisions along the width.

length double

The number of divisions along the length.

height double

The number of divisions along the height.

Returns

List<BoundingBox>

A list of smaller bounding boxes resulting from the division.

Examples

BoundingBox.DivideByWidthLengthHeight.dyn

IsSimilar(BoundingBox, BoundingBox, double)

Determines whether two bounding boxes are similar within a specified tolerance.

[NodeCategory("Query")]
public static bool IsSimilar(BoundingBox boundingBox1, BoundingBox boundingBox2, double tolerance = 0.001)

Parameters

boundingBox1 BoundingBox

The first bounding box to compare.

boundingBox2 BoundingBox

The second bounding box to compare.

tolerance double

The acceptable tolerance for dimension differences (default is 0.001).

Returns

bool

True if the bounding boxes are similar within the tolerance; otherwise, false.

Examples

BoundingBox.IsSimilar.dyn

Scale(BoundingBox, double)

Scale the bounding box by value

public static BoundingBox Scale(BoundingBox boundingBox, double value)

Parameters

boundingBox BoundingBox

the boundingBox need scale

value double

scale value

Returns

BoundingBox

boundingBox

Examples

BoundingBox.Scale.dyn

Visualize(BoundingBox)

Visualize the bounding box by corner points

public static List<Line> Visualize(BoundingBox boundingBox)

Parameters

boundingBox BoundingBox

the boundingBox

Returns

List<Line>

the list line corner of the boundingBox

Examples

BoundingBox.Visualize.dyn

Volume(BoundingBox)

Returns the volume of the bounding box.

[NodeCategory("Query")]
public static double Volume(BoundingBox boundingBox)

Parameters

boundingBox BoundingBox

the boundingBox

Returns

double

volume of the boundingBox

Examples

BoundingBox.Volume.dyn