CVLofVLEL2

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - CVL/Closed Vertex Lists
Introduced first in SolidGeometry 5.0, Creation date: 2020-12-25, Last change: 2025-09-15

processes a fortmat of



See Also: CVLofVLEL

Example Illustration

 missing image of CVLofVLEL2(VLA,ELA)

Syntax

CVL=CVLofVLEL2(VLA,ELA)

Input Parameter

VLA: VLA or [p2 p2; p2 p3; ...]
ELA: ELA if VLA is used

Output Parameter

CVL: CVL

Examples


CVLofVLEL2([0 0 1 0 0 2; 0 0 2 0 0 3; 0 0 3 0 0 4; 0 0 5 0 0 6])




Copyright 2020-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, CVLofVLEL2, processes a format of closed polygon lists from vertex and edge lists. It is part of the SolidGeometry library.

Input Parameters

Output

Algorithm Steps

  1. Check if VLA has less than one row. If true, return an empty CVL.
  2. If only one input argument is provided and VLA has 6 columns, treat VLA as a combined vertex and edge list array (VLELA).
  3. Split VLELA into separate VLA and ELA matrices.
  4. Use the unique function to remove duplicate rows in VLA, rounding to two decimal places, and update ELA accordingly.
  5. Identify edges that form closed loops using the circshift function.
  6. Initialize an array, CVL, to store the closed polygon list.
  7. Iterate over the identified closed loops, appending vertices to CVL and separating each loop with a row of NaN values.
  8. Trim the CVL array to remove unused rows.
  9. If no output is requested, plot the CVL using the SGfigure and CVLplot functions.
Algorithm explaination created using ChatGPT on 2025-08-19 01:03. (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