BBofPose

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

returns the bounding box of a Pose



See Also: BBofVL , BBofSG , BBofCPS , BBofCPL , BBofPS , BBofSGcutT , BBgrow , BBaddtolerance

Example Illustration

 missing image of BBofPose(PS)

Syntax

bb=BBofPose(PS)

Input Parameter

PS: Closed Polygon Line

Output Parameter

bb: bb [xmin xmax ymin ymax]

Examples


BBofPose(Posesample(7)); Poseplot(Posesample(7));




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, BBofPose, calculates the bounding box of a given pose. The function is part of the SG-Library and was introduced in SolidGeometry 4.5. It is designed to work with closed polygon lines (CPL).

Input Parameters

Output Results

Algorithm Steps

  1. Check if the field CPLE exists in the input structure PS. If it does not exist or is empty, initialize it with a square polygon using the function PLsquare with parameters (1, 0.5).
  2. Determine the number of poses np by checking the number of rows in PS.A.
  3. Calculate the transformation matrix T for the pose using the function TofPose.
  4. Initialize a matrix CPL to store transformed polygon lines. The size is determined by the number of points in PS.CPLE plus one, and the number of poses.
  5. Iterate over each transformation matrix T(:,:,i) and apply it to PS.CPLE using the function PLtransT. Store the result in CPL.
  6. If the field CPLB exists in PS, append it to CPL.
  7. Calculate the bounding box bb using the function BBofCPL with CPL and any additional parameters from varargin.
  8. If no output is requested, plot the transformed polygon lines and the bounding box using SGfigure, CPLplot, and CPLofBB.
Algorithm explaination created using ChatGPT on 2025-08-19 00:16. (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