Class ImportSTL
- Namespace
- CADability
- Assembly
- CADability.dll
Reads STL files, ASCII or binary, and returns their triangles as Shells of planar triangular faces. Adjacent triangles are connected, so every set of connected triangles becomes one shell. A shell without open edges can be turned into a solid with MakeSolid(Shell), which ReadFromFile(string, string) with the format "stl" does.
public class ImportSTL
- Inheritance
-
ImportSTL
- Inherited Members
Constructors
ImportSTL()
Creates an importer.
public ImportSTL()
Methods
Read(byte[])
Reads STL data, ASCII or binary, from memory and returns the shells of connected triangles, see Read(string).
public Shell[] Read(byte[] byteArray)
Parameters
byteArraybyte[]The contents of a STL file
Returns
- Shell[]
The shells, one for each set of connected triangles
Read(string)
Reads the STL file, ASCII or binary, and returns the shells of connected triangles. A file that cannot be opened throws an IOException, a file that is not a STL file an ApplicationException.
public Shell[] Read(string fileName)
Parameters
fileNamestringPath of the STL file
Returns
- Shell[]
The shells, one for each set of connected triangles