Syntax
Fi=SGTframeselect(SG,Fset)
Input Parameter
SG : | | Solid Geometry |
Fset : | | Starting Letter or set of starting letter |
Output Parameter
Examples
SGTframeselect(SGbox,'Y')
SGTframeselect(SGbox,'X')
SGTframeselect(SGbox,{'Y','X'})
Copyright 2020-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, SGTframeselect
, is designed to select frames from a solid geometry object based on specified starting letters. It is part of the SolidGeometry library and is used for kinematics and frames.
Input Parameters
- SG: A solid geometry object containing frame data.
- Fset: A character or a cell array of characters representing the starting letter(s) of the frame names to be selected.
- varargin: Additional optional parameters, primarily used to determine if the function should operate in a backward-compatible mode.
Output Results
- Fi: A logical index array indicating which frames in
SG.Tname
match the criteria specified by Fset
.
- Ni: A cell array of frame names that match the criteria.
Algorithm Steps
- Determine if the function should operate in backward-compatible mode by calling
getfuncparams
with varargin
.
- Check if
Fset
is a character:
- If
backw
is true, use ismemberincell
to find frames in SG.Tname
that match Fset
.
- If
backw
is false, use startsWith
to find frames in SG.Tname
that start with Fset
.
- If
Fset
is a cell array, use ismemberincell
to find frames in SG.Tname
that match any of the starting letters in Fset
.
- If
Fset
is neither a character nor a cell array, throw an error indicating that the input must be starting characters or a cell list of correct frames.
- If no output arguments are specified, display the selected frames and plot them:
- Print the selected frame names using
dbprintf
.
- Create a figure with
SGfigure
and plot the solid geometry with SGplotalpha
.
- For each selected frame, plot the frame using
tplot
and adjust the font size of the text objects.
Algorithm explaination created using ChatGPT on 2025-08-19 07:53. (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