TRI_SURFACE_TO_STLA
Convert data from TRI_SURFACE to ASCII STL


TRI_SURFACE_TO_STLA is a MATLAB program which reads data from a TRI_SURFACE file describing a triangular mesh of a 3D surface, and converts it to an ASCII STL file.

A TRI_SURFACE or triangulated mesh surface, is described by a pair of arrays:

An ASCII STL file contains a description of the surface of a solid that has been decomposed into triangles. The vertices of the triangles should be listed in counterclockwise order, as viewed from outside the surface. A normal vector for the triangle may also be listed.

Usage:

tri_surface_to_stla ( 'node_filename', 'element_filename', 'stla_filename' )
where

Licensing:

The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.

Related Data and Programs:

OBJ_TO_TRI_SURFACE, a MATLAB program which reads an OBJ file, and extracts the surface mesh data as a TRI_SURFACE dataset.

PLY_TO_TRI_SURFACE, a MATLAB program which reads a PLY file, and extracts the surface mesh data as a TRI_SURFACE dataset.

STLA, a data directory which contains a description and examples of STLA files.

STLA_DISPLAY, a MATLAB program which reads an ASCII STL file and displays it.

STLA_IO, a MATLAB library which reads or writes a PLY file.

STLA_TO_TRI_SURFACE, a MATLAB program which converts ASCII STL graphics data to TRI_SURFACE data.

TRI_SURFACE, a data directory which contains examples of TRI_SURFACE files.

TRI_SURFACE_DISPLAY, a MATLAB program which displays a TRI_SURFACE.

TRI_SURFACE_IO, a MATLAB library which reads and writes the 3D graphics information in a TRI_SURFACE file;

TRI_SURFACE_TO_OBJ, a MATLAB program which reads a TRI_SURFACE dataset and extracts the surface mesh data as an OBJ file.

TRI_SURFACE_TO_PLY, a MATLAB program which converts TRI_SURFACE data to data suitable for storage as a PLY file.

Reference:

  1. 3D Systems, Inc,
    Stereolithography Interface Specification,
    October 1989.

Source Code:

Examples and Tests:

CUBE is a cube using 12 triangular faces and 36 nodes.

MAGNOLIA is a magnolia blossom, using 1247 triangular faces and 3741 nodes.

You can go up one level to the MATLAB source codes.


Last revised on 16 August 2009.