# serialize-stl-ascii

> STL ASCII serialization

Latest version **1.0.1** (published 2015-04-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install serialize-stl-ascii
pnpm add serialize-stl-ascii
yarn add serialize-stl-ascii
bun add serialize-stl-ascii
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2015-04-08 |
| First published | 2015-04-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | thibauts |
| Maintainers | thibauts |
| Keywords | stl, ascii, format, buffer, mesh |

## Links

- npm: https://www.npmjs.com/package/serialize-stl-ascii
- Repository: https://github.com/thibauts/serialize-stl-ascii
- Issues: https://github.com/thibauts/serialize-stl-ascii/issues
- npm.io page: https://npm.io/package/serialize-stl-ascii

## Dependencies (1)

- [normals](https://npm.io/package/normals.md) ^1.0.1

## Alternatives

- [flatbuffers](https://npm.io/package/flatbuffers.md) — 6.0M weekly downloads
- [@exodus/patch-broken-hermes-typed-arrays](https://npm.io/package/@exodus/patch-broken-hermes-typed-arrays.md) — 28.5K weekly downloads
- [@native-to-anchor/buffer-layout](https://npm.io/package/@native-to-anchor/buffer-layout.md) — 12.2K weekly downloads
- [binary-parser-encoder](https://npm.io/package/binary-parser-encoder.md) — 5.3K weekly downloads
- [datasets-fi-postalcodes](https://npm.io/package/datasets-fi-postalcodes.md) — 1.1K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2015-04-08
- 1.0.0 — 2015-04-08

## README

serialize-stl-ascii
===================
### STL ASCII serialization

Produces a [STL](http://en.wikipedia.org/wiki/STL_%28file_format%29) (STereoLithography) ASCII string from a mesh. Face normals are computed internally if not provided.

Install
-------

```bash
$ npm install serialize-stl-ascii
```

Example
-------

```javascript
var serializeSTL = require('serialize-stl-ascii');

var mesh = {
  positions: [
    [-1.0, 0.0, 0.0],
    [ 0.0, 1.0, 0.0],
    [ 1.0, 0.0, 0.0]
  ],
  cells: [
    [0, 1, 2]
  ]
}

var str = serializeSTL(mesh.cells, mesh.positions/*, faceNormals, solidName*/);
console.log(str);
/*
solid
  facet normal 0e+0 0e+0 -1e+0
    outer loop
      vertex -1e+0 0e+0 0e+0
      vertex 0e+0 1e+0 0e+0
      vertex 1e+0 0e+0 0e+0
    endloop
  endfacet
endsolid
*/
```

---
_Source: https://npm.io/package/serialize-stl-ascii · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
