Syntax
SGall=SGnamedset([Solids])
Input Parameter
Solids : | | Solid Geometries as varargin separated by comma |
Output Parameter
SGall : | | SG cell list including stampnames and stampdates
|
Examples
A=SGbox, B=SGbox
SGall=SGnamedset(A,B,A,B)
Copyright 2024-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, SGnamedset
, is designed to process solid geometries and ensure that each solid is associated with a variable name. It is primarily used before the function SGwriteMultipleSTL
to ensure that the necessary information is available.
Input Parameters
- Solids: A variable number of solid geometries passed as arguments, separated by commas.
Output Results
- SGall: A cell list containing the solid geometries, each with an associated stamp name and stamp date.
Algorithm Steps
- Initialize an empty cell array
SGall
with a size equal to the number of input arguments (nargin
).
- Get the current date and time as a string using
datestr(now)
and store it in stampdate
.
- Initialize a counter
k
to zero, which will track the number of valid solids processed.
- Loop through each input argument:
- Retrieve the variable name of the current argument using
inputname(i)
and store it in stampname
.
- If
stampname
is empty, throw an error indicating that only variables are allowed as arguments.
- Check if the current solid has a field
'FL'
and if it is not empty:
- Increment the counter
k
.
- Store the solid in
SGall
at index k
.
- Assign a stamp name to the solid in the format
[stampname ' (' func ')']
.
- Assign the current date and time to the solid's
stampdate
field.
- If the solid does not meet the criteria, issue a warning that the solid is empty and not included in the set.
- Trim
SGall
to include only the valid solids processed (up to index k
).
Algorithm explaination created using ChatGPT on 2025-08-19 08:22. (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