SGgrowVLFLfi

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Surfaces
Introduced first in SolidGeometry 4.9, Creation date: 2020-08-10, Last change: 2025-09-14

moves facets of an indexed surface along the normal vectors

Description

Just a first approach - There is a lot to improve

See Also: SGgrow

Example Illustration

 missing image of SGgrowVLFLfi(VL,FL,fi,dt)

Syntax

[VL,FL]=SGgrowVLFLfi(VL,FL,fi,dt)

Input Parameter

VL: Vertex list
FL: Facet list
fi: Facet Indices
dt: distance to grow

Output Parameter

VL: New Vertex list
FL: Same Facet list

Examples


SGfittingsample; A=ans; FSofSGT(A,'F',-1); fi=ans;
SG=SGcolorfaces(A,'r',fi); SGfigure; view(-30,30); SGplotalpha(SG);
fi=FLofSGcolor(SG,'r');
SGgrowVLFLfi(SG.VL,SG.FL,fi,-1.5)




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, SGgrowVLFLfi, is designed to move facets of an indexed surface along their normal vectors. It is part of the SolidGeometry library and was introduced in version 4.9. The function has not been extensively tested, so it should be used with caution.

Input Parameters

Output Results

Algorithm Steps

  1. Calculate the normal vectors for the specified facets using the function VLFLvertexNormal.
  2. Compute the new vertex positions by adding the product of the distance dt and the normal vectors to the original vertex positions.
  3. Identify any vertices that result in NaN values and revert them to their original positions.
  4. Assign the updated vertex list to SG.VL and keep the facet list unchanged as SG.FL.
  5. If no output is requested, visualize the original and shifted surfaces using SGfigure and VLFLplotalpha functions.

Visualization

If the function is called without output arguments, it will display two subplots:

Algorithm explaination created using ChatGPT on 2025-08-19 08:14. (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