clear ranges on widget delete. add debug indices for slicing
This commit is contained in:
parent
ac57c4b4ee
commit
e84a4f4251
3 changed files with 18 additions and 2 deletions
|
|
@ -239,7 +239,10 @@
|
|||
zOrdered.sort(function(a,b) { return a - b});
|
||||
}
|
||||
|
||||
if (useFlats) {
|
||||
if (options.indices) {
|
||||
zIndexes = options.indices;
|
||||
zHeights = zIndexes.map(v => options.height);
|
||||
} else if (useFlats) {
|
||||
zIndexes.appendAll(zOrdered);
|
||||
} else if (options.single) {
|
||||
// usually for laser single slice
|
||||
|
|
|
|||
|
|
@ -85,6 +85,11 @@
|
|||
});
|
||||
}
|
||||
|
||||
function clearRanges() {
|
||||
API.conf.get().process.ranges = [];
|
||||
UI.rangeGroup.firstElementChild.innerHTML = '';
|
||||
}
|
||||
|
||||
function updateRanges(ranges = []) {
|
||||
UI.rangeGroup.style.display = isFdmMode && ranges && ranges.length ? 'flex' : 'none';
|
||||
let html = [];
|
||||
|
|
@ -297,9 +302,16 @@
|
|||
});
|
||||
api.event.on("selection.scale", () => {
|
||||
if (isFdmMode) {
|
||||
clearRanges();
|
||||
func.sclear();
|
||||
}
|
||||
});
|
||||
api.event.on("widget.delete", widget => {
|
||||
if (isFdmMode) {
|
||||
clearRanges();
|
||||
return;
|
||||
}
|
||||
});
|
||||
api.event.on("widget.mirror", widget => {
|
||||
if (!isFdmMode) {
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -153,7 +153,8 @@
|
|||
union: ctrl.healMesh,
|
||||
// debug: true,
|
||||
// xray: 3,
|
||||
// view: view
|
||||
// view: view,
|
||||
indices: spro.indices
|
||||
}, onSliceDone, onSliceUpdate);
|
||||
|
||||
function onSliceUpdate(update) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue