mirror of
https://github.com/Doodle3D/Doodle3D-Slicer.git
synced 2024-11-22 21:47:59 +01:00
Update README.md
This commit is contained in:
parent
e420f815fe
commit
90535c1b27
22
README.md
22
README.md
@ -1,6 +1,5 @@
|
|||||||
# Doodle3D-Slicer
|
# Doodle3D-Slicer
|
||||||
JavaScript gcode slicer, Intended to use with the Doodle3D WiFi-Box
|
JavaScript gcode slicer, Intended to use with the Doodle3D WiFi-Box
|
||||||
|
|
||||||
# Usage
|
# Usage
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
@ -9,20 +8,17 @@ import PRINTER_SETTINGS from 'settings/printer_settings.json!';
|
|||||||
import USER_SETTINGS from 'settings/user_settings.json!';
|
import USER_SETTINGS from 'settings/user_settings.json!';
|
||||||
import * as SLICER from 'Doodle3D/Doodle3d-Slicer';
|
import * as SLICER from 'Doodle3D/Doodle3d-Slicer';
|
||||||
|
|
||||||
setTimeout(() => {
|
var settings = new SLICER.Settings();
|
||||||
var settings = new SLICER.Settings();
|
settings.updateConfig(PRINTER_SETTINGS["ultimaker2go"]);
|
||||||
settings.updateConfig(PRINTER_SETTINGS["ultimaker2go"]);
|
settings.updateConfig(USER_SETTINGS);
|
||||||
settings.updateConfig(USER_SETTINGS);
|
|
||||||
|
|
||||||
var geometry = new THREE.TorusGeometry(20, 10, 30, 30);
|
var geometry = new THREE.TorusGeometry(20, 10, 30, 30);
|
||||||
|
|
||||||
var slicer = new SLICER.Slicer();
|
var slicer = new SLICER.Slicer();
|
||||||
//var slicer = new SLICER.SlicerWorker();
|
|
||||||
|
|
||||||
slicer.setGeometry(geometry);
|
slicer.setGeometry(geometry);
|
||||||
slicer.onfinish = function (gCode) {
|
slicer.onfinish = function (gCode) {
|
||||||
document.getElementById('gcode').innerHTML = gCode.replace(/(?:\r\n|\r|\n)/g, '<br />');
|
document.getElementById('gcode').innerHTML = gCode.replace(/(?:\r\n|\r|\n)/g, '<br />');
|
||||||
};
|
};
|
||||||
slicer.slice(settings);
|
slicer.slice(settings);
|
||||||
});
|
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user