Syntax
SG=SGTsetTL(SG,[FN,TL,nn])
Input Parameter
SG : | | Solid geometry |
FN : | | Leadning Frame letter or string |
TL : | | array [4 x 4 x n] of Frames |
nn : | | maximum number to support ith leading zeros; default is size(TL,3) |
Output Parameter
SG : | | Solid Geometry with additonal Frames from the Frame list |
Examples
PLsquare(10); PL=ans, TcopyVLez(VLaddz(PL,5)); TL=ans
SGTsetTL(SGTremove(SGbox,'all'),'F',TL) % Minimal frame name length for 4 F
SGTsetTL(SGTremove(SGbox,'all'),'F',TL,30) % up to 30 frames for 30 F
Copyright 2022-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, SGTsetTL
, is designed to add a set of frames to a solid geometry object. It is part of the SolidGeometry library and is used to manipulate and manage frames within a solid geometry context.
Input Parameters
- SG: The solid geometry object to which frames will be added.
- FN: A leading frame letter or string that serves as a prefix for naming the frames. Default is 'F'.
- TL: A 3D array of size [4 x 4 x n] representing the frames to be added. Each slice TL(:,:,i) is a 4x4 transformation matrix.
- nn: The maximum number of frames, which determines the number of leading zeros in frame names. Default is the number of frames in TL (size(TL,3)).
Output
- SG: The updated solid geometry object with additional frames from the frame list.
Algorithm Steps
- Retrieve the leading frame name (FN) from the input parameters, defaulting to 'F' if not provided.
- Retrieve the frame list (TL) from the input parameters, defaulting to an identity matrix if not provided.
- Determine the number of frames (nt) from the third dimension of TL.
- Retrieve the maximum number of frames (nn) from the input parameters, defaulting to nt if not provided.
- Iterate over each frame in TL:
- Generate a frame name (fni) using the current index, the maximum number of frames (nn), and the leading frame name (FN).
- Add the frame to the solid geometry object (SG) using the function
SGTset
.
- If no output is expected (nargout==0), plot the solid geometry using
SGfigure
and SGTplotalpha
with specified parameters.
Algorithm explaination created using ChatGPT on 2025-08-19 00:30. (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