rle-save-binvox
Exports a narrowband level set to binvox format.
Example
Here is a simple script showing how you can create a binvox model of a sphere:
var volume = solid;volume
This will pipe a binvox file to stdout. Using viewvox to check the result gives the following mesh:
Install
npm install rle-save-binvox
require("rle-save-binvox")(volume[, bounds, translate, scale])
Returns a stream encoding the binvox file.
volume
is an rle narrowband level setbounds
is a bound on the range of the level set to save (if not specified is computed using rle-extents)translate
is the translation parameter in the binvox filescale
is the scale parameter in the binvox file
Credits
(c) 2013 Mikola Lysenko. MIT License