cellofNaN

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Auxiliary function
Introduced first in SolidGeometry 3.9, Creation date: 2017-06-10, Last change: 2025-09-14

converts a CVL/CPL into a cell list



See Also: selectNaN , lengthNaN , replaceNaN , separateNaN , uniqueNaN , unsortNaN

Example Illustration

 missing image of cellofNaN(CVL)

Syntax

VLcell=cellofNaN(CVL)

Input Parameter

CVL: CVL/CPL separated by NaN

Output Parameter

VLcell: Cell list of separated PL/CVL

Examples


cellofNaN(CPLsample(26))
cellofNaN(CPLsample(27))




Copyright 2017-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, CPLcellofNaN, is designed to convert a CVL (Closed Vertex List) or CPL (Closed Polygon List) that is separated by NaN values into a cell list. The function is part of the SolidGeometry library and was introduced in version 3.9.

Input Parameters

Output Results

Algorithm Steps

  1. The function begins by determining the number of separate parts in the input CVL using the separateNaN function. This function counts the number of NaN-separated segments in the input list.
  2. A cell array, VLcell, is initialized with a size equal to the number of segments determined in the previous step.
  3. A loop iterates over each segment index from 1 to n (the number of segments).
  4. Within the loop, for each segment index i, the function separateNaN(CVL, i) is called to extract the i-th segment from the input CVL.
  5. The extracted segment is then processed by the PLofCPL function, which likely converts the segment into a specific format or structure.
  6. The processed segment is stored in the i-th position of the VLcell array.
  7. After the loop completes, the VLcell array, now containing all processed segments, is returned as the output of the function.

This function is useful for handling lists that are separated by NaN values, allowing for easy manipulation and processing of each individual segment.

Algorithm explaination created using ChatGPT on 2025-08-18 22:40. (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