Syntax
SGbb=SGTBB(SG)
Input Parameter
SG : | | cell list of solid geometries |
Output Parameter
SGbb : | | cell list of bounding boxes |
Copyright 2017-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 algorithm simplifies complex surface geometries by replacing them with bounding boxes. It is designed to handle large structures efficiently by using bounding box geometries relative to the base frame. The function is part of the SG-Library and is used in kinematics and frames.
Input Parameters
- SG: A cell list of solid geometries. If SG is not a cell, it is converted into one.
Output Results
- SGbb: A cell list of bounding boxes corresponding to the input solid geometries.
Algorithm Steps
- Check if the input
SG
is a cell. If not, convert it into a cell array.
- Initialize
SGbb
as a copy of SG
.
- Iterate over each element in
SGbb
:
- Call
BBofSG
function to get the bounding box of the current solid geometry. The second parameter true
indicates that additional processing is required.
- Update the vertex list
VL
and face list FL
of the current geometry with the results from BBofSG
.
- If the field
TFiL
exists in the current geometry, remove it using rmfield
.
- If
SGbb
contains only one element, extract it from the cell array.
- If no output is expected (i.e.,
nargout==0
), plot the bounding boxes using SGTplot
with a specific view angle.
Algorithm explaination created using ChatGPT on 2025-08-19 00:57. (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