FLshift

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

returns a shifted and ordered facet list

Description

The facet list is rotated line by line so that the smallest vertex index is in the left column.

In contrast to FLorder, the rows are not sorted afterwards.

Example Illustration

 missing image of FLshift(FL)

Syntax

FL=FLshift(FL)

Input Parameter

FL: Original facet list

Output Parameter

FL: Final facet list

Examples


FL=[10 20 30; 30 10 20; 20 30 10]
FL=[FL*1.5;FL]
FLshift(FL)




Copyright 2014-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 designed to process a facet list (FL) by rotating each row so that the smallest vertex index is in the first column. The function does not sort the rows after this operation.

Input Parameters

Output Results

Algorithm Steps

  1. Check each row of the facet list to determine if the first vertex index is greater than the second vertex index.
  2. If the first vertex index is greater than the second, rotate the row so that the second vertex index becomes the first, the third becomes the second, and the first becomes the third.
  3. Repeat the check for the first vertex index against the third vertex index. If the first is greater, rotate the row so that the third vertex index becomes the first, the first becomes the second, and the second becomes the third.
  4. Perform the first check again to ensure the smallest index is in the first column after the previous rotations.

Example

Given a facet list:

FL = [10 20 30; 30 10 20; 20 30 10]

After applying the function:

FL = [10 20 30; 10 20 30; 10 20 30]

Each row is rotated to ensure the smallest vertex index is in the first column.

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