BBofT

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Geometric Queries
Introduced first in SolidGeometry 4.5, Creation date: 2019-03-30, Last change: 2025-09-14

returns the BB for a list of matrices



See Also: CPLofBB , BBofVL , BBofSG , BBofCPS , BBofCPL , BBofPS , BBofPose

Example Illustration

 missing image of BBofT(T)

Syntax

BB=BBofT(T)

Input Parameter

T: List of 3x3 or 4x4 HT matrices

Output Parameter

BB: [xmin xmax ymin y max zmin zmax]

Examples


PS.A=PLcircle(10,36); PS.B=PS.A*2; T0=TofPose(PS), BBofT(T0)

TofPLpath(PLcircle(10)), BBofT(ans)




Copyright 2019-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth

Algorithm (Workflow)

This function, BBofT, calculates the bounding box (BB) for a list of transformation matrices. It is part of the SolidGeometry library and was introduced in version 4.5.

Input Parameters

Output Results

Algorithm Steps

  1. Check if T is a cell array. If so, convert it to a 3D matrix using cell2matdim3.
  2. If the number of rows in T is greater than 4, convert it using TLL2TL.
  3. Determine the size of T:
    • If T has 3 columns, extract the 2D points from the third column of the first two rows and transpose them. Calculate the bounding box using BBofCPL.
    • If T has 4 columns, extract the 3D points from the fourth column of the first three rows and transpose them. Calculate the bounding box using BBofVL.
    • If T has an unknown size, raise an error.
  4. If no output is requested (nargout == 0), visualize the bounding box:
    • Create a figure with SGfigure and set the view angle.
    • Calculate the size of the bounding box with sofBB.
    • Plot the transformation with tplot.
    • Generate a solid geometry object from the bounding box with SGofBB.
    • Plot the solid geometry with SGplot and set the lighting with setplotlight.
Algorithm explaination created using ChatGPT on 2025-08-19 00:29. (Please note: No guarantee for the correctness of this explanation)

Last html export of this page out of FM database by TL: 2025-09-21