VLFLui

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - User interface
Introduced first in SolidGeometry 1.0, Creation date: 2012-06-11, Last change: 2025-09-14

Opens a dialog, reads and plots an STL-File



See Also: VLui , CPSlineui , CPLui , CPSui , PLui , PLsquareui , PLcircleui , SGui , CPLsplitui , Poseofimageui , Poseui , SGTui

Example Illustration

 missing image of VLFLui(mag,c)

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

Output Results

Algorithm Steps

  1. 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.
  2. If the second argument is provided and not empty, it sets c to this value. Otherwise, it defaults to '?'.
  3. 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.
  4. If a file is selected (i.e., pathname is not 0), the function changes the current directory to the selected path.
  5. It reads the STL file using the VLFLreadSTL function, applying the specified magnification.
  6. The function performs vertex fusion on the vertex and facet lists using VLFLvertexfusion.
  7. It checks the integrity of the vertex and facet lists with VLFLchecker.
  8. 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.
  9. 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