SGofVLFLSGc

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

returns only the Solid Geometry of structs, Solid, Vertex or Facet list

Description

all frames etc are lost. This function is used to structure several printjobs
Could be extended to handels, pde models etc.

See Also: SGpacking

Example Illustration

 missing image of SGofVLFLSGc(SGc)

Syntax

SG=SGofVLFLSGc(SGc)

Input Parameter

SGc: Any kind of SG: A.SG, A{}, A.VL,A.FL

Output Parameter

SG: Struct only with fields SG.Vl and SG.FL

Examples


load JACO_robot.mat
SGofVLFLSGc(JACO)




Copyright 2018-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, SGofVLFLSGc, is designed to extract the solid geometry from a given input structure, which can be a solid, vertex, or facet list. The function is part of the SG-Library and was introduced in SolidGeometry 4.2 by Tim Lueth.

Input Parameters

Output Results

Algorithm Steps

  1. Check if the input SGc has a field 'SG'. If it does, assign SGc.SG to SGc.
  2. Initialize a cell array SGs to store intermediate results.
  3. Check if SGc is a cell array:
    • If true, iterate over each element in SGc and recursively call SGofVLFLSGc for each element. Store the results in SGs.
    • Concatenate the results in SGs using SGcat2 to form the final SG.
  4. If SGc is not a cell array, call VLFLofSG to extract the vertex list (VL) and facet list (FL) from SGc. Assign these to SG.VL and SG.FL.
  5. If no output is requested (i.e., nargout == 0), perform the following visualization steps:
    • Call SGfigure and set the view to (-30, 30).
    • If SGc is a cell array, iterate over each element and plot its bounding box using SGplot and SGofBB, with colors determined by colofn.
    • Call VLFLplotlight with parameters (1, 0.2) and (1, 0.5) to adjust lighting.
    • Plot the final SG using SGplot.
Algorithm explaination created using ChatGPT on 2025-08-19 00:39. (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