SGofVLFL

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - SG/Solids
Introduced first in SolidGeometry 1.0, Creation date: 2012-11-21, Last change: 2025-09-14

returns a solid geometry from a vertex list and a facet list

Description

SG.VL=VL
SG.FL=FL
SG.FC=FC since Rel 4.5

See Also: SGofSG , VLFLofSG , VLFLofSGT , VLFLofSGTsurface

Example Illustration

 missing image of SGofVLFL(VL,FL,FC,sh)

Syntax

SG=SGofVLFL(VL,[FL,FC,sh])

Input Parameter

VL: Vertex list
FL: Facet list
FC: Facet color
sh: if true; VLFLselect is used; default is false

Output Parameter

SG: Solid geometry structure




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, SGofVLFL, constructs a solid geometry structure from a vertex list and a facet list. It is part of the SG-Library and was developed by Tim Lueth.

Input Parameters

Output

Algorithm Steps

  1. Retrieve optional parameters FL, FC, and sh using getfuncparams.
  2. Check if VL is already a solid geometry structure using isSG. If true, extract VL, FL, and FC from it using VLFLofSG.
  3. If VL is a structure, return an empty SG.
  4. If FC is empty, set it to a default grey color for each facet.
  5. If sh is true, process VL and FL using VLFLselect.
  6. If VL is not empty, ensure it has three columns by adding a z-coordinate if necessary using VLaddz.
  7. Assign VL, FL, and FC to the SG structure.
  8. If VL is empty, set SG to an empty array.
  9. If no output is requested, plot the solid geometry using SGfigure and SGplot, and set the view angle.
Algorithm explaination created using ChatGPT on 2025-08-19 01: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