1.1.0 • Published 9 years ago

jscad v1.1.0

Weekly downloads
23
License
ISC
Repository
github
Last release
9 years ago

Origin

This is from https://openjscad.org. I just made a few changes to use it as a Node library. (Made a PR that's been open for awhile.)

Node.js (as library)

Add to project:

npm i --save jscad 

Create a 'lumber' module:

require('jscad');

exports._2x4 = function _2x4() {
  return cube({size:[2,4,96]});
}

Use your module to build something and render to STL file:

var cad = require('jscad');
inc('./lumber.js');

function board(n) {
  return [ color('yellow', _2x4().rotateY(210).translate([0,n*24,0])) ] 
}

cad.renderFile(board(0), 'boards.stl');
1.1.0

9 years ago

1.0.0

9 years ago