https://github.com/javierbyte/basic-stl-generator
Basic utils to generate a STL file in javascript
https://github.com/javierbyte/basic-stl-generator
stl
Last synced: 2 months ago
JSON representation
Basic utils to generate a STL file in javascript
- Host: GitHub
- URL: https://github.com/javierbyte/basic-stl-generator
- Owner: javierbyte
- Created: 2020-09-26T23:40:24.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-09-27T22:05:44.000Z (almost 5 years ago)
- Last Synced: 2024-03-03T08:34:17.393Z (over 1 year ago)
- Topics: stl
- Language: JavaScript
- Homepage:
- Size: 364 KB
- Stars: 4
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Basic STL Generator
Util functions that generate ASCII STL solid strings. See example results in [sombras.app](https://sombras.app/).

## Getting Started
```
import { STLCube } from "basic-stl-generator";console.log(`
${STLCube(0,0,0)}
${STLCube(1,1,1)}
${STLCube(2,2,2)}
`)# To export to a file
# node index.js > testcube.stl
```#### Exports
`STLCube(x = 0, y = 0, z = 0, size = 10)`
Returns a CUBE STL source for a cube using 12 triangular faces. X, Y, Z are the 3d coordinates.
## More info.
- [STLA Files - ASCII stereolithography files](https://people.sc.fsu.edu/~jburkardt/data/stla/stla.html).