STL Reader
Stereo Lithography (STL) | ||
File Extension | STL | |
Supported Versions | Any | |
Platforms | ![]() ![]() ![]() ![]() ![]() |
|
Tessellation | ![]() |
|
B-rep | ![]() |
|
PMI | ![]() |
STL (STereoLithography) is a widely-used file format for representing 3D surface geometry It is commonly employed in various industries such as manufacturing, engineering, architecture, and entertainment for creating and exchanging 3D models. The STL format describes the surface geometry of a 3D object using a collection of triangular facets, providing a simple and efficient representation of complex shapes. This format is particularly suitable for applications requiring rapid prototyping, computer-aided design (CAD), and 3D printing.
Our support for STL covers reading and writing any version of the STL file format for Windows, GNU/Linux and macOS. As a tessellation-only format, we only import tessellation data.
How to Import from STL
To load an STL file, use A3DAsmModelFileLoadFromFile()
.
The A3DParamsLoadData
structure is used to customize the loading behavior:
A3DAsmModelFile* pModelFile = 0;
A3DRWParamsLoadData sReadParam;
A3D_INITIALIZE_DATA(A3DRWParamsLoadData, sReadParam);
sReadParam.m_sGeneral.m_bReadSolids = true;
// ... set other A3DRWParamsLoadData fields as necessary
A3DAsmModelFileLoadFromFile("path/to/file.stl", &sReadParam, &pModelFile);
See Simple Load and Export for more about loading model files.
Tessellation
Tessellation information is directly read from the source without additional treatment.
Upon reading, use A3DRWParamsGeneralData::m_eReadGeomTessMode
to decide whether tessellation is read.
The A3DRWParamsLoadData::m_sTessellation
member is used to decide how this is performed.
For more information about tessellation in HOOPS Exchange, see Reading Tessellation.