BBconcat

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Geometric Queries
Introduced first in SolidGeometry 5.2, Creation date: 2022-05-25, Last change: 2025-09-15

concatenate two bounding boxes



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

Example Illustration

 missing image of BBconcat(BBA,BBB)

Syntax

BBC=BBconcat(BBA,BBB)

Input Parameter

BBA: Bounding box B or solid A
BBB: Bounding box B or solid A

Output Parameter

BBC: New boundin box [xmin xmax ymin ymax zmin zmax]

Examples


BBconcat(SGbox,SGtransP(SGbox,[0 0 30]))




Copyright 2022-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)

The function BBconcat is designed to concatenate two bounding boxes, BBA and BBB, and produce a new bounding box BBC that encompasses both input boxes.

Input Parameters

Output

Algorithm Steps

  1. Store the original inputs BBA and BBB in BBAorg and BBBorg for potential plotting later.
  2. Check if BBA is a solid object using isSG. If true, convert it to a bounding box using BBofSG.
  3. Check if BBB is a solid object using isSG. If true, convert it to a bounding box using BBofSG.
  4. Initialize BBC with the values of BBB.
  5. Calculate the minimum values for xmin, ymin, and zmin by comparing the corresponding values of BBA and BBB.
  6. Calculate the maximum values for xmax, ymax, and zmax by comparing the corresponding values of BBA and BBB.
  7. If no output is requested (i.e., nargout==0), plot the resulting bounding box and the original inputs using SGfigure and SGplotalpha functions.
Algorithm explaination created using ChatGPT on 2025-08-19 00:58. (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