walkmap.core

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

*sea-level*

dynamic

The sea level on heightmaps we’re currently handling. If characters are to be able to swin in the sea, we must model the sea bottom, so we need heightmaps which cover at least the continental shelf. However, the sea bottom is not walkable territory and can be culled from walkmaps.

Note must be a floating point number. (= 0 0.0) returns false!

binary-stl-file->svg

(binary-stl-file->svg in-filename)(binary-stl-file->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.

cull-ocean-facets

(cull-ocean-facets stl)

Ye cannae walk on water. Remove all facets from this stl structure which are at sea level.

ocean?

(ocean? facet)

Of a facet, is the altitude of every vertice equal to *sea-level*?