VLFLsurface

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Analyzing function
Introduced first in SolidGeometry 1.0, Creation date: 2012-04-18, Last change: 2025-09-14

returns a vertex index list of all vertices that belong to the same surface

Description

Quite fast procedure. For a given vertex list and a give facet list and a given vertex as vector that is part of VL or as index of VL, this procedure returns the facet list of the surface and a vertex index list of the surface.

Example Illustration

 missing image of VLFLsurface(VL,FL,V)

Syntax

[SFL,VIL,n]=VLFLsurface(VL,FL,V)

Input Parameter

VL: Complete vertex list
FL: Complete facet list
V: One vertex that is part of the surface v is element of VL

Output Parameter

SFL: Surface facet list
VIL: Vertex index list
n: Number of vertices of the surface

Examples

Processing a STL object;
[VL,FL]=VLFLreadSTL ('TEST-BIN3'); VLFLplot (VL,FL);
[SFL,VIL,n]=VLFLsurface (VL,FL,5)




Copyright 2012-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 algorithm identifies all vertices and facets that belong to the same surface in a 3D mesh, given a starting vertex.

Input Parameters

Output Results

Algorithm Steps

  1. Check if V is a vector or an index:
    • If V is a vector, find its index in VL using ismember. If not found, throw an error.
    • If V is an index, use it directly as the starting vertex index list (VIL).
  2. Initialize n to 0.
  3. Iterate while the size of VIL changes:
    • Update n to the current size of VIL.
    • Identify facets in FL that contain any vertex in VIL using ismember and update SFL.
    • Extract unique vertex indices from SFL to update VIL.
    • Remove any zero entries from VIL.
  4. Ensure SFL contains unique rows and remove any zero entries.
Algorithm explaination created using ChatGPT on 2025-08-19 07:54. (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