VLFLselect

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

returns only the required vertices for a given facet list. The facet list is reindexed

Description

In some cases, for instance when surfaces are tessellated, it makes more sense to operate using only the required vertices. Afterwards, the vertex list is much shorter, the index list reindexed. By using NEL=SI(NEL) for a new edge list or NFL=SI(NFL) for a facet list, the resulting NEL or FEL are backindexed to the original vertex list.
FL=SI(FL); if size(FL,2)==1; FL=FL'; end;
EL=SI(EL); if size(EL,2)==1; EL=EL'; end;
This function is much faster and powerful than VLFLshort, and easier to understand!
It also works with edges instead of facets ==> VLELselect


See Also: VLFLshort2 , VLELselect , PLELselect , PLFLselect , TRselect

Example Illustration

 missing image of VLFLselect(VL,FLG)

Syntax

[VL,SI,FL,b]=VLFLselect(VL,FLG)

Input Parameter

VL: Original vertex list
FLG: Original facet list

Output Parameter

VL: Shorter vertex list
SI: Sorting index
FL: Reindexed facet list
b: index b




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 function, VLFLselect, is designed to optimize the vertex list for a given facet list by reducing it to only the necessary vertices and reindexing the facet list accordingly. It is part of the SolidGeometry library and was developed by Tim Lueth.

Input Parameters

Output Results

Algorithm Steps

  1. Use the unique function on the facet list FLG to determine the unique vertices used in the facets. This returns three outputs: SI, b, and c.
  2. Update the vertex list VL to include only the vertices indexed by SI.
  3. Reindex the facet list FLG using the index vector c to create the new facet list FL.

This function is more efficient and easier to understand than its predecessor, VLFLshort, and can also be applied to edges instead of facets using a similar function, VLELselect.

Algorithm explaination created using ChatGPT on 2025-08-19 07:59. (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