Syntax
TR=TR3ofSG(SG)
Input Parameter
Output Parameter
Copyright 2015-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 function, TR3ofSG
, is designed to generate a triangulation from a solid geometry (SG) object. The function is a simple auxiliary procedure that is part of the SG-Library, specifically within the class "SURFACES". Below is a detailed explanation of the algorithm and its parameters.
Input Parameters
- SG: This is the input solid geometry object. It contains two main fields:
- SG.VL: This represents the vertex list. It is an array where each row corresponds to the coordinates of a vertex in 3D space.
- SG.FL: This represents the face list. It is an array where each row contains indices of vertices that form a face (typically a triangle) in the geometry.
Output Results
- TR: The output is a triangulation object. It is an nx3 array where each row represents a triangle formed by the vertices indexed in the face list.
Algorithm Explanation
The function TR3ofSG
performs the following steps:
- It takes the face list (
SG.FL
) and the vertex list (SG.VL
) from the input solid geometry object SG
.
- It calls the
triangulation
function, which is a built-in MATLAB function, using these two lists as arguments.
- The
triangulation
function processes these lists to create a triangulation object, which is then assigned to the output variable TR
.
The function is straightforward and does not contain any conditional logic or switch statements. It relies on the assumption that the input SG
object is correctly structured with valid vertex and face lists.
Algorithm explaination created using ChatGPT on 2025-08-18 21:47. (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