Syntax
cfi=FLofVLFLfi(VL,FL,fi)
Input Parameter
VL : | | Vertex list |
FL : | | Facet list |
fi : | | facet indices that are know to belong to the surface |
Output Parameter
cfi : | | connected facet index |
Examples
SG=SGofCPLcommand('c 4, h 10 m 4, dupg 3 3 1 20');
FLofVLFLfi(SG.VL,SG.FL,500);
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, FLofVLFLfi
, identifies facets connected to a given set of known facets in a 3D surface mesh. It is part of the SG-Library and was introduced in SolidGeometry 4.9.
Input Parameters
- VL: Vertex list, a matrix where each row represents the coordinates of a vertex.
- FL: Facet list, a matrix where each row contains indices of vertices that form a facet.
- fi: Indices of facets known to belong to the surface.
Output
- cfi: A logical array indicating which facets are connected to the known facets.
Algorithm Steps
- Create a triangulation object
TR
using the facet list FL
and vertex list VL
.
- Extract the vertices of the known facets
fi
and ensure they are in a column vector format.
- Identify unique vertices from the known facets and store them in
nv
.
- Initialize
vi
with the unique vertices nv
.
- Iteratively find all facets connected to the vertices in
vi
:
- Use
vertexAttachments
to find facets attached to vertices in vi
.
- Collect all unique vertices from these facets and update
nv
.
- Append new vertices
nv
to vi
.
- Continue until no new vertices are found (
nv
is empty).
- Determine which facets are fully connected to the vertices in
vi
by checking if all three vertices of a facet are in vi
.
- If no output argument is specified, plot the connected facets in green and the others in red using
VLFLplotalpha
.
Algorithm explaination created using ChatGPT on 2025-08-19 01:05. (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