CVLofRL
by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - CVL/Closed Vertex Lists
Introduced first in SolidGeometry 3.9, Creation date: 2017-06-22, Last change: 2025-09-14
returns a CVL of a radial list and an ez vector
Description
This function can be used to postprocess an Radial list of TR3mountingfaces or CVLdimclassifier
RL has the format:
[xc yc zc r n deg xs ys zs]
[xc yc zc] is the center of the circle
r is the radius
n is the number of found point
deg is the angle of the circle segment
[xs yz zs] can be either a sample point or the norm vector
See Also: CVLdimclassifier
, TR3mountingfaces
, SGTui
Example Illustration
Syntax
CVL=CVLofRL(RL,[ez])%
Input Parameter
RL: | | Radial list |
ez: | | optional ez vector; or ez vector list list |
Output Parameter
Examples
SG=SGtransR(SGsample(25),rot(pi/6,0,pi/2)); TR3=triangulation(SG.FL,SG.VL);
[a,b,c,d,e]=TR3mountingfaces(TR3,23,1); show
CVL=CVLofRL(e,b); SGfigure; SGplot(SG); CVLplot(CVL);
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, CVLofRL, processes a radial list (RL) to generate a Closed Vertex List (CVL). It is designed to work with radial lists from TR3mountingfaces or CVLdimclassifier.
Input Parameters
- RL: A radial list with the format [xc yc zc r n deg xs ys zs]. Here, [xc yc zc] is the center of the circle, r is the radius, n is the number of found points, deg is the angle of the circle segment, and [xs ys zs] can be either a sample point or the norm vector.
- ez: An optional vector or list of vectors. If not provided, the function attempts to calculate it.
Output
- CVL: The resulting Closed Vertex List.
Algorithm Steps
- Check if the radial list (RL) is empty. If it is, return an empty CVL.
- Determine the
ez vector:
- If
ez is provided as an argument, use it.
- If not, attempt to calculate
ez using the function TofPCVL on the first three columns of RL. If this fails, default to [0 0 1].
- Initialize an empty CVL.
- For each entry in the radial list:
- Calculate the transformation matrix
Ti using Tof2P with the circle center and ez vector.
- Generate a circle using
PLcircle with the angle from RL.
- Transform the circle using
VLtransT and Ti.
- Append the transformed circle to the CVL, followed by a row of
nan values to separate segments.
- Remove the last row of
nan values from the CVL.
- If no output is requested, plot the CVL using
SGfigure and CVLplot.
Algorithm explaination created using ChatGPT on 2025-08-19 07:56. (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