1.0.1 • Published 9 years ago

parse-stl-binary v1.0.1

Weekly downloads
4
License
MIT
Repository
github
Last release
9 years ago

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