Skip to main content

Module stl

Module stl 

Source
Expand description

STL in: binary and ASCII STL files read into a Mesh, to be written as .bread.

An STL is a list of triangles, each with its three corners written out in full. read_stl welds them into vertices: two corners are one vertex when their coordinates are equal bit for bit, and vertices are numbered by first use. Nothing is rounded or merged beyond that, so every corner of every triangle comes back from the mesh exactly, in the STL’s order. Facet normals and attribute bytes are not kept: they are file data, not geometry.

The text that comes with the triangles is kept as the mesh’s metadata: an ASCII STL’s solid name as its name, and a binary STL’s 80-byte header as its comment, when they hold text.

Enums§

ReadStlError
Why an STL could not be read.

Functions§

read_stl
Reads a binary or an ASCII STL, and welds its corners into a mesh.