bburdette / stl / Stl

A parser for binary STL files - the 3d models that are just a list of triangles. Pretty much went by wikipedia on the STL format and tested on a few models. No special STL features supported, just the basic format which is:

Types


type alias Triangle =
{ normal : Math.Vector3.Vec3
, vertices : ( Math.Vector3.Vec3
, Math.Vector3.Vec3
, Math.Vector3.Vec3 ) 
}

A Triangle is a normal Vec3 and a triple of Vec3 for the vertices


type alias Triangles =
List Triangle

Triangles is a list of Triangle

Functions

binaryStl : Bytes.Decode.Decoder Triangles

Binary decoder for Stl files.