Syntax
T=TofFSui(SG,[FS,rz,fe])
Input Parameter
SG : | | Solid Geometry |
FS : | | Selector such as 'R1' |
rz : | | optional ez rotation |
fe : | | optional feature angle |
Output Parameter
T : | | HT Matrix of the Frame |
Examples
SGbox; A=ans;
TofFS(A,2) % Selection by Number
TofFS(A,[0 0 1]) % Selection by ez-Vector
TofFSui(A) % Selection by User interaction
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, TofFSui, is part of the SG-Library and is used to return the frames of a touched surface. It is based on the SGTui function and allows for user interaction to identify features on a solid geometry (SG). The function can be used with different parameters to select features either by a selector, a rotation angle, or a feature angle.
Input Parameters
- SG: Solid Geometry object that represents the 3D model.
- FS: Feature Selector, which can be a string like 'R1' or a number. It is optional and defaults to an empty string.
- rz: Optional rotation angle around the z-axis. Defaults to 0.
- fe: Optional feature edge angle. Defaults to 0.01.
Output Results
- T: Homogeneous Transformation (HT) Matrix of the Frame.
- FIL: Feature Index List, which is returned if the number of output arguments is not equal to one and T is not empty.
Algorithm Steps
- Retrieve optional parameters FS, rz, and fe using the getfuncparams function. These parameters are used to customize the feature selection process.
- Call the SGTui function with the solid geometry SG and the parameters FS, rz, and fe to obtain the transformation matrix T.
- If the number of output arguments is not equal to one and T is not empty, calculate the Feature Index List (FIL) using the FSofSGT function.
- Retrieve the current view angles (aw, ew) using the view function.
- If no output is expected (nargout == 0), perform the following:
- Calculate the bounding box size (s) of the solid geometry using the sofBB function.
- Create a new figure for visualization using SGfigure.
- If FIL is not empty, plot the solid geometry with certain features highlighted in green using VLFLplotalpha.
- If FIL is empty, plot the entire solid geometry using SGTplot.
- If T is not empty, plot the transformation using tplot and highlight the selected features in red using VLFLplotalpha.
- Restore the original view angles using the view function.
- Adjust the zoom level using zoompatch.
Algorithm explaination created using ChatGPT on 2025-08-19 07:52. (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