mirror of
https://github.com/Doodle3D/Doodle3D-Slicer.git
synced 2024-11-16 19:17:57 +01:00
use deconstruction in move
This commit is contained in:
parent
aba32d9a21
commit
9ab23e56f6
24
src/gcode.js
24
src/gcode.js
@ -68,8 +68,10 @@ export default class {
|
|||||||
}
|
}
|
||||||
|
|
||||||
moveTo (x, y, layer) {
|
moveTo (x, y, layer) {
|
||||||
const layerHeight = this.settings.config['layerHeight'];
|
const {
|
||||||
const travelSpeed = this.settings.config['travelSpeed'];
|
layerHeight,
|
||||||
|
travelSpeed
|
||||||
|
} = this.settings;
|
||||||
|
|
||||||
const z = (layer + 1) * layerHeight;
|
const z = (layer + 1) * layerHeight;
|
||||||
const speed = travelSpeed * 60;
|
const speed = travelSpeed * 60;
|
||||||
@ -90,15 +92,21 @@ export default class {
|
|||||||
lineTo (x, y, layer, type) {
|
lineTo (x, y, layer, type) {
|
||||||
const newNozzlePosition = new THREE.Vector2(x, y);
|
const newNozzlePosition = new THREE.Vector2(x, y);
|
||||||
|
|
||||||
const layerHeight = this.settings.config['layerHeight'];
|
const {
|
||||||
const nozzleDiameter = this.settings.config['nozzleDiameter'];
|
layerHeight,
|
||||||
const filamentThickness = this.settings.config['filamentThickness'];
|
nozzleDiameter,
|
||||||
const travelSpeed = this.settings.config['travelSpeed'];
|
filamentThickness,
|
||||||
|
travelSpeed
|
||||||
|
} = this.settings;
|
||||||
|
|
||||||
const profile = this.settings.config[(this.bottom ? 'bottom' : type)];
|
const profile = this.settings.config[(this.bottom ? 'bottom' : type)];
|
||||||
|
|
||||||
const speed = profile['speed'] * 60;
|
let {
|
||||||
const flowRate = profile['flowRate'];
|
speed,
|
||||||
|
flowRate
|
||||||
|
} = profile;
|
||||||
|
|
||||||
|
speed *= 60;
|
||||||
const z = (layer + 1) * layerHeight;
|
const z = (layer + 1) * layerHeight;
|
||||||
|
|
||||||
const lineLength = this._nozzlePosition.distanceTo(newNozzlePosition);
|
const lineLength = this._nozzlePosition.distanceTo(newNozzlePosition);
|
||||||
|
Loading…
Reference in New Issue
Block a user