Syntax
SG=SGofSG(SGO)
Input Parameter
SGO : | | cell list of structs |
Output Parameter
Examples
SG=SGbox([30,20,10])
SGofVLFL({SG,SG,SG}) % Adds even dace colors
SGcheckmeshlab(ans)
SGsample(20)
SGofSG(SGsample(20))
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, SGofSG, is designed to convert a cell list of solid structures into a single solid structure. It is part of the SG-Library and was implemented to provide a more intuitive function name for users familiar with the library.
Input Parameters
- SGO: A cell list of structs representing solid geometries.
Output Results
- SG: A single solid struct that represents the combined geometry of the input list.
Algorithm Steps
- Check if the input
SGO
is a cell array. If true, concatenate the cell elements into a single structure using SGconcat
.
- If
SGO
is empty, return an empty structure.
- Convert the concatenated structure into a solid struct using
SGofVLFL
, which also adds even colors to the faces.
- Copy additional properties from the original
SGO
to the new solid struct using SGTcopy
.
- If the field
stampname
exists in SGO
, copy it to the resulting solid struct SG
.
- If the resulting solid struct
SG
does not have the field VL
, set SG
to an empty array.
- If no output argument is specified, plot the solid using
SGfigure
and SGplot
, and set the view angle to (-30, 30).
Algorithm explaination created using ChatGPT on 2025-08-19 00:46. (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