Tekla Open API

Detailed and full API reference helps you master Tekla Open API

This is the most recent version of Tekla Open API.
For older versions, please visit Tekla Warehouse.

AABB Class

The AABB class represents an axis-aligned 3d bounding box.
Inheritance Hierarchy

Namespace:  Tekla.Structures.Geometry3d
Assembly:  Tekla.Structures (in Tekla.Structures.dll) Version: 2018.1.0.0 (2018.1.0.0)
Syntax
[SerializableAttribute]
public class AABB : IBoundingVolume

The AABB type exposes the following members.

Constructors
  Name Description
Public method AABB
Instantiates a new axis-aligned 3d bounding box with the maximum point initialized to the smallest possible value and the minimum point to the largest possible value.
Public method AABB(AABB)
Instantiates a new axis-aligned 3d bounding box which is a copy of the given axis-aligned 3d bounding box.
Public method AABB(Point, Point)
Instantiates a new axis-aligned 3d bounding box with the given minimum and maximum points.
Top
Properties
  Name Description
Public property MaxPoint
The maximum point of the axis-aligned 3d bounding box.
Public property MinPoint
The minimum point of the axis-aligned 3d bounding box.
Top
Methods
  Name Description
Public method 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.
Public method GetCenterPoint
Returns the geometric center point of the current axis-aligned 3d bounding box.
Public method IsInside(LineSegment)
Checks if the given line segment is inside the current axis-aligned 3d bounding box.
Public method IsInside(Point)
Checks if the given point is inside the current axis-aligned 3d bounding box.
Top
Operators
  Name Description
Public operatorStatic member Addition(AABB, AABB)
Combines (adds) the given two axis-aligned 3d bounding boxes.
Public operatorStatic member Addition(AABB, Point)
Adds the given point to the given axis-aligned 3d bounding box.
Public operatorStatic member Addition(Point, AABB)
Adds the given point to the given axis-aligned 3d bounding box.
Top
Examples
using Tekla.Structures.Geometry3d;
using Tekla.Structures.Model;
using System;

public class Example
{
       public void Example1()
       {
           Beam MyBeam1 = new Beam();
           Beam MyBeam2 = new Beam();

           Solid MySolid1 = MyBeam1.GetSolid();
           Solid MySolid2 = MyBeam2.GetSolid();
           AABB MyAxisAlignedBoundingBox1 = new AABB(MySolid1.MinimumPoint, MySolid1.MaximumPoint);
           AABB MyAxisAlignedBoundingBox2 = new AABB(MySolid2.MinimumPoint, MySolid2.MaximumPoint);

           if (MyAxisAlignedBoundingBox1.Collide(MyAxisAlignedBoundingBox2))
           {
               Console.WriteLine("Collision between beams!");
           }
       }
}
See Also