TRorder

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - TR/Tetrahedrons
Introduced first in SolidGeometry 2.0, Creation date: 2014-12-13, Last change: 2025-09-14

reorders the tetrahedrons to individual solids

Description

All tetrahedrons of a solid use the same points. In case that a TR (triangulation) has a ConnectivityList that in fact is separated into several solids, this functions reorders the ConnectivityList to connected tetrahedrons and returns also a list with starting tetrahedron and end tetrahedron of the list.

See Also: ELorder , FLorder , FLseparate , SGorder , SGseparate

Example Illustration

 missing image of TRorder(TR)

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

Output Results

Algorithm Steps

  1. 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.
  2. 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.
  3. Trim SIL to the number of identified solids.
  4. 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