RectangleBoundingBox Class |
The RectangleBoundingBox class represents a bounding box for an object,
i.e. the surrounding box of the object. The bounding box contains the
calculated corner points of the box. The rectangle bounding box is
inherited from the axis-aligned bounding box. The AABB also contains methods
for getting the center point of the box.
Inheritance Hierarchy
Namespace: Tekla.Structures.Drawing
Assembly: Tekla.Structures.Drawing (in Tekla.Structures.Drawing.dll) Version: 2023.0.3
Syntax
The RectangleBoundingBox type exposes the following members.
Properties
Name | Description | |
---|---|---|
AngleToAxis |
The angle of the bounding box in relation to the axis (the coordinate system's X-plane).
| |
Height |
The height of the bounding box.
| |
LowerLeft |
The lower left corner point of the bounding box.
| |
LowerRight |
The lower right corner point of the bounding box.
| |
MaxPoint |
The maximum point of the axis-aligned 3d bounding box.
(Inherited from AABB.) | |
MinPoint |
The minimum point of the axis-aligned 3d bounding box.
(Inherited from AABB.) | |
UpperLeft |
The upper left corner point of the bounding box.
| |
UpperRight |
The upper right corner point of the bounding box.
| |
Width |
The width of the bounding box.
|
Methods
Name | Description | |
---|---|---|
Collide |
Checks if the current axis-aligned 3d bounding box collides with
another given axis-aligned 3d bounding box. Both axis-aligned 3d
bounding boxes need to be in the same coordinate system or in the
same workplane, so that they are defined using the same axes.
(Inherited from AABB.) | |
CreateRectangleBoundingBox |
Creates a new RectangleBoundingBox with the given values.
| |
GetCenterPoint |
Returns the geometric center point of the current axis-aligned 3d bounding box.
(Inherited from AABB.) | |
GetCornerPoints |
Returns all corner points of the current axis-aligned 3d bounding box.
(Inherited from AABB.) | |
IsEqual |
Compares the current object with an object of the same type.
| |
IsInside(LineSegment) |
Checks if the given line segment is inside the current axis-aligned 3d bounding box.
(Inherited from AABB.) | |
IsInside(Point) |
Checks if the given point is inside the current axis-aligned 3d bounding box.
(Inherited from AABB.) | |
ToString |
Returns the rectangle bounding box values as a string.
(Overrides ObjectToString.) |
Examples
The following example is about how to draw a polygon around an object's bounding box:
using Tekla.Structures.Drawing; public class Example { static bool DrawBB(ViewBase DrawView, RectangleBoundingBox boundingBox, DrawingColors Color) { PointList points = new PointList(); points.Add(boundingBox.LowerLeft); points.Add(boundingBox.UpperLeft); points.Add(boundingBox.UpperRight); points.Add(boundingBox.LowerRight); Polygon MyPolygon = new Polygon(DrawView, points); MyPolygon.Attributes.Line.Color = Color; MyPolygon.Insert(); return true; } }
See Also