Syntax
[TR,SIL]=TRorder(TR)
Input Parameter
TR : | | tetrahedron triangulation consisting of several solids |
Output Parameter
TR : | | tetrahedron triangulation consisting of several separated solids |
SIL : | | Solid index list (start and end-tetrahedron) in ConnectivityList |
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 reorder tetrahedrons in a triangulation to form individual solids. It processes a given triangulation (TR) and outputs a reordered triangulation and a solid index list (SIL).
Input Parameters
- TR: A tetrahedron triangulation consisting of several solids. It contains a ConnectivityList that may be separated into multiple solids.
Output Results
- TR: A reordered tetrahedron triangulation where each solid is separated.
- SIL: A solid index list indicating the start and end tetrahedron indices in the ConnectivityList for each solid.
Algorithm Steps
- Initialize variables:
TL
: Copy of the original ConnectivityList from TR.
nc
: Number of tetrahedrons in the ConnectivityList.
k
: Index counter for the reordered list.
TLN
: New ConnectivityList initialized to zeros.
SIL
: Solid index list initialized to zeros.
i
: Solid counter initialized to zero.
- While there are tetrahedrons left in
TL
:
- Increment the solid counter
i
.
- Start with the first tetrahedron's first vertex
a
.
- Find all connected vertices
a
by iterating until no new vertices are found.
- Identify tetrahedrons
ai
that are fully connected using the vertices in a
.
- Update
SIL
with the start and end indices of the current solid.
- Update
TLN
with the identified tetrahedrons.
- Remove the identified tetrahedrons from
TL
.
- Trim
SIL
to the number of identified solids.
- Create a new triangulation
TR
using the reordered TLN
and the original points.
Algorithm explaination created using ChatGPT on 2025-08-19 01:35. (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