Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including voxel-print with all npm packages installed. Try it out:

var voxelPrint = require("voxel-print")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

voxel-print v0.0.1

3D print voxel models via shapeways


3D print stuff in voxel.js using ShapeWays


Just do:

npm install voxel-print


First you need to connect to ShapeWays, which is pretty easy to do:

var lpr3d = require("voxel-print")({
      username: "Your ShapeWays Username",
      password: "Your ShapeWays Password"

And then you can print stuff by just calling lpr3d:

lpr3d(voxels, function(err, result) {
  if(err) {
    console.log("Error uploading:", err);
  console.log("Uploaded model:", result.model_id, ", url:", result.url);

And that's it! Here are some more details.

var lpr3d = require("voxel-print")(options);

module.exports opens a connection to ShapeWays web service. You need to specify the following values in options:

  • username: The user name of your account at ShapeWays
  • password: The password for your account
  • application_id: (Optional) An identifier for your specific ShapeWays application.

This method returns a callable object that you can use to upload voxel models to ShapeWays directly

lpr3d(voxels[, options], callback(err, results))

Once you've created a connection with the above method, you can invoke it by calling it directly. To do this, you can pass in the following arguments:

  • voxels: An instance of a voxel.js engine
  • options: An optional object with paramters you can pass to shapeways
  • callback(err, results): Returns the resulting model object or an error if things broke. results is a structure that has two fields:
    • model_id: The shapeways model id
    • url: A url where you can view/buy the model


(c) 2013 Mikola Lysenko. BSD


RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free