TRunique

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

returns a tetrahedron triangulation with unique Points

Description

Reduces the Points to unique Points and reindexes the Connectivity List

Example Illustration

 missing image of TRunique(TR)

Syntax

TR=TRunique(TR)

Input Parameter

TR: Tetrahedron triangulation

Output Parameter

TR: Tetrahedron triangulation with unique Points




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 process a tetrahedron triangulation by ensuring that all points within the triangulation are unique. It then reindexes the connectivity list based on these unique points.

Input Parameters

Output Results

Algorithm Steps

  1. The function begins by calling the unique function on TR.Points with the 'rows' option. This operation identifies unique rows in the matrix of points, effectively removing duplicate points.
  2. The unique function returns three outputs:
    • a: A matrix containing the unique points.
    • ~: An unused output that would normally contain the indices of the first occurrence of each unique point.
    • c: A vector that maps each original point to its corresponding unique point in a.
  3. The function then constructs a new triangulation object using the updated connectivity list and the unique points. The connectivity list is reindexed using c(TR.ConnectivityList), which maps the original connectivity list to the indices of the unique points.
  4. The function returns the updated triangulation TR with unique points and a reindexed connectivity list.
Algorithm explaination created using ChatGPT on 2025-08-18 21:55. (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