STL-0.2.0.2: STL 3D geometry format parsing and pretty-printing

Safe HaskellNone
LanguageHaskell2010

Graphics.Formats.STL

Synopsis

Documentation

textSTL :: STL -> Builder

Convert an STL value to a Builder, which can be converted to a ByteString with toLazyByteString

stlParser :: Parser STL

A parser from Text to the STL type. The parser should be fairly permissive about whitespace, but has not been tested enough against STL files in the wild.

data STL

A representation of an STL file, consisting of a (possibly empty) object name, and a list of triangles.

Constructors

STL 

Fields

name :: Text
 
triangles :: [Triangle]
 

Instances

Serialize STL 

data Triangle

A single triangle in STL is represented by a normal vector and three vertices.

Constructors

Triangle 

Instances

Serialize Triangle 

type Vector = (Float, Float, Float)