SGsize

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Auxiliary function
Introduced first in SolidGeometry 1.0, Creation date: 2013-01-20, Last change: 2025-09-14

returns the minimal and maximal value in x, y, z of a SG

Description

Uses sizeVL, VLFLconot

format similar to axis
bettername axisofSG

See Also: , BBofVL , CPLofBB , SGofBB , VLFLofBB , BBofSG , sizeVL

Example Illustration

 missing image of SGsize(SG)

Syntax

m=SGsize([SG])

Input Parameter

SG: Solid Geometry, or Cell list of SGs, or separated by comma

Output Parameter

m: 1 x 6 array (xmin xmax ymin ymax zmin zmax]

Examples


SGsize(SGbox)
SGsize(SGbox); SGfigure(SGbox); axis(SGsize(SGbox))




Copyright 2013-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, SGsize, calculates the minimal and maximal values in the x, y, and z dimensions of a given Solid Geometry (SG) or a list of SGs. It returns these values in a 1x6 array format.

Input Parameters

Output Results

Algorithm Steps

  1. The function checks the number of input arguments using nargin. If there is only one argument, it assigns it to SG. Otherwise, it assigns all input arguments to SG.
  2. It checks if SG is a cell array using iscell. If true, it initializes an empty array VL and iterates over each element in SG to extract the vertex list VL from each SG and concatenates them.
  3. If SG is not a cell array, it directly assigns the vertex list VL from SG.
  4. The function then calls sizeVL with the concatenated vertex list VL to compute the minimal and maximal values in the x, y, and z dimensions.
  5. The result is stored in the variable m and returned as the output.
Algorithm explaination created using ChatGPT on 2025-08-18 23: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