Muscat.IO.StlReader module

CheckIntegrity()[source]
ReadStl(fileName: str = '', string: str = '') Mesh[source]

Read Stl file into a Mesh

Parameters:
  • fileName (str, optional) – The name of the file to read, by default None

  • string (str, optional) – the string to read in the case of reading from memory, by default None

Returns:

the stl surface

Return type:

Mesh

class StlReader(fileName: str = '')[source]

Bases: ReaderBase

Stl read class, works for ASCII and binary format

Read(fileName: str | None = None, string: str | None = None) Mesh[source]

Read a file or a string as a stl surface, ASCII and binary format are supported.

Parameters:
  • fileName (str, optional) – The name of the file to read, by default None

  • string (str, optional) – the string to read in the case of reading from memory, by default None

  • out (Mesh, optional) – output unstructured mesh object containing reading result, by default None

Returns:

the read stl surface

Return type:

Mesh

ReadStlAscii() Mesh[source]

Read an ASCII stl file

Returns:

the read stl surface

Return type:

Mesh

ReadStlBinary() Mesh[source]

Read an binary stl file

Returns:

the read stl surface

Return type:

Mesh

note: from https://en.wikipedia.org/wiki/STL_(file_format)#Binary_STL