ELofCIL

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

Converts a Contour Index List into an Edge list

Description

Contour index list [start index end index; start index end index ,...]
requires sorted ELs that are used to create the CIL

See Also: ELofn

Example Illustration

 missing image of ELofCIL(CIL,cl)

Syntax

EL=ELofCIL(CIL,[cl])

Input Parameter

CIL: Contour index list [start index end index; start end ,...]
cl: closing; default is true

Output Parameter

EL: Edge List

Examples


CPLsample(11); CPL=ans; [PL,EL]=PLELofCPL(CPL), CIL=CILofEL(EL), ELofCIL(CIL)




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, ELofCIL, converts a Contour Index List (CIL) into an Edge List (EL). It is part of the SolidGeometry library and was introduced in version 3.9.

Input Parameters

Output Results

Algorithm Steps

  1. Initialize the cl parameter to true. If a second argument is provided and is not empty, set cl to this value.
  2. Determine the number of contours, nc, by getting the number of rows in CIL.
  3. Calculate the total number of edges, n, by summing the differences between the end and start indices of each contour, plus one.
  4. Initialize the Edge List EL as a zero matrix with n rows and 2 columns.
  5. Initialize a counter k to zero.
  6. For each contour (from 1 to nc):
  7. Trim the Edge List EL to include only the filled rows, from 1 to k.
  8. Extract the first column of EL to create the list PL of starting points.
Algorithm explaination created using ChatGPT on 2025-08-19 00:22. (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