Syntax
[VL,FL,filename,pathname]=VLFLui([mag,c])
Input Parameter
mag : | | magnification; default is 1 |
c : | | Color of Object, Plots only if color is defined |
Output Parameter
VL : | | Vertex List of STL File |
FL : | | Facet List of STL File |
filename : | | filename of selected file |
pathname : | | pathname of selected file |
Examples
Read in a STL File
[VL,FL]=VLFLui
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, VLFLui
, is designed to open a dialog, read, and plot an STL file. It is part of the SolidGeometry library and was introduced in version 1.0. Below is a detailed explanation of the algorithm and its parameters.
Input Parameters
- mag: This parameter represents the magnification factor for the STL file. The default value is 1 if not specified.
- c: This parameter specifies the color of the object to be plotted. The object is only plotted if a color is defined.
Output Results
- VL: The vertex list of the STL file.
- FL: The facet list of the STL file.
- filename: The name of the selected STL file.
- pathname: The path of the selected STL file.
Algorithm Steps
- The function begins by checking the number of input arguments. If the first argument is provided and not empty, it sets
mag
to this value. Otherwise, it defaults to 1.
- If the second argument is provided and not empty, it sets
c
to this value. Otherwise, it defaults to '?'.
- The function then opens a file dialog to allow the user to select an STL file. It filters for files with the extensions
.stl
or .STL
.
- If a file is selected (i.e.,
pathname
is not 0), the function changes the current directory to the selected path.
- It reads the STL file using the
VLFLreadSTL
function, applying the specified magnification.
- The function performs vertex fusion on the vertex and facet lists using
VLFLvertexfusion
.
- It checks the integrity of the vertex and facet lists with
VLFLchecker
.
- If a color is specified (i.e.,
c
is not '?'), the function plots the object using VLFLplots
, sets the axis to auto, and enables 3D rotation with rotate3d
.
- If no output arguments are specified, it creates a figure using
SGfigure
and SGofVLFL
.
Algorithm explaination created using ChatGPT on 2025-08-19 08:09. (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