Syntax
[VL,FL]=VLFLofSGT(SGN,N)
Input Parameter
SGN : | | Solid with Frames |
N : | | Name of Frames |
Output Parameter
VL : | | Vertex list; shortend |
FL : | | FAcet list; shortend |
Examples
loadweb JACO_robot.mat
VLFLofSGT(JC0,'B');
Copyright 2017-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, VLFLofSGT
, is designed to extract and return the vertex list (VL) and facet list (FL) of a surface related to a specific frame within a solid geometry object. The function is part of the SolidGeometry library and is used to handle 3D geometric data.
Input Parameters
- SGN: This is the solid geometry object that contains multiple frames. It includes properties such as vertex lists (VL), facet lists (FL), and frame information (Tname, TFiL).
- N: This is the name of the frame for which the vertex and facet lists are to be extracted. It is a string that matches one of the frame names in the solid geometry object.
Output Results
- VL: The vertex list associated with the specified frame. It is a subset of the overall vertex list in the solid geometry object.
- FL: The facet list associated with the specified frame. It is a subset of the overall facet list in the solid geometry object.
Algorithm Steps
- Find the index of the frame name
N
within the SGN.Tname
array using the find
and strcmp
functions. This index is stored in variable a
.
- Use the index
a
to select the relevant facet list indices from SGN.TFiL
.
- Call the function
VLFLselect
with the overall vertex list SGN.VL
and the selected facet list SGN.FL(SGN.TFiL{a},:)
to extract the specific vertex and facet lists for the frame. The function returns the vertex list VL
and facet list FL
.
- If no output arguments are specified (
nargout==0
), the function proceeds to visualize the results:
- Initialize a new figure using
SGfigure
and set the view angle.
- Plot the solid geometry object using
SGplot
and adjust the lighting with setplotlight
.
- Plot the specific frame using
plotT
with the bounding box calculated by sofBB(VL)
.
- Plot the vertex and facet lists using
VLFLplot
.
- Set the axis limits using
axis
and BBofVL
with the bounding box.
Algorithm explaination created using ChatGPT on 2025-08-18 22:55. (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