SGofVLFLz

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - SG/Solids
Introduced first in SolidGeometry 4.9, Creation date: 2020-01-07, Last change: 2025-09-14

returns a fitting solid based on a surface, i.e. simplified version of SGofSurface

Description

Fast and stable function even for large data sets.

See Also: SGofSurface , VLtransN , VLFLvertexNormal

Example Illustration

 missing image of SGofVLFLz(VL,FL,z)

Syntax

SG=SGofVLFLz(VL,FL,[z])

Input Parameter

VL: Vertex list of a surface (nx3)
FL: Facet list of a surface (nx3)
z: thickness of the solid; default is 0.5

Output Parameter

SG: resulting solid that can be attached to the surface

Examples


[VL,FL]=VLFLsample(14); SGofVLFLz(VL,FL,1)
[VL,FL]=VLFLsample(18); SGofVLFLz(VL,FL,1)




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, SGofVLFLz, is designed to create a solid geometry based on a given surface. It is a simplified version of the SGofSurface function.

Input Parameters

Output

Algorithm Steps

  1. The function begins by retrieving the thickness parameter z using the getfuncparams function. If z is not provided, it defaults to 0.5.
  2. It then calls the SGofSurface function with the parameters VL, FL, z, and additional fixed parameters (0, 0, true) to generate the solid geometry SG.
  3. If no output is requested (i.e., nargout==0), the function will:
    • Invoke SGfigure to create a new figure for visualization.
    • Set the view angle to (-30, 30) using the view function.
    • Plot the solid geometry SG with a red color and alpha transparency of 1 using SGplotalpha.

Example Usage

Two examples are provided to demonstrate the function:

[VL,FL]=VLFLsample(14); SGofVLFLz(VL,FL,1)
[VL,FL]=VLFLsample(18); SGofVLFLz(VL,FL,1)

These examples use the VLFLsample function to generate sample vertex and facet lists, and then create a solid with a thickness of 1.

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