File Exchange

image thumbnail

STL to FACET model geometry file converter

version (3.65 KB) by Eric Trautmann
This script imports an STL file and writes a .facet file commonly used by Xpatch, etc.


Updated 31 Mar 2011

View License

This file uses import_stl_fast to pull in model geometry and write an appropriate .facet file. If you require the ability to import binary stl files, import_stl_fast can be replaced with another importer from the file exchange.

The current version does not have inputs for different materials.

Cite As

Eric Trautmann (2020). STL to FACET model geometry file converter (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (1)

Michael S.

To keep this converter running in Matlab version R2015a or later, replace import_stl_fast() line 47, which included \r\n values as format strings, completely with:

fmt = '%*[facet] %*[normal] %f32 %f32 %f32 %*[outer] %*[loop] %*[vertex] %f32 %f32 %f32 %*[vertex] %f32 %f32 %f32 %*[vertex] %f32 %f32 %f32 %*[endloop] %*[endfacet]';

MATLAB Release Compatibility
Created with R2010b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Inspired: Polarizability_GUI5