Go to file
casperlamboo 8b3a33eb86 Better detection of open closed shapes
when a ‘single walled’,  ‘closed’ shape is sliced the shape will appear
to be closed by the slicer. This happens because the start and endpoint
of the 2d shape are connected. This commits fixes this.

In the new approach al parts of the geometry are split up into shapes.
Then the 3d shapes are places into two categories (closed and open
geometries).

Based on weather the 3d geometry is open or closed the 2d shape will be
open or closed

@mith @peteruithoven
2017-06-22 13:22:17 +02:00
example remove unused import 2017-06-22 13:22:17 +02:00
src Better detection of open closed shapes 2017-06-22 13:22:17 +02:00
.gitignore add jspm dependency 2017-06-22 13:21:18 +02:00
jspm.config.js add save example 2017-06-22 13:22:17 +02:00
package.json add save example 2017-06-22 13:22:17 +02:00
README.md replace tabs with spaces 2017-06-22 13:21:19 +02:00

Doodle3D-Slicer

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

Usage

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

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

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

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