map old config names to new split settings

This commit is contained in:
Simon Voordouw 2017-07-11 17:19:05 +02:00
parent f87a9c0a56
commit cff8dfffc0
5 changed files with 24 additions and 18 deletions

View File

@ -125,9 +125,11 @@ export default class {
unRetract() { unRetract() {
const { const {
retractionEnabled, retraction: {
retractionMinDistance, enabled: retractionEnabled,
retractionSpeed minDistance: retractionMinDistance,
speed: retractionSpeed
}
} = this._settings.config; } = this._settings.config;
if (this._isRetracted && retractionEnabled) { if (this._isRetracted && retractionEnabled) {
@ -149,10 +151,12 @@ export default class {
retract() { retract() {
const { const {
retractionAmount, retraction: {
retractionEnabled, amount: retractionAmount,
retractionMinDistance, enabled: retractionEnabled,
retractionSpeed minDistance: retractionMinDistance,
speed: retractionSpeed
}
} = this._settings.config; } = this._settings.config;
if (!this._isRetracted && retractionEnabled) { if (!this._isRetracted && retractionEnabled) {

View File

@ -11,7 +11,7 @@ const offsetOptions = {
export default function addBrim(slices, settings) { export default function addBrim(slices, settings) {
console.log('add brim'); console.log('add brim');
let { brimOffset } = settings.config; let { brim: { offset: brimOffset } } = settings.config;
brimOffset /= PRECISION; brimOffset /= PRECISION;
const [firstLayer] = slices; const [firstLayer] = slices;

View File

@ -7,11 +7,11 @@ export default function generateInfills(slices, settings) {
let { let {
layerHeight, layerHeight,
fillGridSize, fill: { gridSize: fillGridSize },
bottomThickness, bottom: { thickness: bottomThickness },
topThickness, top: { thickness: topThickness },
nozzleDiameter, nozzleDiameter,
infillOverlap fill: { overlap: infillOverlap }
} = settings.config; } = settings.config;
fillGridSize /= PRECISION; fillGridSize /= PRECISION;

View File

@ -11,7 +11,7 @@ export default function generateInnerLines(slices, settings) {
console.log('generating outer lines and inner lines'); console.log('generating outer lines and inner lines');
// need to scale up everything because of clipper rounding errors // need to scale up everything because of clipper rounding errors
let { layerHeight, nozzleDiameter, shellThickness } = settings.config; let { layerHeight, nozzleDiameter, shell: { thickness: shellThickness } } = settings.config;
nozzleDiameter /= PRECISION; nozzleDiameter /= PRECISION;
shellThickness /= PRECISION; shellThickness /= PRECISION;
const nozzleRadius = nozzleDiameter / 2; const nozzleRadius = nozzleDiameter / 2;

View File

@ -5,14 +5,16 @@ import { PRECISION } from '../constants.js';
export default function generateSupport(slices, settings) { export default function generateSupport(slices, settings) {
console.log('generating support'); console.log('generating support');
if (!settings.config.supportEnabled) return; if (!settings.config.support.enabled) return;
let { let {
layerHeight, layerHeight,
supportGridSize, support: {
supportAcceptanceMargin, gridSize: supportGridSize,
supportPlateSize: plateSize, margin: AcceptanceMargin,
supportDistanceY, plateSize: plateSize,
distanceY: DistanceY
},
nozzleDiameter nozzleDiameter
} = settings.config; } = settings.config;