butterfly.stl package¶
Module contents¶
-
butterfly.stl.read_ascii_file(file)[source]¶ Read an STL file in the ASCII format.
Takes a
file-like object (supporting areadmethod) and returns astl.Solidobject representing the data from the file.If the file is invalid in any way, raises
stl.ascii.SyntaxError.
-
butterfly.stl.read_ascii_string(data)[source]¶ Read geometry from a
strcontaining data in the STL ASCII format.This is just a wrapper around
read_ascii_file()that first wraps the provided string in aStringIO.StringIOobject.
-
butterfly.stl.read_binary_file(file)[source]¶ Read an STL file in the binary format.
Takes a
file-like object (supporting areadmethod) and returns astl.Solidobject representing the data from the file.If the file is invalid in any way, raises
stl.binary.FormatError.
-
butterfly.stl.read_binary_string(data)[source]¶ Read geometry from a
strcontaining data in the STL binary format.This is just a wrapper around
read_binary_file()that first wraps the provided string in aStringIO.StringIOobject.