fix 0 brim offset/merge bug
This commit is contained in:
parent
c74224ef06
commit
6448181870
1 changed files with 9 additions and 14 deletions
|
|
@ -44,11 +44,9 @@
|
||||||
layerno = 0,
|
layerno = 0,
|
||||||
zoff = 0,
|
zoff = 0,
|
||||||
layerout = [],
|
layerout = [],
|
||||||
slices = [],
|
// slices = [],
|
||||||
print = self.worker.print = KIRI.newPrint(settings, widgets),
|
print = self.worker.print = KIRI.newPrint(settings, widgets),
|
||||||
beltYoff = device.bedDepth / 2,
|
beltfact = Math.cos(Math.PI/4);
|
||||||
beltfact = Math.cos(Math.PI/4),
|
|
||||||
invbfact = 1 / beltfact;
|
|
||||||
|
|
||||||
// compute bounds if missing
|
// compute bounds if missing
|
||||||
if (!bounds) {
|
if (!bounds) {
|
||||||
|
|
@ -97,7 +95,7 @@
|
||||||
brims = POLY.union(brims, undefined, true);
|
brims = POLY.union(brims, undefined, true);
|
||||||
|
|
||||||
// if brim is offset, over-expand then shrink to induce brims to merge
|
// if brim is offset, over-expand then shrink to induce brims to merge
|
||||||
if (offset && brims.length) {
|
if (brims.length) {
|
||||||
let extra = process.sliceSupportExtra + 2;
|
let extra = process.sliceSupportExtra + 2;
|
||||||
let zheight = brims[0].getZ();
|
let zheight = brims[0].getZ();
|
||||||
brims = POLY.expand(brims, extra, zheight, null, 1);
|
brims = POLY.expand(brims, extra, zheight, null, 1);
|
||||||
|
|
@ -158,14 +156,12 @@
|
||||||
let polys = [],
|
let polys = [],
|
||||||
preout = [];
|
preout = [];
|
||||||
|
|
||||||
// expand specified # of brims
|
// offset specified # of brims
|
||||||
brims.forEach(function(brim) {
|
POLY.offset(brims, nozzle, {
|
||||||
POLY.offset([brim], nozzle, {
|
outs: polys,
|
||||||
outs: polys,
|
flat: true,
|
||||||
flat: true,
|
count: process.outputBrimCount,
|
||||||
count: process.outputBrimCount,
|
z: firstLayerHeight / 2
|
||||||
z: firstLayerHeight / 2
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// output brim points
|
// output brim points
|
||||||
|
|
@ -449,7 +445,6 @@
|
||||||
layerout.layer = layerno++;
|
layerout.layer = layerno++;
|
||||||
update((layerno / cake.length) * 0.5, "prepare");
|
update((layerno / cake.length) * 0.5, "prepare");
|
||||||
|
|
||||||
slices = [];
|
|
||||||
layerout = [];
|
layerout = [];
|
||||||
lastOut = undefined;
|
lastOut = undefined;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue