VLFLreadSTL

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

reads an ascii STL-File as vertex & facet list

Description

Based on a procedure of 2010-Oct. This procedure was under devlopment since the method [VL,j,j1,j2,j3]=VLcat(VL,NVL) seems to be not effective enough. The final method is now, first to read all vertices as list. Later the 'unique' command is used to generate a complete vertex list and facet list from the original data.

See Also: SGreadSTL , SGwriteSTL , VLFLwriteSTL , STLAsctoBin

Example Illustration

 missing image of VLFLreadSTL(FName,mag,check)

Syntax

[VL,FL,S1,S2,STL,AbC,NL]=VLFLreadSTL(FName,[mag,check])

Input Parameter

FName: Filename of the STL-File (ASCII)
mag: magnification factor
check: if true, VLFLcheckmeshlab is called; default is false

Output Parameter

VL: Vertex List
FL: Facet List
S1: solid string
S2: endsolid string
STL: The original facet list that uses no vertex list
AbC: Attribute by Count per facet uint16(n)
NL: Normal vector list

Examples

Generate a simple block, write it into a file, read it from the file and write it a second time.
[VL,FL]=VLFLcylinder(10,5,3,1);
VLFLwriteSTL ('PRISMA','by Tim C. Lueth',VL,FL);
[NVL,NFL]=VLFLreadSTL ('PRISMA');
VLFLwriteSTL ('PRISMA-COPY','by Tim C. Lueth',NVL,NFL);




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