NLconformance

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Analytical Geometry
Introduced first in SolidGeometry 3.9, Creation date: 2017-06-25, Last change: 2025-09-14

changes the orientation of a list of normal vectors

Description

in case that a vector has a relative angle of more than 90 degree (pi/2) to ez, it is turned in direction (multiplied with -1
Used in TR3mountingfaces


See Also: NLcontourVL

Example Illustration

 missing image of NLconformance(NVL,ez);

Syntax

NVL=NLconformance(NVL,ez);

Input Parameter

NVL: Normal vector list
ez: reference direction vector.

Output Parameter

NVL: Correct normal vector list




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 algorithm is designed to adjust the orientation of a list of normal vectors (NVL) based on a reference direction vector (ez). The function ensures that each vector in NVL is aligned within 90 degrees of the reference vector ez.

Input Parameters

Output

Algorithm Steps

  1. Normalize the reference vector ez to ensure it has a unit length. This is done by dividing ez by its norm.
  2. If the number of vectors in NVL is greater than the number of vectors in ez, replicate ez to match the size of NVL.
  3. If no output is expected (i.e., nargout==0), store the original NVL in OVL for later visualization.
  4. Iterate over each vector in NVL:
  5. If no output is expected, visualize the vectors:
Algorithm explaination created using ChatGPT on 2025-08-19 00:11. (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