MATLAB: Question about STL file

.mfileMATLABpoint cloudstlstl filestlfile

Hello
I have a vector file as xyz How can I calculate normal vector? How can I create a stl file?.
what is the facet in stl file?
Thanks.

Best Answer

An stl file has two parts. One part contains triplets of vertex IDs, and the other part contains the xyz coordinates of each vertex. The triplets tell you the three corners of a face of your mesh.
In principle there can be more than three IDs, but triangular meshes are the most usual.
The data you have seems to only be the faces array, although maybe the vertices array is hidden in the last part of your array.
Also, the faces array describes the vertices, not the normal vector of that face.
Related Question