Syntax
EL=ELuniqueofFL(FL)
Input Parameter
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
- FL: A matrix representing the facet list of a 3D model. Each row corresponds to a facet, and each column represents a vertex index of that facet.
Output Results
- EL: A matrix representing the unique list of edges, sorted by the first vertex index of each edge.
Algorithm Steps
- Check the number of columns in the input matrix
FL
to determine if it represents triangular facets (3 columns).
- 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
.
- If
FL
does not have 3 columns, assume it already represents edges, and assign it directly to EL
.
- Sort each edge in
EL
to ensure consistent directionality, resulting in matrix ELS
.
- Use the
unique
function to remove duplicate edges from ELS
, ensuring each edge is listed only once.
- 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