Syntax
[NVL,NFL,rmvd]=VLFLremsmallfacets(VL,FL,[Amin])
Input Parameter
VL : | | Vertex List |
FL : | | Facet List |
Amin : | | minimal Size |
Output Parameter
NVL : | | New vertex list |
NFL : | | New facet list |
rmvd : | | number of removed facets |
Examples
VLFLremsmallfacets(SGsample(25),'',pi);
Copyright 2017-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, VLFLremsmallfacets
, is designed to remove small facets from an open surface. It is part of the SG-Library and was introduced in SolidGeometry 4.1.
Input Parameters
- VL: Vertex List - A list of vertices that define the geometry of the surface.
- FL: Facet List - A list of facets (triangles) that make up the surface.
- Amin: Minimal Size (optional) - The minimum area threshold for facets to be retained. If not provided, it defaults to 0.
Output Results
- NVL: New Vertex List - The updated list of vertices after removing small facets.
- NFL: New Facet List - The updated list of facets after removing those smaller than
Amin
.
- rmvd: Number of Removed Facets - The count of facets removed due to being smaller than the specified area.
Algorithm Steps
- Initialize
Amin
to 0. If a third argument is provided and is not empty, set Amin
to this value.
- Check if
VL
is a SolidGeometry object using isSG
. If true, convert it to vertex and facet lists using VLFLofSG
.
- Determine the initial number of facets,
n0
, using the size of FL
.
- Calculate the area of each facet using
VLFLarea
and round the results to 12 decimal places.
- Set
NVL
to VL
.
- Create
NFL
by selecting facets from FL
with an area greater than Amin
.
- Calculate the number of removed facets,
rmvd
, as the difference between n0
and the size of NFL
.
- If no output arguments are specified, plot the results:
- Use
SGfigure
to create a new figure and set the view angle.
- Plot the new facets with
VLFLplot
and adjust lighting with setplotlight
.
- Plot the removed facets and free boundary edges using
VLFLplot
and VLFLplotfreeboundary
.
- Print the number of removed facets and their size.
- Check boundary edges with
VLFLcheckboundaryedges
.
Algorithm explaination created using ChatGPT on 2025-08-19 00:21. (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