stlwrite(TR, filename)
stlwrite(TR, filename, fileformat)
stlwrite(TR, filename, ..., Name, Value)
stlwrite writes a triangulation object to a binary STL file by default.
fileformat can be 'binary' or 'text'. Use 'Attribute' with binary files to write one uint16 value per triangle. Use 'SolidIndex' with text files to group triangles into solid sections.
P = [0 0; 1 0; 0 1];
T = [1 2 3];
TR = triangulation(T, P);
filename = [tempdir(), 'simple_text.stl'];
stlwrite(TR, filename, 'text')
| Version | Description |
|---|---|
| 2.0.0 | Initial version. |