ELswap

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - EL/Edge Lists
Introduced first in SolidGeometry 1.0, Creation date: 2012-10-20, Last change: 2025-09-14

flips orientation of edge list

Description

Does not support contour edge lists, or changes also the order of contours

EL=flipud(EL(:,[2 1]));



See Also: , ELflip

Example Illustration

 missing image of ELswap(EL)

Syntax

EL=ELswap(EL)

Input Parameter

EL: Edge list

Output Parameter

EL: Edge list flipped

Examples

[EL ELswap(EL)]



Copyright 2012-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 is a function named ELswap that flips the orientation of an edge list. It is part of the SolidGeometry library and was introduced by Tim Lueth in 2012.

Input Parameters

Output Results

Algorithm Explanation

The function ELswap performs the following steps:

  1. It takes the input edge list EL.
  2. It creates a new matrix by swapping the columns of EL. This is done using the expression [EL(:,2) EL(:,1)], which rearranges the columns of the matrix.
  3. The function then applies flipud to the rearranged matrix. The flipud function flips the matrix in the up-down direction, but in this context, it effectively just returns the rearranged matrix since the rows are not altered.
  4. The result is a new edge list where each edge's start and end points are swapped.

Example

An example usage of the function is given as [EL ELswap(EL)], which shows the original and flipped edge lists side by side.

The function does not support contour edge lists, meaning it does not handle cases where the order of contours is significant.

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