PLFLselect

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

returns only the required points for a given edge list. The edge list is reindexed

Description

In some cases, for instance when surfaces are tessellated, it makes more sense to operate using only the required point. Afterwards, the point 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 point 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 PLELshort, and easier to understand!
It also works with facets instead of edges ==> PLELselect


See Also: VLELselect , VLFLselect , PLELselect , TRselect

Example Illustration

 missing image of PLFLselect(PL,FLG)

Syntax

[PL,SI,FL]=PLFLselect(PL,FLG)

Input Parameter

PL: Original point list
FLG: Original facet list

Output Parameter

PL: Shorter point list
SI: Sorting index
FL: Reindexed facet list




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 optimize a point list and facet list by selecting only the necessary points and reindexing the facet list accordingly. It is particularly useful in scenarios where surfaces are tessellated, allowing for a more efficient representation of the data.

Input Parameters

Output Results

Algorithm Steps

  1. Use the unique function on the facet list FLG to determine the unique points required for the facets. This function returns:
    • SI: The sorted unique values from FLG.
    • c: An array that contains the indices of the unique values in the original array.
  2. Update the point list PL to include only the points at the indices specified by SI.
  3. Reshape the array c to match the dimensions of FLG and assign it to FL. This step reindexes the facet list to use the new point indices.

The algorithm is efficient and straightforward, providing a faster and more understandable alternative to similar functions like PLELshort. It is versatile, working with both edges and facets, and is part of a library of auxiliary procedures for handling geometric data.

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