Block.to_stl

Block.to_stl(filepath, precision=None, binary=False, **kwargs)

Write a mesh to an STL file.

Parameters:
filepathstr

The path to the file.

precisionstr, optional

Rounding precision for the vertex coordinates. Defaults to the value of compas.PRECISION.

binarybool, optional

If True, the file will be written in binary format. ASCII otherwise.

Returns:
None

Notes

STL files only support triangle faces. It is the user’s responsibility to convert all faces of a mesh to triangles. For example, with compas.datastructures.Mesh.quads_to_triangles().