项目作者: javierbyte

项目描述 :
Basic utils to generate a STL file in javascript
高级语言: JavaScript
项目地址: git://github.com/javierbyte/basic-stl-generator.git
创建时间: 2020-09-26T23:40:24Z
项目社区:https://github.com/javierbyte/basic-stl-generator

开源协议:

下载


Basic STL Generator

Util functions that generate ASCII STL solid strings. See example results in sombras.app.

img2css

Getting Started

  1. import { STLCube } from "basic-stl-generator";
  2. console.log(`
  3. ${STLCube(0,0,0)}
  4. ${STLCube(1,1,1)}
  5. ${STLCube(2,2,2)}
  6. `)
  7. # To export to a file
  8. # 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.