parse-stl-binary
v1.0.1
Published
STL binary parser
Downloads
307
Readme
parse-stl-binary
STL binary parser
Parses an STL (STereoLithography) binary buffer to a mesh compatible with simplicial-complex. If you're looking for a streaming parser check this.
This module works well with merge-vertices to deduplicate identical vertices from different faces.
Install
$ npm install parse-stl-binary
Usage
var parseSTL = require('parse-stl-binary');
var fs = require('fs');
var buf = fs.readFileSync('mesh.stl');
var mesh = parseSTL(buf);
console.log(mesh);
/*
{
positions: [...],
cells: [...],
faceNormals: [...]
}
*/