VLFLshortopti

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Auxiliary function
Introduced first in SolidGeometry 4.9, Creation date: 2020-02-27, Last change: 2025-09-14

returns the vertex list with optimal number of loss less reduced vertices

Description

Some CAD Systems creates STL files that have different vertex coordinates for the same vertices because of inaccuracies. This function uses VLcheckvertexaccuracy to find the optimal grid for loss less optimization
This function should be used after the first readin of an exported STL file. Afterwards it makes sense to check the file using SGcheckmeshlab

See Also: VLcheckvertexaccuracy , SGshortopti , SGshort , VLcheckboundaryaccuracy , SGcheckmeshlab

Example Illustration

 missing image of VLFLshortopti(VL,FL,otyp)

Syntax

[NVL,NFL]=VLFLshortopti(VL,FL,[otyp])

Input Parameter

VL: Vertex List
FL: Facet List
otyp: optimization type: 'vertex' or 'boundary'

Output Parameter

NVL: SG.VL, SG.FL with optimal number of loss less reduced vertices
NFL: New Facet List

Examples


load JACO_robot.mat
VLFLshortopti(JC2.VL,JC2.FL)
VLFLshortopti(JC2.VL,JC2.FL,'vertex')
VLFLshortopti(JC2.VL,JC2.FL,'boundary')




Copyright 2020-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, VLFLshortopti, is designed to optimize a vertex list (VL) and facet list (FL) by reducing the number of vertices without losing data accuracy. It is particularly useful for cleaning up STL files generated by CAD systems that may have inaccuracies in vertex coordinates.

Input Parameters

Output Results

Algorithm Steps

  1. The function starts by setting the default optimization type to 'boundary' if not specified by the user.
  2. It creates a structure SG containing the input vertex list VL and facet list FL.
  3. If no output arguments are specified, the function calls SGshortopti with the structure SG and any additional arguments provided.
  4. If output arguments are specified, the function calls SGshortopti and assigns the optimized vertex list and facet list to NVL and NFL, respectively.

Example Usage

Here are some examples of how to use the function:

Algorithm explaination created using ChatGPT on 2025-08-19 08:03. (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