VLFLofSG

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Surfaces
Introduced first in SolidGeometry 3.1, Creation date: 2016-12-11, Last change: 2025-09-14

returns one vertex list and one faces list for nested SG

Description

Since release 3.0, solid geometries can be cells of solid geometries. This procedure returns recursively collected - similar to SGcat2 - the complete list of vertices and faces. This for example required in SGwriteSTL
SLOW AND RECURSIVE FUNCTION
Supports Colors since SG-Lib 4.6

See Also: SGcat2 , SGwriteSTL

Example Illustration

 missing image of VLFLofSG(SG)

Syntax

[VL,FL,FC]=VLFLofSG(SG)

Input Parameter

SG: Solid geometry potentially nested

Output Parameter

VL: Vertex list
FL: Facet list
FC: Face color list

Examples


SG=SGmodelJoint('R',pi/2); % Create a joint consistinf of three solids
[A.VL,A.FL]=VLFLofSG(SG); % Convert into one Solid
SGfigure;SGplot(A); % Show the final solid

%% Color Support
A=SGbox; [a,b,c]=VLFLofSG(A); % keine Farben zu FC grau
A=SGbox; A.col='r'; [a,b,c]=VLFLofSG(A) % alle Farben zu FC rot
A=SGbox; A=SGcolorfaces(A,'g'), [a,b,c]=VLFLofSG(A) % alle Farben wie FC




Copyright 2016-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

Last html export of this page out of FM database by TL: 2025-09-21