Go to file
2017-07-07 18:11:37 +02:00
example remove unused import 2017-06-22 13:22:17 +02:00
simpleExample Added simple example 2017-07-07 18:10:29 +02:00
src remove erronous bracket 2017-06-22 14:06:26 +02:00
.gitignore add jspm dependency 2017-06-22 13:21:18 +02:00
jspm.config.js Added simple example 2017-07-07 18:10:29 +02:00
package.json Added simple example 2017-07-07 18:10:29 +02:00
README.md Fixed code in readme 2017-07-07 18:11:37 +02:00

Doodle3D-Slicer

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

Usage

import 'three.js';
import * as SLICER from 'doodle3d-slicer';

const settings = new SLICER.Settings({
  ...SLICER.printerSettings['ultimaker2go'],
  ...SLICER.userSettings.low
});

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

const slicer = new SLICER.Slicer();

slicer.setGeometry(geometry);
slicer.slice(settings, false).then(gcode => {
  document.getElementById('gcode').innerHTML = gcode.replace(/(?:\r\n|\r|\n)/g, '<br />');
});