Syntax
FL=FLunique(FL)
Input Parameter
Output Parameter
FL : | | Facet list with unique rows; |
Examples
FLunique([1 2 3;4 5 6;2 3 1;4 5 6])
Copyright 2017-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 process a facet list (FL) by removing duplicate rows that are circular permutations of each other. It is part of the SolidGeometry library and was introduced in version 4.1.
Input Parameters
- FL: A matrix representing a list of facets, where each row corresponds to a facet defined by three vertices.
Output Results
- FL: A matrix with unique rows, where circular permutations of rows are considered duplicates and removed.
Algorithm Steps
- Use the
unique
function to remove exact duplicate rows from the input matrix FL
.
- Initialize a counter
k
to zero.
- Enter a
while
loop that continues as long as k
is less than the number of rows in FL
.
- Increment
k
by one.
- Check for rows in
FL
that are circular permutations of the current row FL(k,:)
:
- Use
ismember
to find rows that match FL(k,[2 3 1])
or FL(k,[3 1 2])
.
- Remove these matching rows from
FL
using logical indexing.
- Repeat the process until all rows have been checked.
Example
Given the input FL = [1 2 3; 4 5 6; 2 3 1; 4 5 6]
, the function will return FL = [1 2 3; 4 5 6]
, removing the circular permutation [2 3 1]
of the first row.
Algorithm explaination created using ChatGPT on 2025-08-18 22:18. (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