Go to file
2017-07-18 14:05:25 +02:00
example Merge remote-tracking branch 'origin/develop' into develop 2017-07-18 12:53:59 +02:00
simpleExample Added simple example 2017-07-07 18:10:29 +02:00
src use npm version of three.js 2017-07-18 12:38:03 +02:00
.gitignore add jspm dependency 2017-06-22 13:21:18 +02:00
jspm.config.js Merge remote-tracking branch 'origin/develop' into develop 2017-07-18 12:53:59 +02:00
package.json Merge remote-tracking branch 'origin/develop' into develop 2017-07-18 12:53:59 +02:00
README.md update readme 2017-07-18 12:43:27 +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);

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);
  });