VLFLfaceneighborangle

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Geometric Queries
Introduced first in SolidGeometry 5.1, Creation date: 2021-04-09, Last change: 2025-09-15

returns a signed (convex/concave) normal vector difference

Description

used in VLFLremovekinks
positive angle is concave
negative angle is convex

See Also: VLFLremovekinks

Example Illustration

 missing image of VLFLfaceneighborangle(VL,FLi,FLn)

Syntax

w=VLFLfaceneighborangle(VL,FLi,FLn)

Input Parameter

VL: Vertex list
FLi: single face row
FLn: up to 3 rows for neighbor facets

Output Parameter

w: angles related to the FLn

Examples


A=SGbox;
VLFLfaceneighborangle(A.VL,A.FL(1,:),A.FL([2 5 10 ],:))




Copyright 2021-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 calculates the signed angle between the normal vectors of a given face and its neighboring faces in a 3D mesh.

Input Parameters

Output

Algorithm Steps

  1. Retrieve the neighboring faces (FLn) using the function getfuncparams.
  2. Calculate the normal vector z of the given face FLi using the cross product of two edge vectors.
  3. Normalize the normal vector z to get ez.
  4. Compute the transformation matrix T3 using TofPez and its inverse Ti.
  5. Initialize an array w to store the angles for each neighboring face.
  6. Iterate over each neighboring face:
  7. If no output is requested, plot the faces using SGfigure and VLFLplotalpha.
Algorithm explaination created using ChatGPT on 2025-08-19 06:53. (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