VLFLshort2

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Auxiliary function
Introduced first in SolidGeometry 1.1, Creation date: 2014-01-10, Last change: 2025-09-14

shortens a vertex list to the vertices that are really used in the facet list

Description

Faster and easier than VLFLshort

See Also: VLFLshort2 , VLELselect , VLFLselect , PLELselect , PLFLselect , TRselect

Example Illustration

 missing image of VLFLshort2(VL,FL,thr)

Syntax

[VL,FL,n]=VLFLshort2(VL,FL,[thr])

Input Parameter

VL: Original vertex list
FL: Original facet list
thr: optional threshold, default is 1e-12

Output Parameter

VL: Shortend vertex list
FL: Shortend and sorted facet list
n:




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 function, VLFLshort2, is designed to optimize a vertex list (VL) and a facet list (FL) by removing unused vertices and sorting the facet list. It is part of the SolidGeometry library and is an auxiliary procedure for handling 3D geometric data.

Input Parameters

Output Results

Algorithm Steps

  1. Initialize the threshold thr to 1e-12, unless a different value is provided.
  2. Check if the facet list FL is empty. If so, return the original vertex list OVL, an empty facet list, and n=0.
  3. Check if the original vertex list OVL is empty. If so, return empty lists for both vertices and facets, and n=0.
  4. Round the original vertex list OVL using the threshold thr to reduce precision errors.
  5. Use the unique function to remove duplicate vertices, maintaining the original order ('stable').
  6. Update the facet list FL to reference the new, unique vertex indices.
  7. Call VLFLselect to further refine the vertex and facet lists by removing any redundant points.
  8. Ensure the facet list FL is a row vector if it contains only one column.
  9. Calculate n as the difference in the number of vertices between the original and the shortened list.
  10. If no output arguments are specified, plot the resulting geometry using VLFLplot.
Algorithm explaination created using ChatGPT on 2025-08-19 07:41. (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