walkmap.core

At this stage, primarily utility functions dealing with stereolithography (STL) files. Not a stable API yet!

binary-stl

A codec for binary STL files

binary-stl-file-to-svg

(binary-stl-file-to-svg in-filename)(binary-stl-file-to-svg in-filename out-filename)

Given only an in-filename, parse the indicated file, expected to be binary STL, and return an equivalent SVG structure. Given both in-filename and out-filename, as side-effect write the SVG to the indicated output file.

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 vector within a binary STL file.

stl-to-svg

(stl-to-svg stl)

Convert this in-memory stl structure, as read by decode-binary-stl, into an in-memory (Dali) SVG structure, and return it.

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.