stlGeneralAccess for both binary STL and ascii STL. It returns the coordinates of vertexes, including boundary nodes and interior nodes.
You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
This function reads an STL file in binary format or ascii format.
It returns the coordinates of both boundary nodes and interior nodes
of the 3D polyhedron.
partial REFs:
1. stlread() by Doron Harlev for binary STL file via mathswork.com
2. https://wrf.ecse.rpi.edu//Research/Short_Notes/pnpoly.html
Examples:
close all
clear all
clc
[x, y, z, bdNodes, inNodes] = stlGeneralAccess('./Region1.stl');
if 0
patch(x, y, z);
else
scatter3(bdNodes(:,1), bdNodes(:,2), bdNodes(:,3), 'MarkerFaceColor',[.75 .75 .0]);
hold on
scatter3(inNodes(:,1), inNodes(:,2), inNodes(:,3),'MarkerFaceColor',[.5 .0 .0]);
end
Where
filename --- Full path of the input STL file.
dimSize --- [3*1]. The dimSize of coordinate, covering the 3D polyhedron.
x --- [3*numFacet]. X Position of three points in a triangular facet.
y --- [3*numFacet]. Y Position of three points in a triangular facet.
z --- [3*numFacet]. Z Position of three points in a triangular facet.
bdNodes --- [num_bdNodes*3]. The coordinates of boundary nodes.
inNodes --- [num_inNodes*3]. The coordinates of interior nodes.
FUNCTION stlGeneralAccess. Version 6.1 Written by JeffZhang. AUG,2020.
E-mail: jfsufeng@gmail.com || jfzhang2018@zju.edu.cn
Cite As
Jeff Zhang (2026). stlGeneralAccess (https://github.com/JeffJFZ/stlGeneralAccess/releases/tag/6.1.2), GitHub. Retrieved .
1. stlread() by Doron Harlev for binary STL file via mathswork.com 2. https://wrf.ecse.rpi.edu//Research/Short_Notes/pnpoly.html
General Information
- Version 6.1.2 (155 KB)
-
View License on GitHub
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
| Version | Published | Release Notes | Action |
|---|---|---|---|
| 6.1.2 | See release notes for this release on GitHub: https://github.com/JeffJFZ/stlGeneralAccess/releases/tag/6.1.2 |
||
| 6.1.1 | See release notes for this release on GitHub: https://github.com/JeffJFZ/stlGeneralAccess/releases/tag/6.1.1 |
||
| 6.1.0 |
