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
- CVL: A 3D path in space, which is the primary input for the function.
- res: An optional parameter with a default value of 0.1. It represents the resolution used in calculations.
Output Results
- RL: A matrix containing the following columns:
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.
- RMM: A vector containing the minimum and maximum radii,
[rmin, rmax]
.
Algorithm Steps
- 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.
- It then calls
CVLdimclassifier
with CVL
and res
as inputs, which returns several outputs including RL
.
- The radius values in
RL(:,6)
are rounded using the rounddiv
function with the resolution res
.
- 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]
.
- 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