Go to file
2017-07-20 16:14:01 +02:00
example wrap progress in object 2017-07-19 11:02:14 +02:00
simpleExample Ignore higher .babelrc file in example 2017-07-20 16:14:01 +02:00
src Removing jspm specific loader specification 2017-07-20 11:54:49 +02:00
.babelrc Switching to babel 2017-07-20 11:20:43 +02:00
.gitignore simple example fixed 2017-07-20 12:12:25 +02:00
.npmignore Switching to babel 2017-07-20 11:20:43 +02:00
jspm.config.js remove progress promise 2017-07-19 20:54:21 +02:00
package-lock.json Publish under doodle3d npm org 2017-07-20 16:13:20 +02:00
package.json Publish under doodle3d npm org 2017-07-20 16:13:20 +02:00
README.md Merge remote-tracking branch 'origin/develop' into develop 2017-07-19 21:40:19 +02:00

Doodle3D-Slicer

JavaScript gcode slicer, Intended to use with the Doodle3D WiFi-Box

Usage

import * as THREE from 'three';
import { defaultSettings, Slicer } from 'Doodle3D/Doodle3D-Slicer';

const settings = {
  ...defaultSettings.base,
  ...defaultSettings.material.pla,
  ...defaultSettings.printer.ultimaker2go,
  ...defaultSettings.quality.high
};

const geometry = new THREE.TorusGeometry(20, 10, 30, 30).clone();

const slicer = new SLICER.Slicer();
slicer.setGeometry(geometry);
const gcode = await slicer.slice(settings, ({ progress: { done, total, action } }) => {
  const percentage = `${(done / total * 100).toFixed()}%`
  console.log(action, percentage);
}));