CVLpathwarning

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Problems Find/Check/Fix
Introduced first in SolidGeometry 5.1, Creation date: 2021-03-29, Last change: 2025-08-19

warns if a path contains angles larger than pi/2



See Also: isCVP , VLof2TR

Example Illustration

 missing image of CVLpathwarning(CVL,warna,ignor)

Syntax

wa=CVLpathwarning(CVL,[warna,ignor])

Input Parameter

CVL:
warna: warning angle; default is pi/2*0.99
ignor: if true (default), CvL is considered as open, if false start to end is also considered

Output Parameter

wa: true if angles exist larger thatn pi/2

Examples


TLofn([1 6 6]);TL=ans; VLof2TR(TL(:,:,1),TL(:,:,2),10); VL=ans; CVLpathwarning(VL)
TLofn([1 6 6]);TL=ans; VLof2TR(TL(:,:,1),TL(:,:,2),10); VL=ans; CVLpathwarning(VLradialEdges(VL,5))




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 algorithm checks if a given path, represented as a closed polygon list (CVL), contains angles larger than a specified warning angle. It is part of the SolidGeometry library.

Input Parameters

Output

Algorithm Steps

  1. Retrieve the warning angle (warna) and the ignore flag (ignor) from the input parameters or use default values.
  2. Check the dimensions of CVL. If it has more than one layer or more than three columns, convert it using VLofT.
  3. Calculate the angles of the path using VLangle.
  4. If ignor is true, set the first and last angles in the list to NaN to ignore them.
  5. Find indices of angles greater than warna.
  6. If no output is requested, plot the path using SGfigure and VLplot, highlighting angles that exceed the warning threshold.
Algorithm explaination created using ChatGPT on 2025-08-19 00:51. (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