SGwriteSTL

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

Writes a STL file for a solid geometry

Description

uses VLFLwriteSTLb and writes colors since SG-Lib 4.4 and writes frames since SG-Lib 5.0

See Also: SGwriteSTLarchive , SGreadSTL , SGwriteMultipleSTL , SGwriteSeparatedSTL , VLFLreadSTL , VLFLwriteSTL , STLAsctoBin , SGN2SGT , SGT2SGN

Example Illustration

 missing image of SGwriteSTL(SG,FNAME,ONAME,vcol,NL)

Syntax

fname=SGwriteSTL(SG,[FNAME,ONAME,vcol,NL])

Input Parameter

SG: Object name
FNAME: Optional file name
ONAME: Optional solid name
vcol: Optional facet color for the complexe solid
NL: Optional Normal vector list

Output Parameter

fname: file name of STL

Examples


SGwriteSTL(SGsample(25);
SGwriteSTL(SGsample(25),'','','y'); % Yellow
SGwriteSTL(SGsample(25),'','',[0 255 0]); % Green
SGwriteSTL(SGsample(25),'','',[.9 .2 .8]); % Magenta




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

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