ELuniqueofFL

by Marie Lueth & Tim Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Auxiliary function
Introduced first in SolidGeometry 1.0, Creation date: 2012-11-25, Last change: 2025-09-14

returns a unique list of all edges from a facet list

Description

All edges in a solid are used twice in the facet list in opposite direction. Sometimes there is a need to have a list of these edges in only one direction

See Also: ELunique , FLunique

Example Illustration

 missing image of ELuniqueofFL(FL)

Syntax

EL=ELuniqueofFL(FL)

Input Parameter

FL: Facet list

Output Parameter

EL: Edge list sorted by first vertex index

Examples

Draw the edges of a cuboid
[VL,FL]=VLFLbox(10,10,10);
EL=ELuniqueofFL(FL);
VLELplot (VL,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 processes a facet list (FL) to generate a unique list of edges (EL) from a 3D solid model. The function is designed to ensure that each edge is represented only once, regardless of its direction in the facet list.

Input Parameters

Output Results

Algorithm Steps

  1. Check the number of columns in the input matrix FL to determine if it represents triangular facets (3 columns).
  2. If FL has 3 columns, it indicates triangular facets:
    • Extract edges from each facet by considering pairs of vertices: (1,2), (2,3), and (3,1).
    • Concatenate these edges into a single matrix EL.
  3. If FL does not have 3 columns, assume it already represents edges, and assign it directly to EL.
  4. Sort each edge in EL to ensure consistent directionality, resulting in matrix ELS.
  5. Use the unique function to remove duplicate edges from ELS, ensuring each edge is listed only once.
  6. Return the unique, sorted edge list EL.

Example Usage

To draw the edges of a cuboid:

[VL,FL] = VLFLbox(10,10,10); 
EL = ELuniqueofFL(FL); 
VLELplot(VL,EL);
Algorithm explaination created using ChatGPT on 2025-08-18 23:25. (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