volofBB

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

simply returns the volume of a bounding box or a cell list of bounding boxes



See Also: sofBB , BBofCPL , BBofCPS , BBofPose , BBofPS , BBofSG , BBofSGcutT , BBofT , BBofVL

Example Illustration

 missing image of volofBB(BB)

Syntax

V=volofBB(BB)

Input Parameter

BB: Bounding Boxes

Output Parameter

V: Volume

Examples


volofBB(SGbox)




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 calculates the volume of a bounding box or a list of bounding boxes. It is part of the SolidGeometry library and was introduced in version 4.7.

Input Parameters

Output Results

Algorithm Steps

  1. Check if the input BB is a SolidGeometry object using the function isSG(BB). If true, convert it to a bounding box using BBofSG(BB).
  2. If BB is a cell array, convert it to a matrix using cell2mat(BB).
  3. Calculate the volume V using the formula:
    (BB(:,2)-BB(:,1)) * (BB(:,4)-BB(:,3)) * (BB(:,6)-BB(:,5))
    This formula computes the product of the differences between the corresponding coordinates of the bounding box, representing the length, width, and height.
Algorithm explaination created using ChatGPT on 2025-08-18 22:41. (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