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() {
const {
retractionEnabled,
retractionMinDistance,
retractionSpeed
retraction: {
enabled: retractionEnabled,
minDistance: retractionMinDistance,
speed: retractionSpeed
}
} = this._settings.config;
if (this._isRetracted && retractionEnabled) {
@ -149,10 +151,12 @@ export default class {
retract() {
const {
retractionAmount,
retractionEnabled,
retractionMinDistance,
retractionSpeed
retraction: {
amount: retractionAmount,
enabled: retractionEnabled,
minDistance: retractionMinDistance,
speed: retractionSpeed
}
} = this._settings.config;
if (!this._isRetracted && retractionEnabled) {

View File

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

View File

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

View File

@ -11,7 +11,7 @@ export default function generateInnerLines(slices, settings) {
console.log('generating outer lines and inner lines');
// 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;
shellThickness /= PRECISION;
const nozzleRadius = nozzleDiameter / 2;

View File

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