fix spurious gapped layers in fdm + path mode. fix wrong support menu showing in SLA mode
This commit is contained in:
parent
dceffdae26
commit
02ede29305
3 changed files with 7 additions and 4 deletions
|
|
@ -232,7 +232,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
cur.paths.push({ index, faces, z: poly.getZ() });
|
cur.paths.push({ index, faces, z: opts.z || poly.getZ() });
|
||||||
if (opts.color) {
|
if (opts.color) {
|
||||||
cur.cpath = [ Object.assign({ start: 0, count: Infinity }, opts.color) ];
|
cur.cpath = [ Object.assign({ start: 0, count: Infinity }, opts.color) ];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@
|
||||||
restoreSupports(api.widgets.all());
|
restoreSupports(api.widgets.all());
|
||||||
});
|
});
|
||||||
api.event.on("settings.saved", (settings) => {
|
api.event.on("settings.saved", (settings) => {
|
||||||
api.ui.fdmSupport.style.display = lastMode === 'CAM' || settings.device.bedBelt ? 'none' : 'flex';
|
api.ui.fdmSupport.style.display = lastMode !== 'FDM' || settings.device.bedBelt ? 'none' : 'flex';
|
||||||
});
|
});
|
||||||
api.event.on("button.click", target => {
|
api.event.on("button.click", target => {
|
||||||
switch (target) {
|
switch (target) {
|
||||||
|
|
|
||||||
|
|
@ -520,14 +520,13 @@
|
||||||
return currentColorFunction(rate/max, 1, 0.85);
|
return currentColorFunction(rate/max, 1, 0.85);
|
||||||
};
|
};
|
||||||
|
|
||||||
FDM.prepareRender = function(levels, update, options) {
|
FDM.prepareRender = function(levels, update, opts = {}) {
|
||||||
levels = levels.filter(level => level.length);
|
levels = levels.filter(level => level.length);
|
||||||
if (levels.length === 0) {
|
if (levels.length === 0) {
|
||||||
self.worker.print.maxSpeed = 0;
|
self.worker.print.maxSpeed = 0;
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
const opts = options || {};
|
|
||||||
const tools = opts.tools || {};
|
const tools = opts.tools || {};
|
||||||
const flat = opts.flat;
|
const flat = opts.flat;
|
||||||
const thin = opts.thin && !flat;
|
const thin = opts.thin && !flat;
|
||||||
|
|
@ -675,6 +674,10 @@
|
||||||
output
|
output
|
||||||
.setLayer(opts.other || 'move', moveOpt, opts.moves !== true)
|
.setLayer(opts.other || 'move', moveOpt, opts.moves !== true)
|
||||||
.addPolys(moves, { thin: true, z: opts.z });
|
.addPolys(moves, { thin: true, z: opts.z });
|
||||||
|
// force level when present
|
||||||
|
if (level.z) {
|
||||||
|
opts.z = level.z;
|
||||||
|
}
|
||||||
Object.values(prints).forEach(array => {
|
Object.values(prints).forEach(array => {
|
||||||
array.forEach(poly => {
|
array.forEach(poly => {
|
||||||
if (flat && poly.appearsClosed()) {
|
if (flat && poly.appearsClosed()) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue