parse-stl-binary

1.0.1 • Public • Published

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: [...]
}
*/

Package Sidebar

Install

npm i parse-stl-binary

Weekly Downloads

67

Version

1.0.1

License

MIT

Last publish

Collaborators

  • thibauts