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});
|
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);
|
zIndexes.appendAll(zOrdered);
|
||||||
} else if (options.single) {
|
} else if (options.single) {
|
||||||
// usually for laser single slice
|
// usually for laser single slice
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,11 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function clearRanges() {
|
||||||
|
API.conf.get().process.ranges = [];
|
||||||
|
UI.rangeGroup.firstElementChild.innerHTML = '';
|
||||||
|
}
|
||||||
|
|
||||||
function updateRanges(ranges = []) {
|
function updateRanges(ranges = []) {
|
||||||
UI.rangeGroup.style.display = isFdmMode && ranges && ranges.length ? 'flex' : 'none';
|
UI.rangeGroup.style.display = isFdmMode && ranges && ranges.length ? 'flex' : 'none';
|
||||||
let html = [];
|
let html = [];
|
||||||
|
|
@ -297,9 +302,16 @@
|
||||||
});
|
});
|
||||||
api.event.on("selection.scale", () => {
|
api.event.on("selection.scale", () => {
|
||||||
if (isFdmMode) {
|
if (isFdmMode) {
|
||||||
|
clearRanges();
|
||||||
func.sclear();
|
func.sclear();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
api.event.on("widget.delete", widget => {
|
||||||
|
if (isFdmMode) {
|
||||||
|
clearRanges();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
});
|
||||||
api.event.on("widget.mirror", widget => {
|
api.event.on("widget.mirror", widget => {
|
||||||
if (!isFdmMode) {
|
if (!isFdmMode) {
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -153,7 +153,8 @@
|
||||||
union: ctrl.healMesh,
|
union: ctrl.healMesh,
|
||||||
// debug: true,
|
// debug: true,
|
||||||
// xray: 3,
|
// xray: 3,
|
||||||
// view: view
|
// view: view,
|
||||||
|
indices: spro.indices
|
||||||
}, onSliceDone, onSliceUpdate);
|
}, onSliceDone, onSliceUpdate);
|
||||||
|
|
||||||
function onSliceUpdate(update) {
|
function onSliceUpdate(update) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue