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
SystemObject
  Tekla.Structures.Geometry3dAABB
    Tekla.Structures.DrawingRectangleBoundingBox

Namespace:  Tekla.Structures.Drawing
Assembly:  Tekla.Structures.Drawing (in Tekla.Structures.Drawing.dll) Version: 2023.0.3
Syntax
[SerializableAttribute]
public sealed class RectangleBoundingBox : AABB, 
	IIsEqual

The RectangleBoundingBox type exposes the following members.

Properties
  NameDescription
Public propertyAngleToAxis
The angle of the bounding box in relation to the axis (the coordinate system's X-plane).
Public propertyHeight
The height of the bounding box.
Public propertyLowerLeft
The lower left corner point of the bounding box.
Public propertyLowerRight
The lower right corner point of the bounding box.
Public propertyMaxPoint
The maximum point of the axis-aligned 3d bounding box.
(Inherited from AABB.)
Public propertyMinPoint
The minimum point of the axis-aligned 3d bounding box.
(Inherited from AABB.)
Public propertyUpperLeft
The upper left corner point of the bounding box.
Public propertyUpperRight
The upper right corner point of the bounding box.
Public propertyWidth
The width of the bounding box.
Top
Methods
  NameDescription
Public methodCollide
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.)
Public methodStatic memberCreateRectangleBoundingBox
Creates a new RectangleBoundingBox with the given values.
Public methodGetCenterPoint
Returns the geometric center point of the current axis-aligned 3d bounding box.
(Inherited from AABB.)
Public methodGetCornerPoints
Returns all corner points of the current axis-aligned 3d bounding box.
(Inherited from AABB.)
Public methodIsEqual
Compares the current object with an object of the same type.
Public methodIsInside(LineSegment)
Checks if the given line segment is inside the current axis-aligned 3d bounding box.
(Inherited from AABB.)
Public methodIsInside(Point)
Checks if the given point is inside the current axis-aligned 3d bounding box.
(Inherited from AABB.)
Public methodToString
Returns the rectangle bounding box values as a string.
(Overrides ObjectToString.)
Top
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
Was this helpful?
The feedback you give here is not visible to other users. We use your comments to improve the content.
Previous
Next