Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thibauts/parse-stl-binary
STL binary parser
https://github.com/thibauts/parse-stl-binary
Last synced: 21 days ago
JSON representation
STL binary parser
- Host: GitHub
- URL: https://github.com/thibauts/parse-stl-binary
- Owner: thibauts
- License: mit
- Created: 2015-04-07T20:52:00.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-04-07T21:32:00.000Z (over 9 years ago)
- Last Synced: 2024-11-20T22:59:11.338Z (about 1 month ago)
- Language: JavaScript
- Size: 117 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
parse-stl-binary
================
### STL binary parserParses an [STL](http://en.wikipedia.org/wiki/STL_%28file_format%29) (STereoLithography) binary buffer to a mesh compatible with [simplicial-complex](https://github.com/mikolalysenko/simplicial-complex). If you're looking for a streaming parser check [this](https://github.com/tmpvar/stl).
This module works well with [merge-vertices](https://github.com/thibauts/merge-vertices) to deduplicate identical vertices from different faces.
Install
-------```bash
$ npm install parse-stl-binary
```Usage
-----```javascript
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: [...]
}
*/
```