EFLgenerate

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

returns an extended facet list including normal vector and size

Description

This procedure is used in ULgenerate to calculate normal vector and size of the facets. It is strongly (!) recommended to use VLFLvertexfusion before. Small points on the output show dimension warning.

Example Illustration

 missing image of EFLgenerate(VL,FL,fi)

Syntax

EFL=EFLgenerate(VL,FL,[fi])

Input Parameter

VL: Vertex list
FL: Facet list
fi: optional facet index, if only one facet is of interest

Output Parameter

EFL: Extended facet list




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 function, EFLgenerate, is designed to compute an extended facet list from a given vertex list and facet list. It calculates the normal vector and size of each facet. The function is part of the SG-Library and is used in conjunction with ULgenerate. It is recommended to use VLFLvertexfusion before this function to ensure accuracy.

Input Parameters

Output

Algorithm Steps

  1. Initialize fi to 0. If a third argument is provided, set fi to this value.
  2. If fi is 0, process all facets:
    • Compute the cross product of vectors formed by the vertices of each facet to find the normal vector v.
    • Calculate the norm (magnitude) of each normal vector and store it in l.
    • Normalize the normal vectors by dividing each component by its corresponding norm.
    • Round the normalized vectors to four decimal places.
    • Count the number of facets with dimensions outside the range (0.01, 1000) and store in w.
    • Combine the facet list, normal vectors, and sizes into EFL.
  3. If fi is not 0, process only the specified facet:
    • Compute the cross product for the specified facet to find its normal vector v.
    • Calculate the norm of this vector and normalize it.
    • Combine the facet indices, normal vector, and size into EFL.
    • Check if the size is outside the range (0.01, 1000) and print a warning if so.
    • Round the normal vector components to four decimal places.
  4. Remove any degenerated facets (those with NaN values in the normal vector) from EFL.
Algorithm explaination created using ChatGPT on 2025-08-19 06:49. (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