Syntax
SGTcheckSTLwrite([A])
Input Parameter
Examples
load JACO_robot.mat; A=JCF;
SGTcheckSTLwrite(A)
Copyright 2020-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, SGTcheckSTLwrite
, is designed to test the process of writing and reading STL files using a solid geometry object. It is part of the SolidGeometry library and was introduced in version 5.0.
Input Parameters
- A: The solid geometry object to be checked. If not provided, the function loads a default object from
JACO_robot.mat
.
Algorithm Steps
- Parameter Retrieval: The function retrieves the input parameter
A
using getfuncparams
. If A
is empty, it loads a default solid geometry object from JACO_robot.mat
.
- Plot Original Solid: The original solid with frames is plotted using
SGTplotalpha
with a white color and 0.5 transparency. The view is set to angles -30 and 30 degrees.
- Convert and Reconstruct:
B = SGT2SGN(A)
: Converts the solid geometry with frames into normal vectors.
A1 = SGN2SGT(B)
: Reconstructs the original solid from the normal vectors.
The reconstructed solid is plotted in red with 0.5 transparency.
- Write to STL: The original and converted solids are written to STL files using
SGwriteSTL
. The filenames are Frametest-A
and Frametest-B
.
- Read from STL: The STL files are read back into solid geometry objects
CA
and CB
using SGreadSTL
.
- Plot Reconstructed Solids:
CA
: Plotted in green, representing the solid imported and reconstructed from automatic normals.
CB
: Plotted in magenta, representing the solid reconstructed from explicit normals.
Algorithm explaination created using ChatGPT on 2025-08-19 07:36. (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