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
- VL: Vertex List - A list of vertices that define the geometry.
- FL: Facet List - A list of facets (triangles) that define the surface of the geometry.
- otyp: Optimization type - An optional parameter that specifies the type of optimization. It can be either 'vertex' or 'boundary'. The default is 'boundary'.
Output Results
- NVL: New Vertex List - The optimized vertex list with a reduced number of vertices.
- NFL: New Facet List - The optimized facet list corresponding to the new vertex list.
Algorithm Steps
- The function starts by setting the default optimization type to 'boundary' if not specified by the user.
- It creates a structure
SG
containing the input vertex list VL
and facet list FL
.
- If no output arguments are specified, the function calls
SGshortopti
with the structure SG
and any additional arguments provided.
- 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:
VLFLshortopti(JC2.VL, JC2.FL)
- Optimizes using the default 'boundary' type.
VLFLshortopti(JC2.VL, JC2.FL, 'vertex')
- Optimizes using the 'vertex' type.
VLFLshortopti(JC2.VL, JC2.FL, 'boundary')
- Explicitly optimizes using the 'boundary' type.
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