PLELselect

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - PLEL/Point List/Edge List
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 ==> PLFLselect


See Also: VLELselect , VLFLselect , PLFLselect , TRselect

Example Illustration

 missing image of PLELselect(PL,ELG)

Syntax

[PL,SI,EL]=PLELselect(PL,ELG)

Input Parameter

PL: Original point list
ELG: Original edge list

Output Parameter

PL: Shorter point list
SI: Sorting index
EL: Reindexed edge 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 function, PLFLselect, is designed to optimize the handling of point and edge lists, particularly useful in scenarios like surface tessellation. It reduces the point list to only the necessary points and reindexes the edge list accordingly.

Input Parameters

Output Results

Algorithm Steps

  1. Use the unique function on ELG to find all unique point indices that are referenced by the edges. This returns:
    • SI: The unique indices of points used in ELG.
    • c: An array that maps each original edge index to its new index in the reduced list.
  2. Reduce the point list PL to only include the points at the indices specified by SI.
  3. Reindex the edge list ELG using the mapping array c to create the new edge list EL. This is done by reshaping c to match the dimensions of ELG.

This function is efficient and straightforward, making it preferable over similar functions like PLELshort. It also supports operations on facets, not just edges, as indicated by its compatibility with PLFLselect.

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