Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mikolalysenko/voxel-print
3D print stuff from voxels.js
https://github.com/mikolalysenko/voxel-print
Last synced: about 2 months ago
JSON representation
3D print stuff from voxels.js
- Host: GitHub
- URL: https://github.com/mikolalysenko/voxel-print
- Owner: mikolalysenko
- Created: 2013-01-23T07:28:39.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2013-02-06T16:43:02.000Z (almost 12 years ago)
- Last Synced: 2024-10-10T12:41:21.760Z (3 months ago)
- Language: JavaScript
- Size: 1.54 MB
- Stars: 3
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
voxel-print
===========
3D print stuff in voxel.js using [ShapeWays](http://www.shapeways.com/)Installation
============
Just do:npm install voxel-print
Usage
=====
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);
return;
}
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 modelCredits
=======
(c) 2013 Mikola Lysenko. BSD