move tab/support annotations into widget meta data / idb. fix support/lay flat conflict. fix support nozzle in slice.
This commit is contained in:
parent
b5516c1d9e
commit
bf51d56bb5
12 changed files with 92 additions and 42 deletions
|
|
@ -197,6 +197,7 @@ KIRI.work = {
|
||||||
slice: function(settings, widget, callback) {
|
slice: function(settings, widget, callback) {
|
||||||
send("slice", {
|
send("slice", {
|
||||||
id: widget.id,
|
id: widget.id,
|
||||||
|
anno: widget.annotations(),
|
||||||
settings: settings
|
settings: settings
|
||||||
}, function(reply) {
|
}, function(reply) {
|
||||||
callback(reply);
|
callback(reply);
|
||||||
|
|
|
||||||
|
|
@ -401,7 +401,7 @@
|
||||||
annotate: (id) => {
|
annotate: (id) => {
|
||||||
// add per widget annotation
|
// add per widget annotation
|
||||||
// for things like extruder and supports
|
// for things like extruder and supports
|
||||||
return settings.widget[id] = ( settings.widget[id] || {} );
|
return WIDGETS.filter(w => w.id === id)[0].anno;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
work: KIRI.work
|
work: KIRI.work
|
||||||
|
|
@ -1838,7 +1838,7 @@
|
||||||
if (!shift) platform.deselect();
|
if (!shift) platform.deselect();
|
||||||
selectedMeshes.push(mesh);
|
selectedMeshes.push(mesh);
|
||||||
API.event.emit('widget.select', widget);
|
API.event.emit('widget.select', widget);
|
||||||
widget.setColor(color.selected, settings);
|
widget.setColor(color.selected);
|
||||||
updateSelectedInfo();
|
updateSelectedInfo();
|
||||||
}
|
}
|
||||||
platformUpdateSelected();
|
platformUpdateSelected();
|
||||||
|
|
@ -1892,10 +1892,11 @@
|
||||||
if (b) b.classList.remove('pop-sel');
|
if (b) b.classList.remove('pop-sel');
|
||||||
}
|
}
|
||||||
forSelectedWidgets(w => {
|
forSelectedWidgets(w => {
|
||||||
w.setColor(color.selected, settings);
|
w.setColor(color.selected);
|
||||||
let ext = API.widgets.annotate(w.id).extruder || 0;
|
let ext = API.widgets.annotate(w.id).extruder || 0;
|
||||||
let b = $(`sel-ext-${ext}`);
|
let b = $(`sel-ext-${ext}`);
|
||||||
if (b) b.classList.add('pop-sel');
|
if (b) b.classList.add('pop-sel');
|
||||||
|
w.saveState();
|
||||||
}, true);
|
}, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1926,7 +1927,7 @@
|
||||||
selectedMeshes.splice(si,1);
|
selectedMeshes.splice(si,1);
|
||||||
API.event.emit('widget.deselect', widget);
|
API.event.emit('widget.deselect', widget);
|
||||||
}
|
}
|
||||||
widget.setColor(color.deselected, settings);
|
widget.setColor(color.deselected);
|
||||||
platformUpdateSelected();
|
platformUpdateSelected();
|
||||||
SPACE.update();
|
SPACE.update();
|
||||||
updateSelectedInfo();
|
updateSelectedInfo();
|
||||||
|
|
@ -1999,9 +2000,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function platformAdd(widget, shift, nolayout) {
|
function platformAdd(widget, shift, nolayout) {
|
||||||
if (!settings.widget[widget.id]) {
|
widget.anno.extruder = widget.anno.extruder || 0;
|
||||||
settings.widget[widget.id] = {extruder: 0};
|
|
||||||
}
|
|
||||||
WIDGETS.push(widget);
|
WIDGETS.push(widget);
|
||||||
SPACE.platform.add(widget.mesh);
|
SPACE.platform.add(widget.mesh);
|
||||||
platform.select(widget, shift);
|
platform.select(widget, shift);
|
||||||
|
|
@ -2066,7 +2065,6 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
KIRI.work.clear(widget);
|
KIRI.work.clear(widget);
|
||||||
delete settings.widget[widget.id];
|
|
||||||
WIDGETS.remove(widget);
|
WIDGETS.remove(widget);
|
||||||
Widget.Groups.remove(widget);
|
Widget.Groups.remove(widget);
|
||||||
SPACE.platform.remove(widget.mesh);
|
SPACE.platform.remove(widget.mesh);
|
||||||
|
|
@ -2744,6 +2742,21 @@
|
||||||
|
|
||||||
function restoreSettings(save) {
|
function restoreSettings(save) {
|
||||||
let newset = ls2o('ws-settings') || settings;
|
let newset = ls2o('ws-settings') || settings;
|
||||||
|
// extract legacy widget annotations into widgets
|
||||||
|
if (newset.widget) {
|
||||||
|
for (let id of Object.keys(newset.widget)) {
|
||||||
|
let anno = newset.widget[id];
|
||||||
|
let wid = WIDGETS.filter(w => w.id === id)[0];
|
||||||
|
if (wid && anno) {
|
||||||
|
wid.anno = anno;
|
||||||
|
console.log('transfer settings annotations to widget', id);
|
||||||
|
delete newset.widget[id];
|
||||||
|
wid.saveState();
|
||||||
|
} else {
|
||||||
|
console.log('missing widget for annotations', id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
settings = CONF.normalize(newset);
|
settings = CONF.normalize(newset);
|
||||||
// override camera from settings
|
// override camera from settings
|
||||||
if (settings.controller.view) {
|
if (settings.controller.view) {
|
||||||
|
|
@ -2791,7 +2804,8 @@
|
||||||
platform.delete(widget);
|
platform.delete(widget);
|
||||||
});
|
});
|
||||||
|
|
||||||
// remove widget keys if they are not going to be restored
|
// remove widget keys if they are not going to be restored (TODO: remove in 3.1)
|
||||||
|
if (settings.widget)
|
||||||
Object.keys(settings.widget).filter(k => toload.indexOf(k) < 0).forEach(k => {
|
Object.keys(settings.widget).filter(k => toload.indexOf(k) < 0).forEach(k => {
|
||||||
delete settings.widget[k];
|
delete settings.widget[k];
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -62,6 +62,9 @@ kiri.load(function(API) {
|
||||||
alert = API.show.alert('[ESC] to end lay-flat operation', 600000);
|
alert = API.show.alert('[ESC] to end lay-flat operation', 600000);
|
||||||
});
|
});
|
||||||
API.event.on('mouse.hover', (ev) => {
|
API.event.on('mouse.hover', (ev) => {
|
||||||
|
if (!enabled) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
cleanup();
|
cleanup();
|
||||||
let { int, ints, event, point, type } = ev;
|
let { int, ints, event, point, type } = ev;
|
||||||
if (type === 'widget') {
|
if (type === 'widget') {
|
||||||
|
|
@ -81,6 +84,9 @@ kiri.load(function(API) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
API.event.on('mouse.hover.up', (ev) => {
|
API.event.on('mouse.hover.up', (ev) => {
|
||||||
|
if (!enabled) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
let { int, point, object } = ev;
|
let { int, point, object } = ev;
|
||||||
if (!object) {
|
if (!object) {
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -151,6 +151,8 @@ console.log/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
|
||||||
this.roto = [];
|
this.roto = [];
|
||||||
// added meshes (supports, tabs, etc)
|
// added meshes (supports, tabs, etc)
|
||||||
this.adds = [];
|
this.adds = [];
|
||||||
|
// persisted client annotations (cam tabs, fdm supports)
|
||||||
|
this.anno = {};
|
||||||
// THREE Mesh and points
|
// THREE Mesh and points
|
||||||
this.mesh = null;
|
this.mesh = null;
|
||||||
this.points = null;
|
this.points = null;
|
||||||
|
|
@ -220,10 +222,12 @@ console.log/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
|
||||||
indices = data.ind || undefined,
|
indices = data.ind || undefined,
|
||||||
track = data.track || undefined,
|
track = data.track || undefined,
|
||||||
group = data.group || id,
|
group = data.group || id,
|
||||||
|
anno = data.anno || undefined,
|
||||||
widget = newWidget(id, Group.forid(group)),
|
widget = newWidget(id, Group.forid(group)),
|
||||||
meta = data.meta || widget.meta,
|
meta = data.meta || widget.meta,
|
||||||
ptr = widget.loadVertices({vertices, indices});
|
ptr = widget.loadVertices({vertices, indices});
|
||||||
widget.meta = meta;
|
widget.meta = meta;
|
||||||
|
widget.anno = anno || widget.anno;
|
||||||
// restore widget position if specified
|
// restore widget position if specified
|
||||||
if (move && track && track.pos) {
|
if (move && track && track.pos) {
|
||||||
widget.track = track;
|
widget.track = track;
|
||||||
|
|
@ -265,13 +269,25 @@ console.log/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
|
||||||
ind: widget.getGeoIndices(),
|
ind: widget.getGeoIndices(),
|
||||||
track: widget.track,
|
track: widget.track,
|
||||||
group: this.group.id,
|
group: this.group.id,
|
||||||
meta: this.meta
|
meta: this.meta,
|
||||||
|
anno: this.annotations()
|
||||||
}, function(result) {
|
}, function(result) {
|
||||||
widget.meta.saved = time();
|
widget.meta.saved = time();
|
||||||
if (ondone) ondone();
|
if (ondone) ondone();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
PRO.annotations = function() {
|
||||||
|
let o = Object.clone(this.anno);
|
||||||
|
if (o.support) {
|
||||||
|
// clear out THREE.Box temps
|
||||||
|
for (let s of o.support) {
|
||||||
|
delete s.box;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return o;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {Float32Array} vertices
|
* @param {Float32Array} vertices
|
||||||
|
|
@ -474,8 +490,11 @@ console.log/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
|
||||||
* @param {number} color
|
* @param {number} color
|
||||||
*/
|
*/
|
||||||
PRO.setColor = function(color,settings) {
|
PRO.setColor = function(color,settings) {
|
||||||
|
if (settings) {
|
||||||
|
console.trace('legacy call with settings');
|
||||||
|
}
|
||||||
if (Array.isArray(color)) {
|
if (Array.isArray(color)) {
|
||||||
color = color[this.getExtruder(settings) % color.length];
|
color = color[this.getExtruder() % color.length];
|
||||||
}
|
}
|
||||||
this.color = color;
|
this.color = color;
|
||||||
let material = this.mesh.material;
|
let material = this.mesh.material;
|
||||||
|
|
@ -789,11 +808,15 @@ console.log/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
|
||||||
};
|
};
|
||||||
|
|
||||||
PRO.getExtruder = function(settings) {
|
PRO.getExtruder = function(settings) {
|
||||||
if (settings && settings.widget) {
|
if (settings) {
|
||||||
let rec = settings.widget[this.id];
|
console.trace('legacy call with settings');
|
||||||
return rec && rec.extruder >= 0 ? rec.extruder : 0;
|
|
||||||
}
|
}
|
||||||
return 0;
|
return this.anno.extruder || 0;
|
||||||
|
// if (settings && settings.widget) {
|
||||||
|
// let rec = settings.widget[this.id];
|
||||||
|
// return rec && rec.extruder >= 0 ? rec.extruder : 0;
|
||||||
|
// }
|
||||||
|
// return 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
// allow worker code to run in same memspace as client
|
// allow worker code to run in same memspace as client
|
||||||
|
|
|
||||||
|
|
@ -346,6 +346,8 @@ KIRI.worker = {
|
||||||
last = time(),
|
last = time(),
|
||||||
now;
|
now;
|
||||||
|
|
||||||
|
widget.anno = data.anno || widget.anno;
|
||||||
|
|
||||||
widget.slice(settings, function(error) {
|
widget.slice(settings, function(error) {
|
||||||
if (error) {
|
if (error) {
|
||||||
send.data({error: error});
|
send.data({error: error});
|
||||||
|
|
|
||||||
|
|
@ -100,11 +100,11 @@
|
||||||
proc.ops = proc.ops.filter(v => v);
|
proc.ops = proc.ops.filter(v => v);
|
||||||
}
|
}
|
||||||
// for any tabs or traces to set markers
|
// for any tabs or traces to set markers
|
||||||
Object.keys(settings.widget).forEach(wid => {
|
for (let widget of API.widgets.all()) {
|
||||||
let wannot = settings.widget[wid];
|
let wannot = widget.anno;
|
||||||
if (wannot.tab && wannot.tab.length) hasTabs = true;
|
if (wannot.tab && wannot.tab.length) hasTabs = true;
|
||||||
if (wannot.trace && wannot.trace.length) hasTraces = true;
|
if (wannot.trace && wannot.trace.length) hasTraces = true;
|
||||||
});
|
}
|
||||||
// show/hide dots in enabled process pop buttons
|
// show/hide dots in enabled process pop buttons
|
||||||
api.ui.camTabs.marker.style.display = hasTabs ? 'flex' : 'none';
|
api.ui.camTabs.marker.style.display = hasTabs ? 'flex' : 'none';
|
||||||
api.ui.camStock.marker.style.display = proc.camStockOn ? 'flex' : 'none';
|
api.ui.camStock.marker.style.display = proc.camStockOn ? 'flex' : 'none';
|
||||||
|
|
@ -478,6 +478,7 @@
|
||||||
func.tabDone();
|
func.tabDone();
|
||||||
API.widgets.all().forEach(widget => {
|
API.widgets.all().forEach(widget => {
|
||||||
clearTabs(widget);
|
clearTabs(widget);
|
||||||
|
widget.saveState();
|
||||||
});
|
});
|
||||||
API.conf.save();
|
API.conf.save();
|
||||||
});
|
});
|
||||||
|
|
@ -524,6 +525,7 @@
|
||||||
});
|
});
|
||||||
ta.splice(ix,1);
|
ta.splice(ix,1);
|
||||||
API.conf.save();
|
API.conf.save();
|
||||||
|
widget.saveState();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!iw) return;
|
if (!iw) return;
|
||||||
|
|
@ -541,6 +543,7 @@
|
||||||
wt.push(Object.clone(rec));
|
wt.push(Object.clone(rec));
|
||||||
addWidgetTab(iw, rec);
|
addWidgetTab(iw, rec);
|
||||||
API.conf.save();
|
API.conf.save();
|
||||||
|
iw.saveState();
|
||||||
};
|
};
|
||||||
|
|
||||||
// TRACE FUNCS
|
// TRACE FUNCS
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@
|
||||||
minToolDiam = Infinity,
|
minToolDiam = Infinity,
|
||||||
maxToolDiam = -Infinity,
|
maxToolDiam = -Infinity,
|
||||||
thruHoles,
|
thruHoles,
|
||||||
tabs = settings.widget[widget.id].tab,
|
tabs = widget.anno.tab,
|
||||||
unsafe = proc.camExpertFast,
|
unsafe = proc.camExpertFast,
|
||||||
units = settings.controller.units === 'in' ? 25.4 : 1;
|
units = settings.controller.units === 'in' ? 25.4 : 1;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -521,6 +521,18 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
let xpdebug;
|
let xpdebug;
|
||||||
|
let supsave = {};
|
||||||
|
let suptimer;
|
||||||
|
|
||||||
|
function scheduleSupportSave(widget) {
|
||||||
|
clearTimeout(suptimer);
|
||||||
|
supsave[widget.id] = widget;
|
||||||
|
suptimer = setTimeout(() => {
|
||||||
|
for (let w of Object.values(supsave)) {
|
||||||
|
w.saveState();
|
||||||
|
}
|
||||||
|
}, 50);
|
||||||
|
}
|
||||||
|
|
||||||
function activeSupports() {
|
function activeSupports() {
|
||||||
const active = [];
|
const active = [];
|
||||||
|
|
@ -554,6 +566,7 @@
|
||||||
pos.box.pillar = Object.assign({widget}, pos);
|
pos.box.pillar = Object.assign({widget}, pos);
|
||||||
sups[id] = pos;
|
sups[id] = pos;
|
||||||
widget.adds.push(pos.box);
|
widget.adds.push(pos.box);
|
||||||
|
scheduleSupportSave(widget);
|
||||||
}
|
}
|
||||||
return sups[id];
|
return sups[id];
|
||||||
}
|
}
|
||||||
|
|
@ -572,6 +585,7 @@
|
||||||
});
|
});
|
||||||
sa.splice(ix,1);
|
sa.splice(ix,1);
|
||||||
API.conf.save();
|
API.conf.save();
|
||||||
|
scheduleSupportSave(widget);
|
||||||
fromPillar = undefined;
|
fromPillar = undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -604,6 +618,7 @@
|
||||||
});
|
});
|
||||||
widget.sups = {};
|
widget.sups = {};
|
||||||
delete API.widgets.annotate(widget.id).support;
|
delete API.widgets.annotate(widget.id).support;
|
||||||
|
scheduleSupportSave(widget);
|
||||||
return cleared;
|
return cleared;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,21 +13,9 @@
|
||||||
// slice, // src/mode/fdm/slice.js
|
// slice, // src/mode/fdm/slice.js
|
||||||
// prepare, // src/mode/fdm/prepare.js
|
// prepare, // src/mode/fdm/prepare.js
|
||||||
// export, // src/mode/fdm/export.js
|
// export, // src/mode/fdm/export.js
|
||||||
getRangeParameters,
|
getRangeParameters
|
||||||
fixExtruders
|
|
||||||
};
|
};
|
||||||
|
|
||||||
function fixExtruders(settings) {
|
|
||||||
Object.entries(settings.widget).forEach(arr => {
|
|
||||||
let [wid,val] = arr;
|
|
||||||
let dext = settings.device.extruders[val.extruder];
|
|
||||||
if (!dext) {
|
|
||||||
settings.widget[wid].extruder = 0;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return settings;
|
|
||||||
}
|
|
||||||
|
|
||||||
function getRangeParameters(process, index) {
|
function getRangeParameters(process, index) {
|
||||||
if (index === undefined || index === null || index < 0) {
|
if (index === undefined || index === null || index < 0) {
|
||||||
return process;
|
return process;
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
*/
|
*/
|
||||||
FDM.export = function(print, online, ondone, ondebug) {
|
FDM.export = function(print, online, ondone, ondebug) {
|
||||||
let layers = print.output,
|
let layers = print.output,
|
||||||
settings = FDM.fixExtruders(print.settings),
|
settings = print.settings,
|
||||||
controller = settings.controller,
|
controller = settings.controller,
|
||||||
thumbnails = controller.exportThumb,
|
thumbnails = controller.exportThumb,
|
||||||
getRangeParameters = FDM.getRangeParameters,
|
getRangeParameters = FDM.getRangeParameters,
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,6 @@
|
||||||
// filter ignored widgets
|
// filter ignored widgets
|
||||||
widgets = widgets.filter(w => !w.track.ignore);
|
widgets = widgets.filter(w => !w.track.ignore);
|
||||||
|
|
||||||
settings = FDM.fixExtruders(settings);
|
|
||||||
let render = settings.render !== false,
|
let render = settings.render !== false,
|
||||||
{ device, process, controller, bounds, mode } = settings,
|
{ device, process, controller, bounds, mode } = settings,
|
||||||
{ bedWidth, bedDepth } = device,
|
{ bedWidth, bedDepth } = device,
|
||||||
|
|
@ -222,7 +221,7 @@
|
||||||
swidget.belt = widget.belt;
|
swidget.belt = widget.belt;
|
||||||
swidget.track = Object.clone(widget.track);
|
swidget.track = Object.clone(widget.track);
|
||||||
swidget.mesh = { widget: swidget, position: swidget.track.pos };
|
swidget.mesh = { widget: swidget, position: swidget.track.pos };
|
||||||
settings.widget[swidget.id] = { extruder: process.sliceSupportNozzle };
|
widget.anno.extruder = process.sliceSupportNozzle;
|
||||||
widgets.push(swidget);
|
widgets.push(swidget);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -235,7 +234,7 @@
|
||||||
// find max layers (for updates)
|
// find max layers (for updates)
|
||||||
// generate list of used extruders for purge blocks
|
// generate list of used extruders for purge blocks
|
||||||
for (let widget of widgets) {
|
for (let widget of widgets) {
|
||||||
let extruder = (settings.widget[widget.id] || {}).extruder || 0;
|
let extruder = widget.anno.extruder || 0;
|
||||||
if (!extruders[extruder]) {
|
if (!extruders[extruder]) {
|
||||||
extruders[extruder] = {};
|
extruders[extruder] = {};
|
||||||
extcount++;
|
extcount++;
|
||||||
|
|
|
||||||
|
|
@ -114,7 +114,6 @@
|
||||||
* @param {Function} ondone (called when complete with an array of Slice objects)
|
* @param {Function} ondone (called when complete with an array of Slice objects)
|
||||||
*/
|
*/
|
||||||
FDM.slice = function(settings, widget, onupdate, ondone) {
|
FDM.slice = function(settings, widget, onupdate, ondone) {
|
||||||
FDM.fixExtruders(settings);
|
|
||||||
let render = settings.render !== false,
|
let render = settings.render !== false,
|
||||||
{ process, device, controller } = settings,
|
{ process, device, controller } = settings,
|
||||||
isBelt = device.bedBelt,
|
isBelt = device.bedBelt,
|
||||||
|
|
@ -125,8 +124,8 @@
|
||||||
solidMinArea = process.sliceSolidMinArea,
|
solidMinArea = process.sliceSolidMinArea,
|
||||||
solidLayers = process.sliceSolidLayers || 0,
|
solidLayers = process.sliceSolidLayers || 0,
|
||||||
vaseMode = process.sliceFillType === 'vase' && !isSynth,
|
vaseMode = process.sliceFillType === 'vase' && !isSynth,
|
||||||
metadata = settings.widget[widget.id] || {},
|
metadata = widget.anno,
|
||||||
extruder = metadata.extruder || 0,
|
extruder = parseInt(isSynth ? process.sliceSupportNozzle : metadata.extruder || 0),
|
||||||
sliceHeight = process.sliceHeight,
|
sliceHeight = process.sliceHeight,
|
||||||
sliceHeightBase = (isBelt ? sliceHeight : process.firstSliceHeight) || sliceHeight,
|
sliceHeightBase = (isBelt ? sliceHeight : process.firstSliceHeight) || sliceHeight,
|
||||||
nozzleSize = device.extruders[extruder].extNozzle,
|
nozzleSize = device.extruders[extruder].extNozzle,
|
||||||
|
|
@ -171,7 +170,7 @@
|
||||||
const sliceMinHeight = process.sliceAdaptive && process.sliceMinHeight > 0 ?
|
const sliceMinHeight = process.sliceAdaptive && process.sliceMinHeight > 0 ?
|
||||||
Math.min(process.sliceMinHeight, sliceHeight) : 0;
|
Math.min(process.sliceMinHeight, sliceHeight) : 0;
|
||||||
|
|
||||||
if (sliceHeightBase < sliceHeight) {
|
if (sliceHeightBase <= 0) {
|
||||||
console.log("invalid first layer height < slice height");
|
console.log("invalid first layer height < slice height");
|
||||||
console.log("reverting to min valid slice height");
|
console.log("reverting to min valid slice height");
|
||||||
sliceHeightBase = sliceMinHeight || sliceHeight;
|
sliceHeightBase = sliceMinHeight || sliceHeight;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue