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 aread
method) and returns astl.Solid
object 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
str
containing data in the STL ASCII format.This is just a wrapper around
read_ascii_file()
that first wraps the provided string in aStringIO.StringIO
object.
-
butterfly.stl.
read_binary_file
(file)[source]¶ Read an STL file in the binary format.
Takes a
file
-like object (supporting aread
method) and returns astl.Solid
object 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
str
containing data in the STL binary format.This is just a wrapper around
read_binary_file()
that first wraps the provided string in aStringIO.StringIO
object.