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
[RL,RMM]=RLofCVL(CVL,[res])
CVL: | 3D path in space | |
res: | default is 0.1 |
RL: | [cx cy cz Nr deg R vx vy vz] | |
RMM: | [rmin rmax] |
CVL=VLofT(TLof2T(TLofn(0))); RLofCVL(CVL)
RLofCVL (CVL)
CVL=VLofT(TLof2T(TLofn(0),'','',20)); RLofCVL(CVL)
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.
cx, cy, cz: Coordinates of the center of the contour.Nr: Number of points or segments in the contour.deg: Degree or angle related to the contour.R: Radius of the contour.vx, vy, vz: Directional vectors associated with the contour.[rmin, rmax].res using getfuncparams, which retrieves the first optional argument or defaults to 0.1 if not provided.CVLdimclassifier with CVL and res as inputs, which returns several outputs including RL.RL(:,6) are rounded using the rounddiv function with the resolution res.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].nargout==0), the function generates a plot:
SGfigure with specified dimensions.CVL is plotted in green using VLplot.RL, the center is plotted in red, and a text label showing the radius is added using textVL.