FEATool  v1.9
Finite Element Analysis Toolbox
impexp_stl.m File Reference


IMPEXP_STL Import/export geometry in STL format.

[ GEOM ] = IMPEXP_STL( FILE_NAME, MODE, DATA, TOL, FID_LOG ) Import and export of STL format CAD geometries. Both full 3D and 2D planar geometries are supported (3D planar STL data will be converted to 2D geometry objects).

FILE_NAME is a string specifying the (root) file name to process, or a cell array of strings specifying several STL files where each file will be parsed into its separate boundary during import.

MODE can either be a string indicating IMPORT or EXPORT. With the IMPORT mode option the function returns a GEOM struct. While for exporting, the input DATA can be given as either a valid fea finite element data struct, or a FEATool geometry struct.

TOL is a vector optional of tolerance settings during import. The first tolerance controls the deduplication of points (default 1e-3 relative tolerance). The second entry controls tolerance for grouping. The third entry is an integer scalar specifying the number of facets in groups to merge together (default 1 only merging ungrouped facets).

FID_LOG is an optional log file handle for message output (negative for Gui output or empty for no output).