walkmap.stl

Utility functions dealing with stereolithography (STL) files. Not a stable API yet!

binary-stl

A codec for binary STL files

binary-stl-to-ascii

(binary-stl-to-ascii in-filename)(binary-stl-to-ascii in-filename out-filename)

Convert the binary STL file indicated by in-filename, and write it to out-filename, if specified; otherwise, to a file with the same basename as in-filename but the extension .ascii.stl.

decode-binary-stl

(decode-binary-stl filename)

Parse a binary STL file from this filename and return an STL structure representing its contents.

NOTE that we’ve no way of verifying that the input file is binary STL data, if it is not this will run but will return garbage.

facet

A codec for a facet (triangle) within a binary STL file.

stl->ascii

(stl->ascii stl)(stl->ascii stl solidname)

Return as a string an ASCII rendering of the stl structure.

stl?

(stl? o)(stl? o verify-count?)

True if o is recogniseable as an STL structure. An STL structure must have a key :facets, whose value must be a sequence of polygons; and may have a key :header whose value should be a string, and/or a key :count, whose value should be a positive integer.

If verify-count? is passed and is not false, verify that the value of the :count header is equal to the number of facets.

vect

A codec for vectors within a binary STL file.

write-ascii-stl

(write-ascii-stl filename stl)(write-ascii-stl filename stl solidname)

Write an stl structure as read by decode-binary-stl to this filename as ASCII encoded STL.