RLofCVL

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - CPL/Closed Polygon Lists
Introduced first in SolidGeometry 5.1, Creation date: 2021-03-31, Last change: 2025-09-15

Returns Radii of a contour, same as CVLdimclassifier

Description


RL=[cx cy cz Nr deg R vx vy vz]

See Also: CVLdimclassifier

Example Illustration

 missing image of RLofCVL(CVL,res)

Syntax

[RL,RMM]=RLofCVL(CVL,[res])

Input Parameter

CVL: 3D path in space
res: default is 0.1

Output Parameter

RL: [cx cy cz Nr deg R vx vy vz]
RMM: [rmin rmax]

Examples


CVL=VLofT(TLof2T(TLofn(0))); RLofCVL(CVL)
RLofCVL (CVL)
CVL=VLofT(TLof2T(TLofn(0),'','',20)); RLofCVL(CVL)




Copyright 2021-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, RLofCVL, is designed to compute the radii of a contour from a 3D path in space, referred to as CVL. It is part of the SolidGeometry library and was introduced in version 5.1. The function returns two outputs: RL and RMM.

Input Parameters

Output Results

Algorithm Steps

  1. The function begins by setting the resolution parameter res using getfuncparams, which retrieves the first optional argument or defaults to 0.1 if not provided.
  2. It then calls CVLdimclassifier with CVL and res as inputs, which returns several outputs including RL.
  3. The radius values in RL(:,6) are rounded using the rounddiv function with the resolution res.
  4. If RL is not empty, RMM is computed as the minimum and maximum of the radii in RL(:,6). If RL is empty, RMM is set to [inf, inf].
  5. If no output arguments are specified (nargout==0), the function generates a plot:
    • It creates a figure using SGfigure with specified dimensions.
    • The 3D path CVL is plotted in green using VLplot.
    • For each row in RL, the center is plotted in red, and a text label showing the radius is added using textVL.
Algorithm explaination created using ChatGPT on 2025-08-19 00:39. (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