fix slice first height, settings loading
This commit is contained in:
parent
f1e17644da
commit
993170a75b
6 changed files with 31 additions and 6 deletions
|
|
@ -321,6 +321,9 @@
|
|||
case cca('q'): // preferences
|
||||
API.modal.show('prefs');
|
||||
break;
|
||||
case cca('l'): // device
|
||||
settingsLoad();
|
||||
break;
|
||||
case cca('e'): // device
|
||||
showDevices();
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -1719,7 +1719,6 @@
|
|||
let mode = getMode(),
|
||||
name = e ? e.target.getAttribute("load") : named || settings.cproc[mode],
|
||||
load = settings.sproc[mode][name];
|
||||
|
||||
if (!load) return;
|
||||
|
||||
settings.process = clone(load);
|
||||
|
|
@ -1753,7 +1752,6 @@
|
|||
for (let k in sp) {
|
||||
if (sp.hasOwnProperty(k)) list.push(k);
|
||||
}
|
||||
console.log({list});
|
||||
list.sort().forEach(function(sk) {
|
||||
let row = DOC.createElement('div'),
|
||||
load = DOC.createElement('button'),
|
||||
|
|
@ -1762,7 +1760,10 @@
|
|||
name = sk;
|
||||
|
||||
load.setAttribute('load', sk);
|
||||
load.onclick = API.conf.load;
|
||||
load.onclick = (ev) => {
|
||||
API.conf.load(undefined, sk);
|
||||
updateSettingsList();
|
||||
}
|
||||
load.appendChild(DOC.createTextNode(sk));
|
||||
if (sk == settings.process.processName) {
|
||||
load.setAttribute('class', 'selected')
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@
|
|||
bounds = btmp;
|
||||
}
|
||||
|
||||
let zMin = options.zmin || Math.floor(bounds.min.z),
|
||||
let zMin = options.zmin || options.firstHeight || Math.floor(bounds.min.z),
|
||||
zMax = options.zmax || Math.ceil(bounds.max.z),
|
||||
zInc = options.height,
|
||||
zIncMin = options.minHeight,
|
||||
|
|
@ -268,6 +268,7 @@
|
|||
// copy to store original z
|
||||
zHeights = zIndexes.slice();
|
||||
} else if (zIncMin) {
|
||||
// console.log('adaptive slicing', zIncMin, ':', zInc, 'from', zMin, 'to', zMax);
|
||||
// FDM adaptive slicing
|
||||
let zPos = zMin + zIncFirst,
|
||||
zOI = 0,
|
||||
|
|
@ -308,6 +309,7 @@
|
|||
}
|
||||
}
|
||||
} else {
|
||||
// console.log('fixed slicing', zInc, 'from', zMin, 'to', zMax);
|
||||
// FDM fixed slicing
|
||||
if (options.firstHeight) {
|
||||
zIndexes.push(options.firstHeight / 2);
|
||||
|
|
@ -319,6 +321,7 @@
|
|||
zHeights.push(zInc);
|
||||
}
|
||||
}
|
||||
|
||||
// create a Slice for each z offset in the zIndexes array
|
||||
for (let i = 0; i < zIndexes.length; i++) {
|
||||
let ik = zIndexes[i].toFixed(5),
|
||||
|
|
|
|||
Loading…
Reference in a new issue